Let’s talk about the features of this sensor:
1. As a low-power device, it is powered by a single 2032 battery and is extremely compact. The smallest system board of Mega328P adopts an independent design to facilitate the programming process! The minimalist design of the main MCU does not have access to a crystal oscillator. This design has been used in previous projects. The 328P internal 8M crystal oscillator is enough to be used as a sensor!
The picture above is a 2D image of the MCU's minimum system board. The 1.27 pin header on the left leads to the 328P burning bootloader and the SPI interface of the program. It is connected to the computer burning program with the burning bottom board I made before!
There are a total of 15P on the front and back of the pin header on the right side for inserting and connecting to the motherboard!
PS: The NRF24 module interface behind the MCU board is to be compatible with my previous Mysensors sensor design, making this MCU motherboard suitable for multi-purpose access and reuse in future projects!
(I will also try to connect this sensor to the Mysensors gateway and Tuya Zigbee gateway at the same time later, but I don’t know if the 328P program space is enough?)
The above is a 2D image of the motherboard, connected to the photoresistor, AM312 human body, Sht30 temperature and humidity!
The Tuya TYZS3 on the right is used to access Tuya’s Zigbee gateway!
The circuit uses PW5100 boost chip:
PW5100 has extremely low power consumption. Use it as a boost circuit to squeeze out all the potential of the 2032 battery!
The following is the DIY process and program debugging records:
1. Get Tuya Zigbee gateway and modules:
2. Get the Lichuang board:
3. Use the test assistant to test the Tuya Zigbee module:
4. Use Arduino uno development board to test the transplantation effect of Tuya SDK:
Test program git address: https://github.com/jjhyt/tuya_zigbee_pir_temp/tree/master/tuya_zigbee
5. Flash the welded MCU board into the Bootloader test:
6. Flash the MCU board into the transplanted Tuya SDK program for testing:
7. Use the Arduino uno development board to test the program effects such as temperature and humidity reporting:
Test program git address: https://github.com/jjhyt/tuya_zigbee_pir_temp/tree/master/boardtest2
8. Use Arduino uno development board to test the low-power sleep program:
Test program git address: https://github.com/jjhyt/tuya_zigbee_pir_temp/tree/master/sleep
9. Use Arduino uno development board to test the complete program effect:
Test program git address: https://github.com/jjhyt/tuya_zigbee_pir_temp/tree/master/tuya-zigbee-pir-sht30
10. Complete the welding of the work and flash into the program!
The current version 3 test program git address: https://github.com/jjhyt/tuya_zigbee_pir_temp/tree/master/tuya-zigbee-pir-sht30-3
The final test result is that the standby time is still not ideal. I don’t know if it is due to the 2032 battery. Maybe the counterfeit battery is really not good enough. Now it has been replaced with two ordinary AA batteries to test the standby time!
In addition, I found a USB voltage and ammeter on the open source platform. After the board is built, I will test the current and power consumption. Later, I may change it to a single 3.7V lithium battery for power supply!
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