I created this project after a few allegedly easy-to-maintain house plants met their demise at my hands. A combination of too much/too little sun, water, or low temperatures were always the culprit - and I wanted a simple integrated way to track and display hourly/daily/weekly light, moisture and temperature exposures for the plant. I wanted the planter to be capable of battery or wall power, and overall to be aesthetically pleasing enough to sit on a desk. With the ability to track key plant vitals, I can easily make the necessary adjustments to the plant location and watering schedule.
Video 1 | Video 2 | |
This project is built on the Silicon Labs BG22-EK4108A microcontroller board.
Board and battery | Board and display | Board in box | ||
Other parts and materials include:
Schematic | Bottom part | Top part | Assembly | |||
The software focuses on three objectives: data gathering, displaying that data, and accent light control. The software utilizes a 1 second interrupt from the HDC2080 Sensor data available as the core ticking time unit. Once data is available, the main application structure is called. Temperature, humidity and ambient light (lux) are assigned from the sensor, and from there the respective readings are loaded into different arrays to log them (and compute averages). With the core unit being 1 second, roll-up functions are used to place the average temperature/humidity/light values into the minute array (once a minute has passed), then from there the hour array, and from there the day array up to a week.
From there the main structure moves to displaying information on the integrated OLED display. The display has 5 phases, and the information that is displayed will shift every 5 ticks. The first phase displays current readings for temperature, humidity and light. These are real-time readings. Displaying this information is done in an upscaled font for legibility. Once enough time has passed, the next phase will display (again, on a 5 second rotation) displaying the prior minute's averages for temperature, humidity and light. The same process continues for hours, days and finally the weekly average data, each phase displaying for 5 seconds (provided there is valid data within that time frame). Phases are "gated" to only show once enough time has passed.
The last objective handled by the main structure is to toggle the accent light. This is done conditionally if the ambient light sensor detects that it is dark in the area. Toggling is completed by PushPull mode and PinOut, and the LED is soldered to Port A Pin 0 on the main controller board, in series with a resistor.
Home temp | Street temp | |
To create plant hardware I used Bambu Labs P1S 3D Printer, Einstar Vega 3D Scanner, Bambu PLA Marble/Basic Filament, and Plasticity Hard Surface Mod.
3D models | Bottom part | Middle part | Top part | |||
I really enjoyed this project, and it's something I had wanted to complete even prior to taking this class. In retrospect, I would have scaled back my ambition, because in addition to the coding portion, the 3D modeling portion took a significant amount of time. Multiple prototypes were needed, and measuring was important for a clean end result. Also, this was my first time soldering on sensitive electronics, and that was also time consuming but was an amazing opportunity to learn. Going forward, I'll likely spend more time developing interesting animations for the display and possibly add wireless data access via Bluetooth along with a web interface. Overall, I'm very satisfied with the result, and I anticipate I'll continue to utilize microcontroller development for various projects around the house - it's definitely a new hobby I enjoy, and I'm grateful for the exposure through this course.