Introduction: Connected Flowerpot for Micro:bit
This flowerpot is made with 3D print and have a microbit card in it.
This pot contains a micro: bit card housed under the soil container. This receives the information from the soil moisture sensor (conductivity).
Transcription of the soil moisture value is done by means of a ring of 20 RGB (red, green, blue) programmable LED located on the front.
Step 1: Components
- micro:bit card :
https://www.seeedstudio.com/micro-bit-p-2886.html
- Grove Shield for micro:bit :
https://www.seeedstudio.com/Grove-Shield-for-micro...
- Grove moisture sensor :
https://www.seeedstudio.com/Grove-Moisture-Sensor....
- Grove RGB LED ring (20 - WS2813 Mini):
Step 2: 3D Print
I wanted to make a flowerpot that had a storage for the micro:bit card. I used Fusion 360 to draw it.
Download the STL file, you may find mine at thingiverse: https://www.thingiverse.com/thing:4031468
Print the led cap and the pot. Don't forget to add supports. For the parameters, I used : 0,2 mm and infill at 25%.
After it is done, remove carefully the supports from the cap, and from the pot.
Step 3: Assembly
- Insert the Grove pin and cable of the LED ring into the space provided.
- Glue the cap onto the LED ring with cyanoacrylate.
- Attach Grove cables from the soil moisture sensor and LED ring to the shield.
- Insert the micro: bit card.
- Attach a velcro strap to the battery compartment to attach it to the back of the pot.
Step 4: Programming
For programming, I used Vittascience website : https://en.vittascience.com/microbit/
In "on start" part :
Define a variable 'led' for the LED ring. It have to be 20 minus 1. It counts from zero for the first LED.
Then, in the "repeat indefinitely" part, insert a variable 'moisture' that recovers the value of the sol moisture sensor, connected in P0.
Insert a condition with as a threshold of value 300.
if there is a value less than 300, display on the ring of LED, the red color in P1 port.
else, for a value greater than 300, display on the ring LED, the color blue in P1.
[note, the soil mositure sensor mesure conductivy between the two pins. The sensor output value in dry soil is less than 300]
Download the program and copy on the card.
You can find a downloadable program at: http://en.vittascience.com/microbit/?mode=blocks&l...
--
Thank you for reading my tutorial, I hope it generates inspiration! Feel free to contact me and tell me about your creations, happy tinkering :)