Greenhouse IoT Project – Part 1 – Power!
My plan is to make this greenhouse totaly independent with it’s own power. “With great power, comes great responsibility” someone said… And great power comes from the sun, in this case.
The introduction to this project can be found here: Greenhouse IoT Project – an app in Teams
The setup
In order to have some power for this setup I wanted to try out solar power. Sourced some new parts, and some used. Got the solar regulator for cheap second hand, and the battery (to store energy from the sun) did I have lying around from some years ago. Just needed to buy a solar panel and some connections for the battery. The cables I used are some 1,5mm2 speaker cable. For this amount of power it should be plenty. Concerned about safety I used a 10A fuse, the same type you use in cars.
I chose this controller because of two things. One of them is price, since I got it for cheap. And the second thing it can deliver power to a USB-device, and with enough current to power my ESP32 for whatever I need it to.
The most expensive part here is the solar panel, which is about 50$ (469,- NOK). Then I needed to mount this. My first thought was to mount it on the outside of the roof. But wait a second… The roof in the greenhouse is made of glass. That means I can mount it on the inside and make the install a lot easier!
So I did…
Nothing fancy here. Just a piece of wood it can rest on, and two small screws it can latch onto so it won’t slide any further down. Quite an easy fix!
Then I needed to find a place for the battery. The ESP32 micro controller does not draw a lot of power but it needs to have enough available power for when the sun doesn’t charge it, like in the night and other conditions with low light. Found this placement in one of the walls, under a window:
Hooked it up with a 10A fuse, so if anything goes wrong it doesn’t burn the place down. Should possibly cover the terminals at one point.
Then it was just a matter of mounting the controller, hook up the solar panel and test everything. And it just worked! In the picture under I’m even charging my phone. We have power! How neat!
An important piece
I forgot to check… Do I have Wi-Fi up here? Ehm… Luckily, my phone has Wi-Fi so it SHOULD work on the ESP32, right? Just one way to find out! This is where we get a bit nerdy again (phew!)
After some googling I found this cool project that turns my ESP32 into a Wi-Fi Scanner! Read more on this project here: https://github.com/espressif/arduino-esp32/blob/master/libraries/WiFi/examples/WiFiScan/WiFiScan.ino
I fired up the Arduino IDE (I use that one for my ESP32 programming). Copied in this code and sent it off to the micro controller. No errors, opening the serial monitor and voila! Some info:
Yes! It can see my IoT Wi-Fi. Nice! This confirms it should be able to connect to my network, and further out into the interwebs. Happy camper!
What now?
We have power, and we can see that the ESP32 have enough Wi-Fi signal to connect to my IoT-network. So in the next part we will actually hook it up and connect it to my Home Assistant installation and get going with the good stuff. So please stay tuned for Part 2 of my Greenhouse IoT Project.
Links
Links to hardware I’m using: