check in
Completed

STC electric mosquito repellent heater

PROSTC electric mosquito repellent heater

tag

647
0
0
0
Mode:Full

License

GPL 3.0

Creation time:2024-10-22 07:23:17Update time:2024-10-23 06:01:53

Description

B station video: https://www.bilibili.com/video/BV1h14y1B7TA/

 

1. Project description

1. An electric mosquito repellent liquid heater based on STC8G1K08 as the main control and using carbon film resistors as the heating element.

2. Support Type-C 5V input and C to C line.

3. Compared with traditional electric mosquito coils, the cost of PTC heating sheets is lower.

4. It can be powered by a mobile power supply and has certain portability, making it easy to use outside.

5. The overall hardware cost is low, the circuit design is simple, and it is easy to reproduce.

 

2. Hardware Principle

Working principle of traditional electric mosquito coils:

The principle of traditional electric mosquito-repellent incense on the market is controlled by a self-locking switch, using PTC heating sheets for constant temperature heating. By heating the wood fiber core rod of the electric-heated mosquito-repellent liquid, the mosquito-repellent liquid in the bottle volatilizes into the air.

The hardware principle of this project:

1. Using the Joule heating effect, when current flows through a series resistor, the current does work and consumes electrical energy, generating heat.

2. Use PWM to drive the P-channel MOS tube AO3401 to control heating and stop heating.

3. Constant temperature control is performed through NTC thermistor, and the heating power is reduced when the preset temperature (105°C) is reached.

4. Use a key switch control and an LED as a status indicator.

 

3. Principle of Temperature Measurement

The driving and temperature measurement circuit is shown in the figure above. At this time, the left side of the NTC resistor can be regarded as a push-pull output of 0V or 5V.

Because the pull-down resistor (load resistor) is small enough. Therefore, when it is turned on or off, a resistor-capacitor charge and discharge delay waveform will be generated on the INT1 pin.

Combined with the trigger level of the IO pin, the resistance value of NTC can be derived.

The principle is somewhat similar to the integral ADC. The specific implementation details can be found in the source code. The process is as follows:

When the output is turned off, the T1 timing and INT1 external interrupt are turned on. When the external interrupt is triggered, the T1 timing is stopped. At this time, the time difference from power supply to trigger can be obtained.

Then use this time difference to look up the table to get the current specific temperature. Therefore, the microcontroller does not need a formula to convert the resistance value. Trade space for time.

Moreover, this microcontroller does not have ADC peripherals, which saves another two cents😁.

 

4. Physical Display

3D file preview.

Physical picture.

 

5. Burning Tutorial

Hold down shift and click Restart, Advanced Startup Mode, select 7 to disable driver force signature and then perform the following operations.

1. Select the chip model as STC8G1K08-8PIN.

2. Click on the USB driver → install the software to simulate the hardware USB download driver → follow the prompts to install it.

3. File→Open program file→Select the burning file (in the attachment)

4. When the welding is successful, press and hold the button SW1 and insert the USB. A new device will appear on the right side of the scanning serial port.

5. Remember to set the frequency to 12MHz, then click Download/Program.

 

6. Instructions for use

Heating is turned off by default after power-on. Click the button to start heating, and the red LED indicator light will light up at the same time. The temperature gradually increased and finally maintained a constant temperature of 105°C.

Click the button again to turn off heating. At the same time, the red LED indicator light goes out.

Double click ~ six consecutive clicks to set the scheduled shutdown function. The conversion method is that the number of consecutive clicks is 2 hours. For example, if I want to set the automatic shutdown after 8 hours, then four consecutive clicks. 4x2 hours = 8 hours.

Seven consecutive clicks to turn off the timer function and keep heating.

The default is saved after power off. When clicked, the history record will be read. If the timer was last set to a certain number of hours, this click will be the same. The default is 4 hours for automatic shutdown after first power-on.

Error detection, when the LED flashes, the detection is abnormal. At this time, the power should be cut off to troubleshoot.

 

7. Precautions

1. For specific component package models, please refer to the attached BOM table to purchase.

2. When welding the main control, it is recommended to use a hot air desoldering station or teppanyaki, and pay attention to the chip grounding.

3. Do not touch the resistor during heating to avoid burns.

4. Keep the bottle vertical to the ground during use. Do not use it upside down or on its side, otherwise it may cause leakage.

5. The evaporation port above the electric mosquito repellent liquid is strictly prohibited from being blocked by any obstruction.

 

8. Program update log

Ver1.0:
1. Increase the operating temperature to 105 degrees.
2. Click the button control switch. When it is turned on, it will read the last set timing to run.
3. Two to seven consecutive clicks control the scheduled shutdown, corresponding to 4 to 12 hours, and irregular shutdown.
4. Safety detection: when the temperature does not reach the set temperature for 3 consecutive minutes of operation, it will enter an error state, the LED will flash, and heating will stop.
5. Overheat protection detection, when the detected temperature is greater than 120 degrees, it will enter an error state, the LED will flash, and heating will stop.
6. Sensor open circuit detection, when the sensor pin times out and does not respond, it enters an error state, the LED flashes, and heating stops.
7. The sensor abnormally reports an error. When the reading temperature is less than 10, it enters the error state, the LED flashes, and the heating stops.
8. [Note] It must be set to 12MHz when downloading, otherwise it will affect timing and temperature measurement.

Ver1.1:
1. Adjust the operating temperature to 90 degrees.
2. Added 10 consecutive clicks to automatically run after power-on, which is suitable for more situations, such as connecting to a computer, and it will always run after power is turned on, so you no longer have to worry about being stung.
3. When it is powered on and runs automatically, it will jump to the scheduled 4 hours when it is turned off manually or there is an error.

4. Increase the protection threshold and fix the problem that the security protection of the previous version was easily triggered accidentally.

Designed by morempty (from OSHWHub)

Link:https://oshwhub.com/morempty/STCdian-re-wen-xiang-jia-re-qi

Design Drawing

Download File
The preview image was not generated, please save it again in the editor.

Attachments

OrderFile nameDownload times
1
stc-isp-v6.91R.exe
180
2
STC8 electric mosquito coil BOM.xlsx
127
3
Mosquito-repellent incense Ver110.hex
80
4
Mosquito-repellent Ver110 source code.zip
160
Add to Album
0
0
Share
Report

Comment

All Comments(1)
Sort by time|Sort by popularity
Followers0|Likes0
Related projects
Empty

Bottom Navigation