Micro:Bit Self Watering Planter
by Theinnovationclassroom in Circuits > Microcontrollers
1036 Views, 3 Favorites, 0 Comments
Micro:Bit Self Watering Planter
This project is a relatively simple self-watering planter that makes use of a soil moisture sensor to turn a pump on or off depending on the existing moisture in the soil.
Supplies
Moisture Sensor https://www.aliexpress.com/item/40000...
Hobby Pump Used https://www.aliexpress.com/item/32894...
Micro:bit Driver Expansion board https://core-electronics.com.au/micro...
Micro:bit v1 or v2
2x Female to Female Jumper Pins - Ali Express Link
Portable power bank or 3x1.5v AA power pack.
Dfrobot Driver Expansion board Extension Search link -
https://github.com/DFRobot/pxt-motor
Project Code:
https://makecode.microbit.org/_7vAP2V7DFbXy
Connect the Components
Connect the Micro:bit to the expansion board (The Pins should be facing out, opposite to the vector image)
Connect your soil moisture sensor to P1 and P0.
Connect your pump to the M1 controller (red to +ve, Black to -ve)
Plug in your power pack
Turn on your expansion board
Connect your Micro:bit to your computer using the USB cable supplied
Code Your Micro:bit
The code allows for an analogue reading to be taken between 0 and 1023. If the reading is below 777 (arbitrary moist soil limit) then the motor will turn on!
Once you have copied in the code, upload it to your micro:Bit and check that you can read the soil moisture and the pump turns on!
Watch the video link for further instruction on how the code works.
Test and Iterate
Edit your code and see how it affects your project!