The Internet of Things (IoT) is revolutionizing the way we interact with technology, but it comes at a cost: power consumption. Traditional battery-powered IoT devices have to be charged or replaced frequently, making them unreliable and costly in the long run. Fortunately, there is an alternative: indoor solar cells.
By harvesting light indoors, these devices can provide reliable, low-power energy for machine learning models on the edge – eliminating the need for constant battery replacements and ushering in a new era of self-sustaining IoT applications. In this article, we'll explore how indoor solar cells can enable ultra low-power machine learning models on edge devices.
The ChallengeThe challenge of running machine learning models on IoT devices is twofold. Firstly, there is a need for reliable power sources that can provide enough energy for the computations required by the algorithm. Secondly, these power sources must be cost-effective and user-friendly enough to enable the widespread adoption of such technologies.
Indoor solar cells can help mitigate these challenges by providing a reliable, low-power source of energy to power machine learning models on IoT devices. By harvesting light indoors, these cells can provide energy indefinitely – eliminating the need for constant battery replacements and enabling a new era of self-sustaining edge computing applications.
Our takeTo highlight the synergy between low power IoT devices capable of running machine learning models on the edge and Indoor Solar Cells, we have built an application that uses a Seeed XIAO nRF52840 Sense that runs a machine learning algorithm trained using Edge Impulse and sends the inference values via BLE to a gateway. By using firmware optimized for low power consumption, Xiao manages to run for extended periods of time using the power.
The Hardware PickThe Seeed XIAO nRF52840 Sense is a tiny Bluetooth LE development board based on the Nordic nRF52840 chip. It features an onboard antenna, 6-axis IMU, PDM microphone, NFC, and USB Type-C port. The board supports both Arduino IDE as well as CircuitPython programming languages. This makes it easy to develop applications with complex logic or use existing libraries available in either language. Additionally, the board supports Motion Recognition based on Edge Impulse which allows users to sample raw data from its accelerometer sensor and build machine learning models from it.
The Epishine LEH3 - Evaluation Kit is an ideal choice for powering machine learning models on edge devices. This kit comes with a solar cell that has been specifically designed for indoor use and is capable of harvesting light from the surrounding environment in order to generate electricity. The LEH3 offers up to 3V of output power, which is more than enough to power an edge device.
Hardware SetupConfiguring the Epishine LEH3 - Evaluation Kit
For this application we will configure the Epishine evaluation kit to output 3.3v without battery backup by putting the switches in the position found in the picture.
Wiring
Solder two prototyping wires on the battery power pads on the back of the nRF52840 Xiao. Next, strip the end of the cables and apply solder on them to make them more rigid to be able to insert them in the output slot of the Epishine LEH3 - Evaluation Kit.
3D Printing the enclosure
Download the Evaluation Stand from here and print it. Afterwards, assemble the corners on the top part, pull the wires through the ball joint and insert them in the output port of the Epishine evaluation kit.
Software SetupProgramming the nRF52840 - Deploying the Edge Impulse model on the edge
The good folks over at Seeed studio provide comprehensive documentation regarding how to set up a simple Edge Impulse model on the XIAO nRF52840 Sense board.
Notes about low power applications
Given the amazing power efficiency of the XIAO nRF52840 Sense board it was an obvious choice to pair it up with the Epishine LEH3 - Evaluation Kit. In theory, this combination can open the doors to a plethora of self-sustaining IoT applications.
There are different methods that can be deployed to achieve the highest power efficiency. You can put the nRF into the low power mode and tell it to sleep between compute intensive parts of the code. This is certainly advised but we also recommend that for minimal applications to use either a Software Timer or a Timer Interrupt. These enable you to define functions that will run at a specific time. This functionality is incredibly useful because this way we can call the suspendLoop function. If the loop won’t start running that means our board won’t do anything while it waits for the Timers to call their respective functions which can lead to incredible power efficiency.
Unfortunately, this approach wasn’t compatible with our proposed use case, but despite this fact we were still able to lower the power draw by putting the nRF52840 to sleep inside the loop and calling the delay function which seems to draw very little power. We have still used a Software Timer for a simple blink so that we can have visual confirmation that the board is still powered on and doing good work while sending data over BLE.
Performance evaluation
Using the TSL2561 Luminosity Sensor from Adafruit we have set up a test environment with a constant light intensity of 3000 lux. Running the inference and sending the result through BLE is the most power intensive thing our board does so we need to make sure that between every run the Epishine has enough time to recharge. From our testing we have discovered that doing it every minute allows the board to run indefinitely for this particular testing scenario. Of course, you’ll need to adjust the time interval depending on your lighting conditions.
ConclusionThe combination of machine learning models on IoT devices and indoor solar cells provides a powerful solution for ultra low-power applications. By leveraging the power of light indoors, these self-sustaining systems can enable new use cases while reducing cost and improving reliability. With this article, we hope to have provided you with an insight into how you can leverage the potential of edge computing by combining machine learning algorithms with energy harvesting technologies such as indoor solar cells.
Comments