Microbit Electric Garden

Microbit and Weatherbit + ESP

The Microbit is a very versatile little computing module. You can learn how to code using the device, while also using it as an interface to connect to sensors, receive data and send instructions. It has become a very successful tool in the Digital Technology teachers’ arsenal, as its relatively cheap, resources are easy accessible and very intuitive for kids to use. At a primary school in Porirua East, Wellington New Zealand, we have been using this Microbit along with the Sparkfun add-on to make a self-monitoring greenhouse. Some year 6 students took the initiative to build a garden for their classroom but wanted to go further as part of their Digital Technology integration. The teacher got in touch with our outreach team to help setup a system which could be easily monitored and accessed by students on a regular basis. The students designed the greenhouse and with the help of their school caretaker, constructed the frame while the amazing Sam Griffen, 3rd year student of Engineering at Victoria University of Wellington, got working on the hardware/software interface.

Setting up the Microbit and Sparkfun Weatherbit was fairly straightforward. The main issue we faced was whether we could beam out the data from the Microbit to all the student chromebooks with relative ease and least number of wires. The Microbit has a radio feature through which it connects to other Microbits which we could have used, except then we would need 26 more Microbits for the job, each of them plugged into power/ chromebook every time the students wanted to individually read out data. That sounded cumbersome and unmanageable. We decided to use the serial out on the Microbit to collect the data and send it over a network to a ‘server’ of some sort, which the students could all access just by opening up a web browser. Using a combination of scripting languages like HTML/CSS/JS (which we have shared on the hackaday repo below), the Microbit sends data to a ESP32 module (A tiny microcontroller for electronic projects which has WiFi capability). A small router acts as a network dedicated for this job, receives the data from the ESP32 module and students connect to this router via a fixed IP address and see the live readings. The browser updates every second but it can be set to whatever time you want.

Sam showing the tech

The data on the HTML page can be customized and the CSS does the styling as needed. The water pump feature is also made for working off a button alongside the automated timer. The next challenge is to power it off a Solar panel. We will source a 20 watt panel and a charge controller and along with a 12v sealed lead acid battery (a car battery would do) from Jaycar.

Showing the students the code was integral as they were going to run the code once we had set it up. The MakeCode interface makes it very easy for learning programming for the first time and students have used Scratch before, so it was a familiar environment. We didn’t worry about showing them the ESP code as it would complicate it for the students.


All components used in the project, circuit diagrams, along with some pictures are shared below. Please feel free to try it out in your school and share your experiences. We are on Twitter: @pravin_vaz and use #ECSOutreach to look up our adventures, or via email at pravin.vaz@vuw.ac.nz if you would like further assistance. The Outreach programme provided by the School of Engineering and Computer Science at Victoria University of Wellington provides free assistance to students and teachers. 

Link to the build: https://hackaday.io/project/174389-microbit-greenhouse-monitor

Microbit Electric Garden
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x