Power supply on IoT products is one of the main challenges for engineers. On one hand, it is difficult to access electricity in rural areas. On the other hand, battery capacity is limited which cannot support very long-time operations without external power supply.
This project implements a Lora sensor platform which is powered by solar panel, unlike the existing product which requires external power supply. The solar panel system provides a 24x7 operation to the platform, accompany with a power bank.
This platform is reusable on extending different features by coping with different sensors.
Solar panel charges power bank during daytime, the power bank provides energy for the platform. In case the charging energy is bigger than consuming energy on a daily/weekly period, the platform operates 24x7 theoretically.
On the platform, "XMC1300 Boot Kit" get pressure and CO2 data from "S2GO PRESSURE DPS368" and "EVAL PASCO2 MINIBOARD" respectively. It sends the data to a concentrator via Lora every hour (report time is changed to 5 seconds for demo purpose).
There are two parts in the system. They are:
1. Solar Power Lora Sensor (XMC1302)
2. Lora Receiver (ESP32)
System block diagram:
Whole system image
Solar Power Lora Sensor (XMC1302) hardware1.
Infineon XMC1300 Boot Kit
2.Infineon S2GO PRESSURE DPS368
3.Infineon EVAL PASCO2 MINIBOARD
4.XMC-Lora-sensor Adaptor board
5.Ai-Thinker Ra-01SC Lora module
k
6.Solar panel
7.Power ban
Please refer to https://github.com/unionpronet/github-xmc-lora-sensor for details about the "Solar Power Lora Sensor (XMC)" project
"Lora Receiver (ESP32)" information is available at https://github.com/unionpronet/github-esp32-lora-adapter
Demo video
Setup Lora Receiver and Android APP during 0 - 8s.
Power on the "Solar Power Lora Sensor" on 9s.
The first sensors' data is received at 28s, and repeatedly receive every 5 seconds.
Software flow
There are two important functions in Arduino application code: setup() and loop().
Function setup() initializes XMC1302 peripherals, including SPI, I2C, and I/O ports.
Function loop() is invoked by Arduino infinitely.
In function loop(), XMC1302 gets pressure sensor and CO2 sensor data every 5 seconds (for demonstration). It converts the sensor data to a JSON format and then sends the JSON message to the concentrator via the Lora module. Finally, XMC1302 goes into deep sleep mode, wakes up 5 seconds later, and repeats the get sensor data procedure above.
Example of Lora data in json format
{"event":"eventSensor","arg0":664,"arg1":32.25,"arg2":99268.41}
where
arg0 = CO2 ppm value
arg1 = temperature value in degree C
arg2 = pressure value in Pascal
LED status
LED1: turn on when MCU is active; off when MCU is in deep sleep
LED2: turn on when reading pressure sensor value; off otherwise
LED2: turn on when reading CO2 sensor value; off otherwise
LED6: turn on when Lora module is operating; off otherwise
Comments