Close

Firmware Design

A project log for SOL: Long-term solar intensity sensing

SOL is a project to develop a solar powered, connected solar intensity sensor (also known as a pyranometer)

jake-wachlinJake Wachlin 06/13/2018 at 01:360 Comments

Thanks to the hard work be many people getting ESP32 working for Arduino, most of the bits and pieces of firmware I will need for this project seem to have been developed. To name a few:

The firmware for the breadboard prototype is very simple. My WiFi SSID and password are hardcoded, and the ESP32 sends data through IFTTT to a Google Sheets spreadsheet. To calculate power, it uses the ADC and DAC interfaces. Between samples, it enters deep sleep for 10 minutes.

While I have experience developing firmware, I have very little to no experience in web development, so I will need lots more research on how to handle the networking side of things. My initial vision for program flow is something like this:

Assume system is brand new...

Deep sleep until button touched, then set up SoftAP mode on ESP32. Connect to ESP32 network on phone/laptop, and allow user to provide their network SSID and password.

ESP32 saves correct SSID and password information, and goes to sleep.

Every N minutes (maybe 10?), the system wakes up, with radio off, and samples the solar power. It saves the measurements on EEPROM. Every M samples (maybe once per day?), the system connects to WiFi and uploads its data somewhere. 

The user can then, either on a web app or phone app, view data on their system.

Large questions remain. Where to send data? Set up my own server/API on e.g. AWS? Use one of the numerous IOT data storage services? I've never done any of this before, but why do a project with only things you know?

Discussions