Carbon monoxide poisoning is reported a lot on TV, and there are also cases around us.
I felt very uncomfortable, and I wondered if I could do something to avoid certain things from happening. During the early development, I also saw too many cases on the Internet, some of which resulted in the misfortune of one family. This is indeed a big problem.
Most of the current natural gas has been installed with leakage detection protection, and personnel are arranged to check every year and every month. However, we have ignored those who have not installed natural gas but are using steel canned gas bottles, that is, there is no leakage. Protection, tempering, forgetting to turn off the gas, incomplete combustion, and pipe damage are all major air leakage hazards. Most of the areas where steel canned gas bottles are used are rural areas or parts without natural gas, where there are few people, and poisoning is difficult to detect.
The activities held by Lichuang also drive my development. I hope to iteratively upgrade the work and turn it into a product, which will also give us a "protective umbrella" around us.
√ Toxic gas detection (carbon monoxide, methane)
√Suitable temperature and humidity reminders and alarms.
√Light detection (curtains)
√Weather forecast
√APP applet status reminder
√Telephone help and WeChat reminder (automatic help alarm)
√Emergency power supply (USB mobile phone fast charging)
Night light, emergency lighting (hardware reserved)
shell
1. Combustible gas concentration and air quality detection
2. Automatically switch to appropriate temperature, humidity reminder and alarm.
3. Light detection (curtains)
4. Weather forecast
5. Night light, emergency lighting,
6. APP applet status prompt
7. Telephone help and WeChat reminder (automatic help alarm)
8.Emergency power supply
The introduction was accidentally deleted during editing, and is being supplemented......................
1. Multi-protocol fast charging (supports super multi-protocol fast charging)
2.12V battery independent power supply
The software uses ESP8266 to connect to the Internet and the MQTT protocol to send and receive data.
Solution using MQ-9
ppm=[300,400,500,600,700,800,900,1000,2000,3000,4000,5000,6000,7000,8000,9000,10000]';
Rs/R0=[0.27,0.23,0.195,0.175,0.16,0.15,0 .14,0.13,0.078, 0.058,0.049,0.042,0.037,0.032,0.029,0.027,0.025]';
Use matlab to simulate and obtain scatter plots and simulation curves:
Find the one-to-one correspondence between the abscissa and ordinate according to the sensitivity characteristic curve:
We get a curve-like pattern
Get the formula:
Rs/R0 = 11.5428*ppm^(-0.6549)
Note: R0: represents the value of the sensor in clean air.
reverse simplification
According to the circuit diagram, we can get:
Vrl/Rl = (Vc - Vrl)/Rs;
Vrl: that is, the output voltage of the AO port
Vc: the loop voltage
Rl: Rl in my circuit is 0K, see the circuit diagram for details
According to the technical documentation, we know that R0 is the value of Rs in clean air.
My circuit test voltage is 5V, and Vrl under clean air is 0.621887 (average the voltage measured multiple times), so the value of R0 is 35.904K.
Note: To ensure accuracy, the value of Vrl in clean air needs to be measured with the sensor fully preheated.
Then derive it according to the formulas Rs/R0 = 11.5428 * ppm^(-0.6549) and Vrl/Rl = (Vc - Vrl)/Rs, and get:
ppm^0.6549 = 11.5428 * 35.904 * Vrl/(25.5* Vrl);
using the C standard The library function pow(x,y) finds ppm; // Its function is to calculate the yth power of x. x, y and function values are all double type
The HK32 chip used has a voltage resistance of 5V but the ADC can only be 3.3V - it needs to be multiplied by 1.5 and the two resistors divide the voltage in half.
ppm = pow(11.5428 * 35.904 * Vrl/(25.5-1.5/24* Vrl),0.6549);
Status in PPM decision
For the sake of safety, we set the threshold to 50, which is within the acceptable range to protect the use of children and the elderly!
The casing has not been shipped yet (the head is big), so I got a box instead.
Speaker and microphone (voice recognition)
I am currently learning the LVGL embedded GUI interface, and I hope to make an interface that is better than this one! !
Embedded has never learned UI
——————————————
Technical reference documents: 1. https://blog.csdn.net/qq_35952136/article/details/95589074
All reference designs on this site are sourced from major semiconductor manufacturers or collected online for learning and research. The copyright belongs to the semiconductor manufacturer or the original author. If you believe that the reference design of this site infringes upon your relevant rights and interests, please send us a rights notice. As a neutral platform service provider, we will take measures to delete the relevant content in accordance with relevant laws after receiving the relevant notice from the rights holder. Please send relevant notifications to email: bbs_service@eeworld.com.cn.
It is your responsibility to test the circuit yourself and determine its suitability for you. EEWorld will not be liable for direct, indirect, special, incidental, consequential or punitive damages arising from any cause or anything connected to any reference design used.
Supported by EEWorld Datasheet