Compost bin is actually a container for fertilizer production, which can provide nutrition for plants, vegetables and pot plants. And the fertilizer quality depends on temperature and humidity of a compost bin as well as other factors. The other day my friend asked me to help him remake his compost bin, he wants a device that allows him to remotely get the real-time temperature and humidity inside. So I add some electronic parts on it. The project basically goes like this:
The device sends the data collected by the sensors through the 4G module, and Aliyun(a IoT platform) receives the data and displays them on web page so we can check data on a PC. For the sake of convenience, I also connect the DingTalk to the IoT platform so that the data can be transferred from DingTalk to the mobile phone.
1. IoT Platform: Aliyun
2. The electronic parts need to be waterproof because compost bin is placed outdoor and exposed to various weather. Waterproof connector and waterproof box are used here.
3. Solar panels and suitable batteries for the device to work for a long time without manual power supply. It is measured that a flexible solar panel of about 40*40cm and an 18650 battery are enough, which can work for 25-30 days when it is fully charged (make the device enter low-power mode when not working).
4. Temperature and humidity sensors: choose two sets of SHT20 temperature and humidity sensors with waterproof function produced by DFROBOT because they need to be inserted into the fertilizer directly (the fertilizer is monitored by layer, up and down).
5. 4G module: use air724 full Netcom module from Luat, which is compatible with phone card or 4G IoT card. The full Netcom is for people in remote suburbs to change several operators and achieve comprehensively signal coverage.
6. LCD1602 can display real-time temperature and humidity data, and give some information about devices like low power warning.
Controller: Esp32-E.
8. Solar power manager module: choose 5V1A module with suitable volume.
9. Add a battery power monitoring module (detect battery power) and a anti-reverse diode (prevent damage caused by battery reverse connection). The MOSFET module and relay module are used to power off modules with high power consumption, and the buzzer module is used to provide low battery alarm.
10. Each module is mainly connected by welding, and a few pins are connected by wires (when ESP32-E burns the program again, a few pins need to be in the air).
Connection Diagram1. Connect all parts according to the connection diagram first. Plug the "SDA" and "SCL" of the two SHT20 sensors, pin15 of the button module and pin36 of the battery fuel gauge into ESP32-E controller through jumper wires. Other parts are soldered. And use hot melt adhesive when fixation is needed.
2. Build your "products" and "devices" inside the IoT project at Aliyun.
3. Open the program at the end of the article, change the macro definition equipment of Aliyun at the beginning into information you want, and burn it to ESP32-E controller (first unplug the jumper wires mentioned before, after burning, plug it back).
4. There is a new function involved here: the device will send a message to DingTalk when it's in low power mode. A robot in DingTalk needs building through the computer terminal now. First build a project group, in which create a robot assistant, and then copy the webhook of the robot assistant to Aliyun platform.
Click the small icon on the upper right successively, "save", "deploy", and "publish", and it's done.
You'll see a message in the DingTalk group when battery is running low.
When the device works normally, every 3 hours or if the button is pressed, the temperature and humidity sensor will be triggered and report data. Such information can be seen on the page of Aliyun.
The above is the whole process of compost bin transformation.
sht20_sleep_lcd1602_4G.zip 5KB Download(3)
Comments