9. Project 4: Automatic Irrigation (watering)¶
Level:
9.1. Part List:¶
Soil Moisture Sensor
Water Pump & Pipe X1
Multiple Sensors for plant X1
Multiple Actuators for plant X1
Connecting Wire X1
micro:bit X1
USB Cable X1
A glass of water X1
9.2. Description:¶
In project 4, you can learn how to watering the plant automatically by soil moisture detector.
9.3. Steps:¶
Basic (Add block on start) > Plant (Add block Initialize Smarthon multiple-sensor)
Functions (Make a Function > New function name: ) > watering_2_seconds) > Plant-More (Add block Set Motor pump to intensity 0, change “0” to “400”) > Basic (Add block pause (ms) 100, change “100” to “2000”) > > Plant-More (Add block Set Motor pump to intensity 0) > Basic (Add block pause (ms) 100, change “100” to “10000”)
Basic (Add block forever) > Logic (Add block if…then…else, add 1 more if…then…else, delete else) > For 1st if : Logic (Add block 0 = 0, change “0” to Plant “Get soil moisture”; “=” to “<”; “0” to “50” )
For then: Advanced>Functions (Add block call function watering_2_seconds)
For else if: Logic (Add block 0 = 0, change “0” to Plant “Get soil moisture”; “=” to “>”; “0” to “90” )
For then: Plant-More (Add block Set Water pump to intensity 0)
9.4. Hardware:¶
Connect Multiple Sensors and Multiple Actuators by connecting wire
Connect Water Pump and Pipe
Connect Water Pump & Pipe to Water pump (D6/P1) port of Multiple Actuators
Download the code and transfer to micro:bit
Plug the micro:bit into Multiple Sensors
9.5. Experiment:¶
How does soil moisture level affect seed germination?
Does soil moisture level affect the size of leave?
Does soil moisture level affect photosynthesis or respiration of the plant?
Does soil moisture level affect root growth?
Does water salinity affect plant growth?