# Ultrasonic atomizer is written at the front: small electronic production, four-layer board, circuit is completed, the program has begun to take shape, but it is relatively rudimentary and needs to be refined in detail. As for the 3D parts, I will put them aside first. ### Introduction: * An ultrasonic atomization plate needs to be matched with a 108kHz atomization piece. The original plan is to install it in a structural part. The whole thing can be screwed on a plastic water bottle, and a sponge can be used to absorb water to achieve atomization. It is equipped with an ambient light, which can measure the current humidity data and display it using a 188 digital tube*. The board is an 8*8cm 8-sided board, which is relatively compact and can be powered by a Type-C socket or lithium battery. It contains two buttons: switch Machine buttons & function buttons, use the function buttons to control the atomization switch, RGB switch, and humidity display switch* Operating instructions: Press and hold the left button for one second to turn on the machine, press again to turn off the machine, right function button: click Control the spray switch, double-click to turn on or off RGB, long-press to turn on humidity measurement and display. ### Sample Picture### Hardware Detailed Description 1. Power supply part: The overall voltage is 5V, the maximum current does not exceed 200mA, and two power supply methods are used: Type-C and lithium battery, which can be automatically switched and equipped with lithium battery charging Function, after the power is input, it reaches 5V through the boost circuit to supply all circuit operations. 2. Control part: The STC8G1K17 type MCU is used, the package is TSSOP20, and the Macrocrystal enhanced 8051 core MCU is priced at about 2.4 yuan. The price is relatively stable and easy to buy. The peripheral circuit only requires two filter capacitors. 3. Atomizer drive part: The microcontroller generates a 108kHz PWM wave and supplies it to the MOS, and then boosts the voltage through a three-pin inductor (autotransformer). The boosted square wave enters the atomizer, and the atomizer can disperse the water droplets. , atomize water droplets 4. Humidity measurement: Use a temperature and humidity measurement chip (somewhat luxurious) GXHT30, a domestic chip, which can be directly replaced by the standard SHT30. It has the same performance and compatible programs. The price is about 3.5 yuan, which is cheaper than SHT30. Some are easy to buy. 5. Display part: displays the current humidity, the full scale is 100%, so it is very suitable to use a 188 digital tube. It is small and elegant, and only costs 0.6 yuan. It can be directly driven by the 5 IOs of the microcontroller. Just connect 5 resistors in series 6. Lighting part: two RGB lights, two or more functions, which can be controlled by buttons (double click) to make ambient lights, and also used as indicator lights, which will light up to remind when the battery voltage is too low. . 7. Voltage measurement: 1. Battery voltage measurement, voltage divider resistance measurement, and timely warning when the voltage is too low. 2. Measure the current flowing through the atomizer piece, add a sampling resistor, amplify it and then connect it to the ADC for measurement. When the current is abnormal, it means that the atomizer piece is dry-burning, which will cause losses. After detection, turn off the PWM output in time 8. Buttons: There are two symmetrical buttons on the left and right. The left is the power control. Press and hold for one second to turn on, press again to turn off. The right is the function button. Click the PWM switch, double-click the RB and other switches, and press and hold to turn on or off the humidity. show