310 lines
11 KiB
HTML
310 lines
11 KiB
HTML
|
<!doctype html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<meta charset="utf-8">
|
||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||
|
|
||
|
<title>MET-ESP</title>
|
||
|
|
||
|
<link rel="stylesheet" href="dist/reset.css">
|
||
|
<link rel="stylesheet" href="dist/reveal.css">
|
||
|
<link rel="stylesheet" href="dist/theme/black.css">
|
||
|
|
||
|
<!-- Theme used for syntax highlighted code -->
|
||
|
<link rel="stylesheet" href="plugin/highlight/monokai.css">
|
||
|
</head>
|
||
|
<body>
|
||
|
<div class="reveal">
|
||
|
<div class="slides">
|
||
|
<section>
|
||
|
<!-- <a href="https://helcel.net">
|
||
|
<img src="https://static.slid.es/reveal/logo-v1/reveal-white-text.svg" alt="reveal.js logo" style="height: 180px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo">
|
||
|
</a> -->
|
||
|
<h3>METESP</h3>
|
||
|
<img src="dist/img/build.jpg" alt="System Diagram" style="height: 300px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo">
|
||
|
<br/><small>A measurement station by <a href="http://helcel.net/bio">Cedric Hölzl</a></small>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Goal</h2>
|
||
|
<p>Build an environment quality monitor.</p>
|
||
|
<p>
|
||
|
<small>Powered by FreeRTOS, a low power IOT device</small>
|
||
|
</p>
|
||
|
</section>
|
||
|
<section>
|
||
|
<section>
|
||
|
<h2>Global System Design</h2>
|
||
|
<img src="dist/img/sysd.svg" alt="System Diagram" style="height: 240px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo">
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>ESP32</h2>
|
||
|
<a href="https://www.espressif.com/"><img src="dist/img/espressif.svg" alt="ESPressif" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||
|
<small><ul>
|
||
|
<li>Low power, dual-core processor</li>
|
||
|
<li>C/C++ & FreeRTOS support</li>
|
||
|
<li>Wifi & BLE support</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Sensors</h2>
|
||
|
<a href=""><img src="dist/img/meter.svg" alt="Measure" style="height: 170px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||
|
|
||
|
<small><ul>
|
||
|
<li>BM280: temperature, humidity & pressure</li>
|
||
|
<li>SGP40: Volatile Organic Compounds (VOC)</li>
|
||
|
<li>LTR390-UV-1: UV</li>
|
||
|
<li>TSL25911: ambient light (infrared & visible)</li>
|
||
|
<li>PMSA003I : particle concentration by size</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Touch E-ink Display</h2>
|
||
|
<a href=""><img src="dist/img/display.svg" alt="TouchDisplay" style="height: 140px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||
|
|
||
|
<small><ul>
|
||
|
<li>GT1151: Touch</li>
|
||
|
<li>Multiple views of live data</li>
|
||
|
<li>Low power consumption</li>
|
||
|
<li>User interaction</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Open Weather Map</h2>
|
||
|
<a href="https://openweathermap.org/"><img src="dist/img/openweathermap.png" alt="OWM" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||
|
|
||
|
<small><ul>
|
||
|
<li>Exterior realtime data source</li>
|
||
|
<li>Free API access</li>
|
||
|
<li>+200'000 cities</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Time-Series Database</h2>
|
||
|
<a href="https://www.influxdata.com/"><img src="dist/img/influxdb.svg" alt="InfluxDB" style="height: 100px; margin: 0 auto 4rem auto; background:transparent;" class="demo-logo"/></a>
|
||
|
<small><ul>
|
||
|
<li><b>Influx DB</b>, open source database system</li>
|
||
|
<li>Time-Series optimized storage</li>
|
||
|
<li>Lightweight HTTP client</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Network Time Protocol</h2>
|
||
|
<a href=""><img src="dist/img/time.svg" alt="Time" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||
|
|
||
|
<small><ul>
|
||
|
<li>Get time from the network</li>
|
||
|
<li>Compute & display local time</li>
|
||
|
<li>Keep it up-to-date using internal RTC</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
</section>
|
||
|
|
||
|
<section>
|
||
|
<section>
|
||
|
<h2>I2C</h2>
|
||
|
<img src="dist/img/i2cd.svg" alt="I2C Block" style="height: 160px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/>
|
||
|
<small><ul>
|
||
|
<li>2 wires: clock & data</li>
|
||
|
<li>Device have unique adress</li>
|
||
|
<li>Bi-directional, half-duplex</li>
|
||
|
<li>Simple protocol</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>I2C protocol</h2>
|
||
|
<img src="dist/img/i2c.png" alt="System Diagram" style="height: auto; margin: 0 auto 4rem auto; background: white;border-radius:15px" class="demo-logo"/>
|
||
|
<small><ul>
|
||
|
<li>Select device with R/W capability</li>
|
||
|
<li>Select register</li>
|
||
|
<li>Send/Read data</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Technical specs</h2>
|
||
|
<small><ul>
|
||
|
<li>100kbps usually, up to multiple Mbps</li>
|
||
|
<li>120 slave devices in 7 bit mode</li>
|
||
|
<li>Some devices have 10 bit adresses</li>
|
||
|
<li>Some devices have multi-byte register adresses</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
</section>
|
||
|
|
||
|
|
||
|
<section>
|
||
|
<section>
|
||
|
<h2>SPI</h2>
|
||
|
<img src="dist/img/spid.svg" alt="SPI Block" style="height: 160px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/>
|
||
|
<small><ul>
|
||
|
<li>4 wires: clock, master-data, slave-data, chip-select</li>
|
||
|
<li>Device have unique adress</li>
|
||
|
<li>Bi-directional, full duplex</li>
|
||
|
<li>More complex protocol</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>SPI protocol</h2>
|
||
|
<small><ul>
|
||
|
<li>Multiple configurations (direct or chained, data lines)</li>
|
||
|
<li>For the EPD, library is provided by constructor</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Technical specs</h2>
|
||
|
<small><ul>
|
||
|
<li>1Mbps usually, ~2x the speed of I2C, up to hundreads of Mbps</li>
|
||
|
<li>Possibility for multiple data lines to increase bandwith further</li>
|
||
|
<li>Slave number limited by IO in direct configuration</li>
|
||
|
<li>Slave number limited by delay in chained configuration</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
</section>
|
||
|
|
||
|
<section>
|
||
|
<section>
|
||
|
<h2>HTTPS</h2>
|
||
|
<a href=""><img src="dist/img/lock.svg" alt="Secure" style="height: 120px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||
|
|
||
|
<small><ul>
|
||
|
<li>Manually imported certificates</li>
|
||
|
<li>GET from OWM (JSON)</li>
|
||
|
<li>POST to Telegram & DB (String)</li>
|
||
|
<li>JSON handled with <b>arduinojson</b> library</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
<!-- <section>
|
||
|
<h2>UDP</h2>
|
||
|
<a href=""><img src="dist/img/lock.svg" alt="Secure" style="height: 120px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||
|
|
||
|
<small><ul>
|
||
|
<li>Send 16 byte request</li>
|
||
|
<li>Parse Unix-time from responde (32bit)</li>
|
||
|
<li>Adjusted with locale & daylight-saving</li>
|
||
|
</ul></small>
|
||
|
</section> -->
|
||
|
</section>
|
||
|
|
||
|
<section>
|
||
|
<section>
|
||
|
<h2>ESP32 Configuration</h2>
|
||
|
<a href="https://www.espressif.com/sites/default/files/documentation/esp32_datasheet_en.pdf"><img src="dist/img/esp32d.png" alt="ESP32 Internal" style="height: 400px; margin: 0 auto 4rem auto; background: white;border-radius:15px;" class="demo-logo"/></a>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Internal Timer</h2>
|
||
|
<a href=""><img src="dist/img/timer.svg" alt="Timer" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||
|
<small><ul>
|
||
|
<li>Base clock runs at 80Mhz</li>
|
||
|
<li>We set the scaler to run at 1Mhz</li>
|
||
|
<li>We trigger IRQ every 1 second</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Core Configuration</h2>
|
||
|
<small style="display:block;">3 FreeRTOS core pinned tasks</small>
|
||
|
<a href=""><img src="dist/img/cpu.svg" alt="Timer" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||
|
<small><ul>
|
||
|
<li>Sensor read, network get & post (Core 0)</li>
|
||
|
<li>Touch screen IRQ polling & handling (Core 1)</li>
|
||
|
<li>E-Ink Display refresh & drawing (Core 1)</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Sleep Mode</h2>
|
||
|
<a href=""><img src="dist/img/green.svg" alt="Sleep" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||
|
<small><ul>
|
||
|
<li>After inactivity the device goes into sleep mode</li>
|
||
|
<li>Wakes up periodicaly to run measurements</li>
|
||
|
<li>Returns to standard mode on touch IRQ <b>[WIP]</b></li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Task Timing</h2>
|
||
|
<a href=""><img src="dist/img/timer.svg" alt="Timer" style="height: 100px; margin: 0 auto 4rem auto; background: transparent;" class="demo-logo"/></a>
|
||
|
<small><ul>
|
||
|
<li>List of functions with their run frequency</li>
|
||
|
<li>On minute tick check if any should have run since last tick</li>
|
||
|
<li>Not affected by function execution time</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
</section>
|
||
|
<section>
|
||
|
<section>
|
||
|
<h2>Power Consumption</h2>
|
||
|
<a href=""><img src="dist/img/power.svg" alt="Power" style="height: 170px; margin: 0 auto 4rem auto; background: transparent;rotate:-90deg;" class="demo-logo"/></a>
|
||
|
<small><table>
|
||
|
<thead>
|
||
|
<tr>
|
||
|
<th>Device</th>
|
||
|
<th>Default</th>
|
||
|
<th>Sleep</th>
|
||
|
</tr>
|
||
|
</thead>
|
||
|
<tbody>
|
||
|
<tr>
|
||
|
<td>ESP32</td>
|
||
|
<td>20-200 mA</td>
|
||
|
<td>10-800 uA</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>EPD & Touch</td>
|
||
|
<td>26 mA</td>
|
||
|
<td>122 uA</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td>Sensors</td>
|
||
|
<td>104.7 mA</td>
|
||
|
<td>245.4 uA</td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>~330 mA (33mAh)</td>
|
||
|
<td>~1.1 mA (1mAh)</td>
|
||
|
</tr>
|
||
|
</tbody>
|
||
|
</table></small>
|
||
|
</section>
|
||
|
</section>
|
||
|
<section>
|
||
|
<section>
|
||
|
<h2>Case Design</h2>
|
||
|
<a href=""><img src="dist/img/case_front.png" alt="Case front" style="height: 400px; margin: 0 auto 4rem auto; background: white;border-radius:15px;" class="demo-logo"/></a>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Case Design</h2>
|
||
|
<a href=""><img src="dist/img/case_back.png" alt="Case back" style="height: 400px; margin: 0 auto 4rem auto; background: white;border-radius:15px;" class="demo-logo"/></a>
|
||
|
</section>
|
||
|
</section>
|
||
|
<section>
|
||
|
<h2>Future Features</h2>
|
||
|
<small><ul>
|
||
|
<li>Sleep between measurements (wake from touch/timer interupt)</li>
|
||
|
<li>Improved "Air quality" metric</li>
|
||
|
<li>More views & layouts to choose from</li>
|
||
|
<li>Support to controll IOT heating/cooling/ventilation</li>
|
||
|
</ul></small>
|
||
|
</section>
|
||
|
|
||
|
<section>
|
||
|
<h2>Questions</h2>
|
||
|
</section>
|
||
|
</div>
|
||
|
</div>
|
||
|
|
||
|
<script src="dist/reveal.js"></script>
|
||
|
<script src="plugin/notes/notes.js"></script>
|
||
|
<script src="plugin/markdown/markdown.js"></script>
|
||
|
<script src="plugin/highlight/highlight.js"></script>
|
||
|
<script>
|
||
|
// More info about initialization & config:
|
||
|
// - https://revealjs.com/initialization/
|
||
|
// - https://revealjs.com/config/
|
||
|
Reveal.initialize({
|
||
|
hash: true,
|
||
|
|
||
|
// Learn about plugins: https://revealjs.com/plugins/
|
||
|
plugins: [ RevealMarkdown, RevealHighlight, RevealNotes ]
|
||
|
});
|
||
|
</script>
|
||
|
</body>
|
||
|
</html>
|