DIY Solder Fume Extractor + Air Quality Sensor
Hardware- 3 Devlogs
- 4 Total hours
Once I had the design finalized from the schematic, it was straightforward enough to convert it into a PCB. I spent some time rearranging components to try and use as little space as possible.
I had to leave some extra space for the ENS160+AHT21 air quality sensor, as it doesn’t work without consistent exposure to air.
After confirming that the ESP-01S was a viable microcontroller for this project, I continued with designing the schematic for the PCB.
ESP-01S is a 3.3V native controller, and the ENS160+AHT21 and the I2C OLED both use 3.3V logic. If I plug my 12V DC adapter directly into the ESP-01S, I’ll fry all my MCU components. Thus, I’m using an LM2596 buck converter to step-down some of the charge to 3.3V.
This section contains the sensor components and MCU. The air quality sensors and the OLED both share the same SCL/SDA I2C communication pins, which we established was possible in the previous devlog.
Since the pins on the ESP-01S are being used, I decided to try exploring other options to turn my fan ON/OFF. I decided to use a flip-flop switch circuit. This allows me to persistently alter the fan’s ON/OFF state by simply clicking one pushbutton.
The flip-flop switch circuit is a bistable multivibrator. It has two stable states where it can output a persistent signal (either 0 or 1), thus why we say it can represent a single bit of information.
One of the states (transistors) is connected to a MOSFET (STP55NF06L), a heavy-duty voltage-controlled component which handles heavy loads much better than a simple transistor. The MOSFET helps control the fan.
I attached a flyback diode in parallel to the fan. Because a fan is fundamentally wire coiled around magnets (an inductor), when the flip-flop switch suddenly turns off, the magnetic field of the fan collapses, converting back into an extremely high-voltage electric signal that, if not protected against, could instantly fry my MOSFET. The flyback diode allows the current to loop back around through the inductor until it is harmlessly dissipated as heat.
On its own, the flip-flop switch’s initial state is hard to control . It’s based on chance, and small manufacturing differences between identical resistors and capacitors used in the circuit.
To ensure the flip-flop switch always initializes to an OFF state, I added a tiny 10nF capacitor to one of the transistors. This makes one of the transistors slightly slower, thus ensuring the other one will always “win” the race condition.
Next, I’ll be designing the PCB and programming the ESP-01S!
I’ve been soldering a lot more recently thanks to starting a variety of electronics projects, and I’m starting to feel the need to get a fume extractor and some sort of air quality sensor to monitor my workspace.
After some consideration, I decided making my own fume extractor would be a fun project idea, and also a great way to use up some electronics components that I have lying around.
To make this project, I ordered some cheap $6 12V cooling fans meant for PC setups. For the microcontroller, I’ll be using an ESP-01S, an ENS160+AHT21 (which can measure air quality and VOCs), and an I2C 0.91 inch OLED display, all components I already have. I spent some time desoldering the OLED display from an older PCB project to reuse it in this one.
The ESP-01S is an incredibly small controller, with only two pins (GPIO0 and GPIO2) available as digital pins (apart from RX and TX, but I plan to use those for debugging). Since both the OLED and the ENS160+AHT21 are I2C components that communicate with Serial Data (SDA) and Serial Clock (SCL), theoretically these components could share GPIO0 and GPIO2 as SDA and SCL pins if they had different device addresses.
However, to be sure, I breadboarded and flashed a quick program to output the addresses and confirm that I had three separate, unique identifiers.
Now that I have this information, I’m ready to design the PCB next.