{"id":8681,"date":"2026-03-16T14:35:55","date_gmt":"2026-03-16T13:35:55","guid":{"rendered":"https:\/\/willem.aandewiel.nl\/?p=8681"},"modified":"2026-03-29T15:45:55","modified_gmt":"2026-03-29T13:45:55","slug":"portable-fine-dust-meter-on-batteries","status":"publish","type":"post","link":"https:\/\/willem.aandewiel.nl\/index.php\/2026\/03\/16\/portable-fine-dust-meter-on-batteries\/","title":{"rendered":"Portable Fine Dust Meter on Batteries"},"content":{"rendered":"\n<p>191 keer bekeken \/ views<\/p>\n\n\n\n<p class=\"has-light-gray-background-color has-background\">This project was sponsored by<a href=\"https:\/\/www.pcbway.com\/\" target=\"_blank\" rel=\"noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"280\" height=\"98\" class=\"wp-image-8607\" style=\"width: 100px; vertical-align: middle;\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/inline-PCBWay.png\" alt=\"\"><\/a><\/p>\n\n\n\n<p>In <a href=\"https:\/\/willem.aandewiel.nl\/index.php\/2026\/02\/20\/measuring-fine-dust-for-makers-esp32-pms5003\/\" target=\"_blank\" rel=\"noreferrer noopener\">an earlier post <\/a>I described the development of an aerosol sensor that measures how much fine dust is present in the air and sends these values to an MQTT broker. The measured values can then, for example, be used to control the fan of a central ventilation system.<\/p>\n\n\n\n<p class=\"has-light-gray-background-color has-background\"><a href=\"https:\/\/willem.aandewiel.nl\/index.php\/2026\/03\/16\/draagbare-fijnstofmeter-op-batterijen\/\">Hier<\/a> kun je een <a href=\"https:\/\/willem.aandewiel.nl\/index.php\/2026\/03\/16\/draagbare-fijnstofmeter-op-batterijen\/\">Nederlandse vertaling<\/a> van dit project vinden.<\/p>\n\n\n\n<p>It is surprising to discover how much variation there can be in the amount of fine dust, depending on factors such as traffic, wood stoves, ventilation, or simply where you are located. That gave me the idea to build a small, portable device that allows me to take local measurements.<\/p>\n\n\n\n<p>Instead of the PMS5003 sensor that I used in my previous design, I now want to use the SPS30 sensor (both sensors are made by Sensirion).<\/p>\n\n\n\n<p>To truly be portable the design must meet a number of criteria:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Because it is portable it must be powered by a battery or rechargeable cell<\/li>\n\n\n\n<li>Power consumption must be as low as possible when idle (when it is not being used) so the battery is not unnecessarily drained<\/li>\n\n\n\n<li>The measured data must be shown on a display<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Design choices<\/strong><\/h2>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li>Instead of a complicated PCB design I want to use standard modules as much as possible.<\/li>\n\n\n\n<li>As a battery I will use a 18650 Li-ion cell. These are easy to obtain, have a large capacity and are not too big.<\/li>\n\n\n\n<li>As the central processor I will use an ESP32 board. These have sufficient memory and processing power for the sensor.<\/li>\n\n\n\n<li>At first I considered using deep sleep when the device is not in use. However, most ESP32 boards still consume several tens of milliamps in deep sleep, often because of the LDO. Therefore I looked for a way to completely disconnect the unit from the battery and only connect it when the device is actually in use (and thus measuring).<\/li>\n<\/ol>\n\n\n\n<p>The solution is a so-called <strong>soft latch circuit<\/strong>. With this circuit, using a p-channel MOSFET, the power between the battery, the ESP32, the sensor and the e-Paper display is completely disconnected. Power consumption in the \u201coff\u201d state is only a few microamps.<\/p>\n\n\n\n<ol start=\"5\" class=\"wp-block-list\">\n<li>To display the measurement data I need a display, but most displays only show data when power is applied. To use as little power as possible I want the device to switch off once it has finished measuring. That would normally mean the measurement can no longer be read. The solution is an <strong>e-Paper display<\/strong>. With these displays the information remains visible even when the power is turned off.<\/li>\n<\/ol>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/ePaper_Data.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/ePaper_Data-1024x768.jpg\" alt=\"\" class=\"wp-image-8644\" style=\"width:470px;height:auto\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/ePaper_Data-1024x768.jpg 1024w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/ePaper_Data-300x225.jpg 300w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/ePaper_Data-768x576.jpg 768w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/ePaper_Data.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>The result is a handheld fine dust meter based on an ESP32 and a Sensirion SPS30 sensor with an e-Paper display. The device is intended for quick measurements at a location: outside in the street, inside the house, near an open window or for example in a workshop. Because the device runs on a battery it is truly portable and handheld.<\/p>\n\n\n\n<figure class=\"wp-block-gallery aligncenter has-nested-images columns-default is-cropped wp-block-gallery-1 is-layout-flex wp-block-gallery-is-layout-flex\">\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HH_Construction.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"768\" data-id=\"8645\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HH_Construction-1024x768.jpg\" alt=\"\" class=\"wp-image-8645\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HH_Construction-1024x768.jpg 1024w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HH_Construction-300x225.jpg 300w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HH_Construction-768x576.jpg 768w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HH_Construction.jpg 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"540\" height=\"1024\" data-id=\"8669\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHSensor-540x1024.jpg\" alt=\"\" class=\"wp-image-8669\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHSensor-540x1024.jpg 540w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHSensor-158x300.jpg 158w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHSensor.jpg 633w\" sizes=\"auto, (max-width: 540px) 100vw, 540px\" \/><\/figure>\n<\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>The SPS30 sensor<\/strong><\/h2>\n\n\n\n<p>The SPS30 sensor measures the mass concentration of fine dust in several fractions: PM1.0, PM2.5 and PM10. These are the concentrations of particles smaller than 1 \u00b5m, 2.5 \u00b5m and 10 \u00b5m respectively.<\/p>\n\n\n\n<p>The sensor uses a laser and a fan to draw air through a measurement chamber and count the particles. This produces fairly reliable readings.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>The basic design<\/strong><\/h2>\n\n\n\n<p>As mentioned earlier, I want to use standard modules as much as possible. In this case:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>a module that can charge the 18650 cell<\/li>\n\n\n\n<li>a soft latch circuit<\/li>\n\n\n\n<li>a step-up converter module that converts the voltage from the 18650 (~2.5 V \u2013 4.2 V) into a stable 5 volts<\/li>\n\n\n\n<li>an ESP32 board as MPU<\/li>\n\n\n\n<li>a 1.54\u201d Waveshare e-Paper display<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHSensor.drawio.png\"><img loading=\"lazy\" decoding=\"async\" width=\"852\" height=\"356\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHSensor.drawio.png\" alt=\"\" class=\"wp-image-8685\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHSensor.drawio.png 852w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHSensor.drawio-300x125.png 300w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHSensor.drawio-768x321.png 768w\" sizes=\"auto, (max-width: 852px) 100vw, 852px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Charging module<\/strong><\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignleft size-full is-resized\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/laadModule-TP4056.png\"><img loading=\"lazy\" decoding=\"async\" width=\"454\" height=\"746\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/laadModule-TP4056.png\" alt=\"\" class=\"wp-image-8605\" style=\"width:144px;height:auto\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/laadModule-TP4056.png 454w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/laadModule-TP4056-183x300.png 183w\" sizes=\"auto, (max-width: 454px) 100vw, 454px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p><br><br>The charging module is a very common one (I bought several for a few euros each from Amazon).<\/p>\n\n\n\n<div style=\"height:8px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>DC-DC step-up module<\/strong><\/h2>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/DC-DC-BoostConvertor.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"714\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/DC-DC-BoostConvertor-1024x714.png\" alt=\"\" class=\"wp-image-8604\" style=\"width:341px;height:auto\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/DC-DC-BoostConvertor-1024x714.png 1024w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/DC-DC-BoostConvertor-300x209.png 300w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/DC-DC-BoostConvertor-768x535.png 768w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/DC-DC-BoostConvertor.png 1188w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>I also bought this module from Amazon for a few euros.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-large is-resized\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/instellenUitgangsSpanning.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"585\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/instellenUitgangsSpanning-1024x585.png\" alt=\"\" class=\"wp-image-8603\" style=\"width:179px;height:auto\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/instellenUitgangsSpanning-1024x585.png 1024w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/instellenUitgangsSpanning-300x171.png 300w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/instellenUitgangsSpanning-768x438.png 768w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/instellenUitgangsSpanning.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>Note that the module can produce several output voltages (5 V, 8 V, 9 V and 12 V).<\/p>\n\n\n\n<p>To obtain an output voltage of 5 volts the two 0-ohm resistors (next to A and B) must be removed.<br><strong>Do not forget!<\/strong><\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>SPS30 (or PMS5003) fine dust sensor<\/strong><\/h2>\n\n\n\n<p>The SPS30 particulate matter sensor is made by Sensirion.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/SPS30-and-PMS5003.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"387\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/SPS30-and-PMS5003-1024x387.png\" alt=\"\" class=\"wp-image-8620\" style=\"width:503px;height:auto\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/SPS30-and-PMS5003-1024x387.png 1024w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/SPS30-and-PMS5003-300x114.png 300w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/SPS30-and-PMS5003-768x291.png 768w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/SPS30-and-PMS5003.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><figcaption class=\"wp-element-caption\">left the SPS30, right the PMS5003<\/figcaption><\/figure>\n<\/div>\n\n\n<h2 class=\"wp-block-heading\"><strong>Waveshare 1.54\u201d e-Paper<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/1.5422-e-Paper.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"708\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/1.5422-e-Paper-1024x708.png\" alt=\"\" class=\"wp-image-8600\" style=\"width:283px;height:auto\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/1.5422-e-Paper-1024x708.png 1024w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/1.5422-e-Paper-300x208.png 300w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/1.5422-e-Paper-768x531.png 768w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/1.5422-e-Paper.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>ESP32 DevKit 30-pin<\/strong><\/h2>\n\n\n\n<p>There are literally dozens of different ESP32 boards available. For this project and the PCB I based the design on a 30-pin ESP32-DevKit-V1 board.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/ESP32-DEVKIT-V1-30pins.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"628\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/ESP32-DEVKIT-V1-30pins-1024x628.png\" alt=\"\" class=\"wp-image-8599\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/ESP32-DEVKIT-V1-30pins-1024x628.png 1024w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/ESP32-DEVKIT-V1-30pins-300x184.png 300w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/ESP32-DEVKIT-V1-30pins-768x471.png 768w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/ESP32-DEVKIT-V1-30pins.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Global operation of the device<\/strong><\/h2>\n\n\n\n<p>When the button (SW1) is briefly pressed, Q101 starts conducting and the ESP32, the SPS30 and the e-Paper display receive power.<\/p>\n\n\n\n<p>The ESP32 will first set the latch pin (GPIO_PIN_LATCH) HIGH. This keeps the circuit latched so Q101 continues to conduct.<\/p>\n\n\n\n<p>The SPS30 sensor and the e-Paper display now also receive power.<\/p>\n\n\n\n<p>For reliable measurements the SPS30 must first warm up. This warm-up time is configurable (via the platformio.ini file). According to Sensirion the warm-up time must be at least 30 seconds.<\/p>\n\n\n\n<p>After this warm-up time the device performs five measurements (also configurable), which are shown directly on the display. Finally the average of all measurements is displayed and the ESP32 sets the latch pin LOW. Q101 switches off and the power is disconnected.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Simplified code example<\/strong><\/h2>\n\n\n\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\" data-enlighter-theme=\"\" data-enlighter-highlight=\"\" data-enlighter-linenumbers=\"\" data-enlighter-lineoffset=\"\" data-enlighter-title=\"\" data-enlighter-group=\"\">void setup()\n{\n  \/\/ -- Switch off WiFi and Bluetooth as early as possible\n  \/\/ -- This saves power and avoids starting hardware that is not needed\n  disableRadios();\n\n  \/\/ -- Keep the power latch active so the device stays on\n  digitalWrite(pinLatch, HIGH);\n\n  \/\/ -- Initialize the display and prepare the first screen contents\n  epdInit();\n\n  \/\/ -- Read battery voltage early\n  \/\/ -- If the battery is too low, show a message and shut down\n  batteryVoltageLast = readBatteryVoltage();\n\n  if (batteryVoltageLast &lt; 3.4f)\n  {\n    switchOff(\"BATTERY TOO LOW\");\n    return;\n  }\n\n  \/\/ -- Initialize shared communication buses\n  \/\/ -- I2C is used for the SPS30 and optionally for the BMP280\n  i2cInit();\n\n  \/\/ -- Detect which sensor hardware is available\n  \/\/ -- The code can work with more than one particle sensor type\n  detectAvailableSensors();\n\n  \/\/ -- Try to start the particle sensor measurement\n  \/\/ -- When successful, the software enters the warm-up phase\n  if (!particleSensorInitAndStart())\n  {\n    messageText = \"Particle sensor error\";\n  }\n  else\n  {\n    messageText = \"Warming up...\";\n  }\n\n  \/\/ -- Reset all software timers used by the state machine\n  restartTimers();\n\n}   \/\/ setup()\n\n\nvoid loop()\n{\n  \/\/ -- Run small background jobs that must be serviced regularly\n  \/\/ -- Example: button handling, display housekeeping, sensor polling\n  serviceBackgroundTasks();\n\n  \/\/ -- If a shutdown was requested somewhere else in the code,\n  \/\/ -- execute it here as soon as possible\n  processSwitchOffRequest();\n\n  \/\/ -- Run the main application logic\n  \/\/ -- This is the state machine: warm-up, sample, validate, average, show result\n  runMainStateMachine();\n\n  \/\/ -- Check again after the main logic,\n  \/\/ -- because the state machine may have requested a shutdown\n  processSwitchOffRequest();\n\n}   \/\/ loop()<\/pre>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>The soft latch circuit<\/strong><\/h2>\n\n\n\n<p>For correct operation the soft latch circuit is a crucial component. Many variations can be found on the internet, some better than others. After some research I ended up with the following circuit:<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/Latch-Circuit.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"784\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/Latch-Circuit-1024x784.png\" alt=\"\" class=\"wp-image-8597\" style=\"width:455px;height:auto\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/Latch-Circuit-1024x784.png 1024w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/Latch-Circuit-300x230.png 300w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/Latch-Circuit-768x588.png 768w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/Latch-Circuit.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>It consists of two MOSFETs:<\/p>\n\n\n\n<p>a p-channel MOSFET (AO3401) used as the power switch and an n-channel MOSFET (BSS138) for control.<\/p>\n\n\n\n<p>Two signal diodes (1N4148) are included so that the push button, after power has been applied, can also be used as a normal switch on GPIO33.<\/p>\n\n\n\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=Foc9R0dC2iI\" target=\"_blank\" rel=\"noreferrer noopener\">Dave from EEVblog <\/a>and <a href=\"https:\/\/www.youtube.com\/watch?v=2yTPqQ3P5pQ\" target=\"_blank\" rel=\"noreferrer noopener\">PKAE Electronics<\/a> have made videos explaining how the circuit works.<\/p>\n\n\n\n<div class=\"wp-block-group\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group has-light-gray-background-color has-background\"><div class=\"wp-block-group__inner-container is-layout-constrained wp-block-group-is-layout-constrained\">\n<div class=\"wp-block-group is-vertical is-layout-flex wp-container-core-group-is-layout-8cf370e7 wp-block-group-is-layout-flex\">\n<h2 class=\"wp-block-heading\"><strong>How good is this soft latch circuit?<\/strong><\/h2>\n\n\n\n<p>To test this I connected a timer output to the \u201cExt.Sw\u201d jumper (J5) and repeated the following cycle 700 times:<br>\u2022 close for one second (which starts the fine dust measurement cycle)<br>\u2022 open for two minutes (within this time the sensor switches itself off again)<br>Starting with a fully charged 18650 cell, after those 700 cycles the cell voltage was still above 3.8 volts (about 50%).<br><strong>Quite efficient!<\/strong><\/p>\n<\/div>\n<\/div><\/div>\n<\/div><\/div>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignleft size-large is-resized\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/handheldAerosolSensorSchematic.pdf\" target=\"_blank\" rel=\" noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"705\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/handhelAerosolSensorSchematic-1024x705.png\" alt=\"\" class=\"wp-image-8630\" style=\"width:241px;height:auto\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/handhelAerosolSensorSchematic-1024x705.png 1024w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/handhelAerosolSensorSchematic-300x207.png 300w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/handhelAerosolSensorSchematic-768x529.png 768w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/handhelAerosolSensorSchematic.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p><br>Here is the complete schematic of the handheld fine dust meter:<\/p>\n\n\n\n<div style=\"height:10px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>PCB<\/strong><\/h2>\n\n\n\n<p>Using KiCad I designed a PCB with space for most of the components. Only the SPS30 and the e-Paper display are not mounted on the board but can be connected with standard 2.54\u2033 pin headers or JST-XH connectors.<\/p>\n\n\n\n<p>On the top side of the PCB:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>the 30-pin ESP32 module<\/li>\n\n\n\n<li>the soft latch circuit<\/li>\n\n\n\n<li>the push button<\/li>\n\n\n\n<li>the connector for the e-Paper display<\/li>\n\n\n\n<li>connectors for the SPS30 sensor or optionally the PMS5003<\/li>\n\n\n\n<li>space for a BME280 (air pressure and temperature)<\/li>\n\n\n\n<li>an I\u00b2C connector<\/li>\n<\/ul>\n\n\n\n<p>On the bottom side of the PCB:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>the 18650 battery<\/li>\n\n\n\n<li>the charging module<\/li>\n\n\n\n<li>the step-up converter module<\/li>\n\n\n\n<li>a piezo speaker<\/li>\n<\/ul>\n\n\n\n<div class=\"wp-block-envira-envira-gallery\"><div id=\"envira-gallery-wrap-8638\" class=\"envira-gallery-wrap envira-gallery-theme-base envira-lightbox-theme-base\" itemscope itemtype=\"https:\/\/schema.org\/ImageGallery\"><div data-row-height=\"\" data-gallery-theme=\"\" id=\"envira-gallery-8638\" class=\"envira-gallery-public  envira-gallery-2-columns envira-clear enviratope envira-gallery-css-animations\" data-envira-columns=\"2\"><div id=\"envira-gallery-item-8634\" class=\"envira-gallery-item enviratope-item envira-gallery-item-1 envira-lazy-load\" style=\"padding-left: 5px; padding-bottom: 10px; padding-right: 5px;\"  itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><div class=\"envira-gallery-item-inner\"><div class=\"envira-gallery-position-overlay  envira-gallery-top-left\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-top-right\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-bottom-left\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-bottom-right\"><\/div><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Top-1024x585.png\" class=\"envira-gallery-8638 envira-gallery-link\" rel=\"enviragallery8638\" title=\"hAS_Top-1024x585\" data-envira-caption=\"hAS_Top-1024x585\" data-envira-retina=\"\" data-thumbnail=\"\"  itemprop=\"contentUrl\"><div class=\"envira-lazy\" data-test-width=\"640\" data-test-height=\"480\" style=\"padding-bottom:75%;\"><img decoding=\"async\" id=\"envira-gallery-image-8634\" class=\"envira-gallery-image envira-gallery-image-1\" data-envira-index=\"1\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Top-1024x585.png\" data-envira-src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Top-1024x585.png\" data-envira-gallery-id=\"8638\" data-envira-item-id=\"8634\" data-envira-caption=\"hAS_Top-1024x585\" alt=\"\" title=\"hAS_Top-1024x585\"  itemprop=\"thumbnailUrl\" data-envira-srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Top-1024x585.png 400w,https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Top-1024x585.png 2x\" srcset=\"data:image\/gif;base64,R0lGODlhAQABAIAAAP\/\/\/\/\/\/\/yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" \/><\/div><\/a><\/div><\/div><div id=\"envira-gallery-item-8637\" class=\"envira-gallery-item enviratope-item envira-gallery-item-2 envira-lazy-load\" style=\"padding-left: 5px; padding-bottom: 10px; padding-right: 5px;\"  itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><div class=\"envira-gallery-item-inner\"><div class=\"envira-gallery-position-overlay  envira-gallery-top-left\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-top-right\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-bottom-left\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-bottom-right\"><\/div><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Top_3D-1024x585.png\" class=\"envira-gallery-8638 envira-gallery-link\" rel=\"enviragallery8638\" title=\"hAS_Top_3D-1024x585\" data-envira-caption=\"hAS_Top_3D-1024x585\" data-envira-retina=\"\" data-thumbnail=\"\"  itemprop=\"contentUrl\"><div class=\"envira-lazy\" data-test-width=\"640\" data-test-height=\"480\" style=\"padding-bottom:75%;\"><img decoding=\"async\" id=\"envira-gallery-image-8637\" class=\"envira-gallery-image envira-gallery-image-2\" data-envira-index=\"2\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Top_3D-1024x585.png\" data-envira-src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Top_3D-1024x585.png\" data-envira-gallery-id=\"8638\" data-envira-item-id=\"8637\" data-envira-caption=\"hAS_Top_3D-1024x585\" alt=\"\" title=\"hAS_Top_3D-1024x585\"  itemprop=\"thumbnailUrl\" data-envira-srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Top_3D-1024x585.png 400w,https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Top_3D-1024x585.png 2x\" srcset=\"data:image\/gif;base64,R0lGODlhAQABAIAAAP\/\/\/\/\/\/\/yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" \/><\/div><\/a><\/div><\/div><div id=\"envira-gallery-item-8636\" class=\"envira-gallery-item enviratope-item envira-gallery-item-3 envira-lazy-load\" style=\"padding-left: 5px; padding-bottom: 10px; padding-right: 5px;\"  itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><div class=\"envira-gallery-item-inner\"><div class=\"envira-gallery-position-overlay  envira-gallery-top-left\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-top-right\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-bottom-left\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-bottom-right\"><\/div><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Bottom_3D-1024x585.png\" class=\"envira-gallery-8638 envira-gallery-link\" rel=\"enviragallery8638\" title=\"hAS_Bottom_3D-1024x585\" data-envira-caption=\"hAS_Bottom_3D-1024x585\" data-envira-retina=\"\" data-thumbnail=\"\"  itemprop=\"contentUrl\"><div class=\"envira-lazy\" data-test-width=\"640\" data-test-height=\"480\" style=\"padding-bottom:75%;\"><img decoding=\"async\" id=\"envira-gallery-image-8636\" class=\"envira-gallery-image envira-gallery-image-3\" data-envira-index=\"3\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Bottom_3D-1024x585.png\" data-envira-src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Bottom_3D-1024x585.png\" data-envira-gallery-id=\"8638\" data-envira-item-id=\"8636\" data-envira-caption=\"hAS_Bottom_3D-1024x585\" alt=\"\" title=\"hAS_Bottom_3D-1024x585\"  itemprop=\"thumbnailUrl\" data-envira-srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Bottom_3D-1024x585.png 400w,https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Bottom_3D-1024x585.png 2x\" srcset=\"data:image\/gif;base64,R0lGODlhAQABAIAAAP\/\/\/\/\/\/\/yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" \/><\/div><\/a><\/div><\/div><div id=\"envira-gallery-item-8635\" class=\"envira-gallery-item enviratope-item envira-gallery-item-4 envira-lazy-load\" style=\"padding-left: 5px; padding-bottom: 10px; padding-right: 5px;\"  itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><div class=\"envira-gallery-item-inner\"><div class=\"envira-gallery-position-overlay  envira-gallery-top-left\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-top-right\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-bottom-left\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-bottom-right\"><\/div><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Bottom-1024x585.png\" class=\"envira-gallery-8638 envira-gallery-link\" rel=\"enviragallery8638\" title=\"hAS_Bottom-1024x585\" data-envira-caption=\"hAS_Bottom-1024x585\" data-envira-retina=\"\" data-thumbnail=\"\"  itemprop=\"contentUrl\"><div class=\"envira-lazy\" data-test-width=\"640\" data-test-height=\"480\" style=\"padding-bottom:75%;\"><img decoding=\"async\" id=\"envira-gallery-image-8635\" class=\"envira-gallery-image envira-gallery-image-4\" data-envira-index=\"4\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Bottom-1024x585.png\" data-envira-src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Bottom-1024x585.png\" data-envira-gallery-id=\"8638\" data-envira-item-id=\"8635\" data-envira-caption=\"hAS_Bottom-1024x585\" alt=\"\" title=\"hAS_Bottom-1024x585\"  itemprop=\"thumbnailUrl\" data-envira-srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Bottom-1024x585.png 400w,https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Bottom-1024x585.png 2x\" srcset=\"data:image\/gif;base64,R0lGODlhAQABAIAAAP\/\/\/\/\/\/\/yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" \/><\/div><\/a><\/div><\/div><div id=\"envira-gallery-item-8648\" class=\"envira-gallery-item enviratope-item envira-gallery-item-5 envira-lazy-load\" style=\"padding-left: 5px; padding-bottom: 10px; padding-right: 5px;\"  itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><div class=\"envira-gallery-item-inner\"><div class=\"envira-gallery-position-overlay  envira-gallery-top-left\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-top-right\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-bottom-left\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-bottom-right\"><\/div><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHS_TopView.jpg\" class=\"envira-gallery-8638 envira-gallery-link\" rel=\"enviragallery8638\" title=\"HHS_TopView\" data-envira-caption=\"HHS_TopView\" data-envira-retina=\"\" data-thumbnail=\"\"  itemprop=\"contentUrl\"><div class=\"envira-lazy\" data-test-width=\"640\" data-test-height=\"480\" style=\"padding-bottom:75%;\"><img decoding=\"async\" id=\"envira-gallery-image-8648\" class=\"envira-gallery-image envira-gallery-image-5\" data-envira-index=\"5\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHS_TopView-1024x768.jpg\" data-envira-src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHS_TopView-1024x768.jpg\" data-envira-gallery-id=\"8638\" data-envira-item-id=\"8648\" data-envira-caption=\"HHS_TopView\" alt=\"\" title=\"HHS_TopView\"  itemprop=\"thumbnailUrl\" data-envira-srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHS_TopView-1024x768.jpg 400w,https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHS_TopView-1024x768.jpg 2x\" srcset=\"data:image\/gif;base64,R0lGODlhAQABAIAAAP\/\/\/\/\/\/\/yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" \/><\/div><\/a><\/div><\/div><div id=\"envira-gallery-item-8647\" class=\"envira-gallery-item enviratope-item envira-gallery-item-6 envira-lazy-load\" style=\"padding-left: 5px; padding-bottom: 10px; padding-right: 5px;\"  itemscope itemtype=\"https:\/\/schema.org\/ImageObject\"><div class=\"envira-gallery-item-inner\"><div class=\"envira-gallery-position-overlay  envira-gallery-top-left\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-top-right\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-bottom-left\"><\/div><div class=\"envira-gallery-position-overlay  envira-gallery-bottom-right\"><\/div><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHS_BottomView.jpg\" class=\"envira-gallery-8638 envira-gallery-link\" rel=\"enviragallery8638\" title=\"HHS_BottomView\" data-envira-caption=\"HHS_BottomView\" data-envira-retina=\"\" data-thumbnail=\"\"  itemprop=\"contentUrl\"><div class=\"envira-lazy\" data-test-width=\"640\" data-test-height=\"480\" style=\"padding-bottom:75%;\"><img decoding=\"async\" id=\"envira-gallery-image-8647\" class=\"envira-gallery-image envira-gallery-image-6\" data-envira-index=\"6\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHS_BottomView-1024x768.jpg\" data-envira-src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHS_BottomView-1024x768.jpg\" data-envira-gallery-id=\"8638\" data-envira-item-id=\"8647\" data-envira-caption=\"HHS_BottomView\" alt=\"\" title=\"HHS_BottomView\"  itemprop=\"thumbnailUrl\" data-envira-srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHS_BottomView-1024x768.jpg 400w,https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHS_BottomView-1024x768.jpg 2x\" srcset=\"data:image\/gif;base64,R0lGODlhAQABAIAAAP\/\/\/\/\/\/\/yH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==\" \/><\/div><\/a><\/div><\/div><\/div><\/div><noscript><img decoding=\"async\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Top.png\" alt=\"\" \/><img decoding=\"async\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Top_3D.png\" alt=\"\" \/><img decoding=\"async\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Bottom_3D.png\" alt=\"\" \/><img decoding=\"async\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/hAS_Bottom.png\" alt=\"\" \/><img decoding=\"async\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHS_TopView.jpg\" alt=\"\" \/><img decoding=\"async\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/HHS_BottomView.jpg\" alt=\"\" \/><\/noscript><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Ordering the PCB<\/strong><\/h2>\n\n\n\n<p>After designing the PCB, the design (in the form of Gerber files) must be sent to a PCB manufacturer.<\/p>\n\n\n\n<p>I like to use <img loading=\"lazy\" decoding=\"async\" width=\"280\" height=\"98\" class=\"wp-image-8607\" style=\"width: 120px; vertical-align: middle;\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/inline-PCBWay.png\" alt=\"\">and KiCad has a nice plugin that automates this process. The plugin is called \u201cPCBWay\u201d.<\/p>\n\n\n\n<p>Installation is done via the Plugin and Content Manager of KiCad.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-full is-resized\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/KiCadPluginManager.png\"><img loading=\"lazy\" decoding=\"async\" width=\"743\" height=\"614\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/KiCadPluginManager.png\" alt=\"\" class=\"wp-image-7864\" style=\"width:377px;height:auto\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/KiCadPluginManager.png 743w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/KiCadPluginManager-300x248.png 300w\" sizes=\"auto, (max-width: 743px) 100vw, 743px\" \/><\/a><\/figure>\n<\/div>\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/installPCBWayPlugin.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"529\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/installPCBWayPlugin-1024x529.png\" alt=\"\" class=\"wp-image-7865\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/installPCBWayPlugin-1024x529.png 1024w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/installPCBWayPlugin-300x155.png 300w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/installPCBWayPlugin-768x397.png 768w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/installPCBWayPlugin.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>After installation the KiCad toolbar has a new button.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/StartPCBWayPlugin.png\"><img loading=\"lazy\" decoding=\"async\" width=\"746\" height=\"93\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/StartPCBWayPlugin.png\" alt=\"\" class=\"wp-image-7866\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/StartPCBWayPlugin.png 746w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/StartPCBWayPlugin-300x37.png 300w\" sizes=\"auto, (max-width: 746px) 100vw, 746px\" \/><\/a><\/figure>\n\n\n\n<p>By clicking this button all required files are packed into a .zip file and the browser opens the PCBWay website.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.pcbway.com\/\" target=\"_blank\" rel=\" noreferrer noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"711\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/PCBWay-Quote-1024x711.png\" alt=\"\" class=\"wp-image-7867\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/PCBWay-Quote-1024x711.png 1024w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/PCBWay-Quote-300x208.png 300w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/PCBWay-Quote-768x533.png 768w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2023\/08\/PCBWay-Quote.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>You then specify how many boards you want to manufacture and how you want the board to look (solder mask color and silkscreen color).<\/p>\n\n\n\n<p>After inspection by the engineers you can pay the manufacturing and shipping costs.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-large is-resized\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/PCBWay_Printjes.jpeg\"><img loading=\"lazy\" decoding=\"async\" width=\"768\" height=\"1024\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/PCBWay_Printjes-768x1024.jpeg\" alt=\"\" class=\"wp-image-8679\" style=\"width:160px;height:auto\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/PCBWay_Printjes-768x1024.jpeg 768w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/PCBWay_Printjes-225x300.jpeg 225w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/PCBWay_Printjes.jpeg 900w\" sizes=\"auto, (max-width: 768px) 100vw, 768px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p><br><br>After about a week the PCBs are delivered and arrive in your mailbox.<\/p>\n\n\n\n<div style=\"height:5px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Assumptions are not always helpful<\/strong><\/h2>\n\n\n\n<p>In my KiCad installation there was no symbol or footprint for the AO3401 or the BSS138. I wrongly assumed that all SOT-23 MOSFETs would have the same symbol and footprint.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">That turned out to be incorrect.<\/h3>\n\n\n\n<p>After soldering the first board and applying power, the ESP32 immediately turned on. Strange. Pressing the button changed nothing.<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-full is-resized\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/wrongWayAO3401.jpg\"><img loading=\"lazy\" decoding=\"async\" width=\"590\" height=\"532\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/wrongWayAO3401.jpg\" alt=\"\" class=\"wp-image-8661\" style=\"width:210px;height:auto\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/wrongWayAO3401.jpg 590w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/wrongWayAO3401-300x271.jpg 300w\" sizes=\"auto, (max-width: 590px) 100vw, 590px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>After further investigation I discovered that MOSFETs are not all identical. By soldering the AO3401 slightly tilted with a short wire on the PCB and mounting the BSS138 upside down (because drain and source were swapped) everything worked as intended.<\/p>\n\n\n\n<p>I fixed this in PCB revision 2.0. I also slightly moved the two outer connectors and changed the placement of the BME280 connections.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>One final thing<\/strong><\/h2>\n\n\n\n<p>The device can actually do a bit more than described above.<\/p>\n\n\n\n<p>For example, when starting up and just before shutting down the ESP32 measures the voltage of the 18650 cell and displays it. This is important because a Li-ion battery can be permanently damaged if the voltage drops below 3 V.<\/p>\n\n\n\n<p>If the voltage drops below 3.5 V the display shows the message:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>          Battery Low<\/code><\/pre>\n\n\n\n<p>If the voltage drops even further the device shuts itself down as quickly as possible (without performing measurements). The display then shows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>          Battery Error<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/Typical-Li-ion-Discharge-Curve.png\"><img loading=\"lazy\" decoding=\"async\" width=\"567\" height=\"455\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/Typical-Li-ion-Discharge-Curve.png\" alt=\"\" class=\"wp-image-8595\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/Typical-Li-ion-Discharge-Curve.png 567w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/Typical-Li-ion-Discharge-Curve-300x241.png 300w\" sizes=\"auto, (max-width: 567px) 100vw, 567px\" \/><\/a><\/figure>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignright size-full is-resized\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/GY-MB-PE-280.png\"><img loading=\"lazy\" decoding=\"async\" width=\"748\" height=\"772\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/GY-MB-PE-280.png\" alt=\"\" class=\"wp-image-8596\" style=\"width:165px;height:auto\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/GY-MB-PE-280.png 748w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/GY-MB-PE-280-291x300.png 291w\" sizes=\"auto, (max-width: 748px) 100vw, 748px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>Besides reading the SPS30 it is also possible to mount a BME280 on the PCB. If such a module is present the measured temperature and air pressure will be displayed when the device starts and shuts down.<\/p>\n\n\n\n<div style=\"height:3px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>Because WiFi and Bluetooth transmitters are immediately disabled at startup to save battery power, I needed a way to still perform OTA updates on the ESP32.<\/p>\n\n\n\n<p>By pressing the button (SW1) three times during startup the device will connect to a known access point. If no connection can be made a WiFi manager will be started.<\/p>\n\n\n\n<p>The display will show:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>          WiFi Portal Started\n          Waiting for User Input\n          HHPMS-&lt;MAC-Address&gt;<\/code><\/pre>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"aligncenter size-large is-resized\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/WiFimanager.png\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"562\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/WiFimanager-1024x562.png\" alt=\"\" class=\"wp-image-8664\" style=\"width:350px;height:auto\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/WiFimanager-1024x562.png 1024w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/WiFimanager-300x165.png 300w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/WiFimanager-768x422.png 768w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/WiFimanager.png 1200w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p>Now click [Configure WiFi] and select the access point named \u201cHHPMS-A4B5C6\u201d (A4B5C6 are the last three bytes of the ESP32 MAC address and are different for each chip).<\/p>\n\n\n<div class=\"wp-block-image\">\n<figure class=\"alignleft size-full\"><a href=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/configWiFi_select.png\"><img loading=\"lazy\" decoding=\"async\" width=\"323\" height=\"370\" src=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/configWiFi_select.png\" alt=\"\" class=\"wp-image-8667\" srcset=\"https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/configWiFi_select.png 323w, https:\/\/willem.aandewiel.nl\/wp-content\/uploads\/2026\/03\/configWiFi_select-262x300.png 262w\" sizes=\"auto, (max-width: 323px) 100vw, 323px\" \/><\/a><\/figure>\n<\/div>\n\n\n<p><br>You must then connect your computer, tablet or phone to this access point and enter the credentials of your own WiFi network.<\/p>\n\n\n\n<p>After clicking <strong>Save<\/strong> the data will be stored in the ESP32 and it will try to connect to this network in the future.<\/p>\n\n\n\n<div style=\"height:8px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p>The display will now show:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>          WAITING FOR UPDATE<\/code><\/pre>\n\n\n\n<p>Start the OTA update and the display will show:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>          UPDATING<\/code><\/pre>\n\n\n\n<p>After the update the device restarts and begins the normal measurement cycle, after which it shuts itself down again.<\/p>\n\n\n\n<p>The PCB and the software support both the SPS30 sensor and the PMS5003 sensor. If the device does not detect an SPS30 at startup it will automatically switch to a PMS5003.<\/p>\n\n\n\n<p>If that one is not present either, the message<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>          NO SENSOR<\/code><\/pre>\n\n\n\n<p>appears and the device shuts itself down.<\/p>\n\n\n\n<p>All design files and software can be found in <a href=\"https:\/\/github.com\/mrWheel\/handheldAerosolSensor\">this repository<\/a>.<\/p>\n\n\n\n<div style=\"height:35px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n","protected":false},"excerpt":{"rendered":"<p>191 keer bekeken \/ views This project was sponsored by In an earlier post I described the development of an aerosol sensor that measures how much fine dust is present in the air and sends these values to an MQTT &hellip; <a href=\"https:\/\/willem.aandewiel.nl\/index.php\/2026\/03\/16\/portable-fine-dust-meter-on-batteries\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":8644,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[153,2,3,157,143,10,115,187,20],"tags":[119,51,55,59,195,194,80,192,106],"class_list":["post-8681","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-3d-printing","category-arduino","category-computer","category-esp32","category-firmware","category-hardware","category-kicad","category-pcbway","category-wifi","tag-esp32","tag-firmware","tag-hardware","tag-i2c","tag-matter","tag-particulate","tag-pcb","tag-pm","tag-wifi"],"views":191,"_links":{"self":[{"href":"https:\/\/willem.aandewiel.nl\/index.php\/wp-json\/wp\/v2\/posts\/8681","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/willem.aandewiel.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/willem.aandewiel.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/willem.aandewiel.nl\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/willem.aandewiel.nl\/index.php\/wp-json\/wp\/v2\/comments?post=8681"}],"version-history":[{"count":11,"href":"https:\/\/willem.aandewiel.nl\/index.php\/wp-json\/wp\/v2\/posts\/8681\/revisions"}],"predecessor-version":[{"id":8748,"href":"https:\/\/willem.aandewiel.nl\/index.php\/wp-json\/wp\/v2\/posts\/8681\/revisions\/8748"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/willem.aandewiel.nl\/index.php\/wp-json\/wp\/v2\/media\/8644"}],"wp:attachment":[{"href":"https:\/\/willem.aandewiel.nl\/index.php\/wp-json\/wp\/v2\/media?parent=8681"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/willem.aandewiel.nl\/index.php\/wp-json\/wp\/v2\/categories?post=8681"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/willem.aandewiel.nl\/index.php\/wp-json\/wp\/v2\/tags?post=8681"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}