A heavy rainstorm can cause an overflow to happen over our: pavements, rainwater wells, polders and our dikes. To prevent this from happening, we invented a rainwater sluce! The rainwater sluice calculates digitally the distance between the rainwater level and the sensor. If the distance becomes too small, the rainwater level will be lowered by opening the sluice via a motor. This is a way to automatically prevent rainwater overflow to occur!
Step 1: Setting Up Ultrasone Sensor
The image shows a schematic of how to set up an ultrasone sensor with an arduino. Link the VCC with either a 3 V or a 5 V power output. Link the GND of the sensor with the GND of the arduino. Link the TRIG and the ECHO outputs of the sensor with the preferred digital input on the arduino.
Step 2: Setting Up Motor
The motor used in our example is a Servor TG9. Another motor of your own preference can also be used.
The image shows how to link your motor with the Arduino. Link the red cable with either a 3 V or a 5 V power input of the Arduino. A 5 V power input is prefered, this is due to the motor gaining more power to close the sluice better.
Link the brown/black cable with the GND of the Arduino and link the yellow cable with any digital input of the Arduino.
Step 3: Particle Build Code
The image shows the code used for the rainwater sluice in the Particle Build.
The distance that is measured is in centimeters. The unit of time used in the code is in microseconds.
The digital inputs can be changed to the set up used by your own preferences. The eventname can also be changed to any name you desire.
Step 4: Equipment List
Equipment used for the rainwater sluice consists of:
- A plastic basket
- Wire with low friction (e.g.: dental floss)
- A thin metal bar
- A small weight to close the "sluice" (e.g.: plastic coin)
- Bar to put the ultrasone sensor on
Step 5: Cut the Sluice
Cut a square/rectangular opening in the plastic basket near the bottom just like the picture.
Do NOT make a full opening! Cut it so that you can close the opening by putting pressure on the "gate".
Make a small opening in the gate with a scissor or knife. This opening is used put the wire through.
Step 6: Putting in Metal Bar
Drill the metal bar at the bottom of the plastic basket, opposite of the sluice.
This metal bar is used later on to create tension in the wire.
Step 7: Duct Taping the Motor
Tape the motor against the plastic basket at the top, above the metal bar.
BEWARE of the rotation! Check beforehand in which direction the motor decreases or increases the tension of the wire. Tape your motor in such a way that tension will decrease when the motor is activated!
Step 8: Knotting the Wire
Now for the difficult part!
Knotting the wire can be quite tricky. Start of by putting a knot around one wing of the motor.
Second, lower the wire and put it under the metal bar. You can wind up the wire around the metal bar to create extra tension in your wire!
Third, put your wire through the hole in the "gate" created in step 5.
Lastly, connect the end of this wire with your small weight in such a way that the sluice is now "closed" due to the pressure of the weight against the sluice gate.
Make sure your wire is knotted in such a way that the tension in the wire is high and the sluice is now "closed".
Step 9: Placing the Ultrasone Sensor
Tape your ultrasone sensor on the bar in such a way that the TRIG input and the ECHO output are pointed downwards towards the bottom of the plastic basket.Then, put this bar on top of the plastic basket in such a way that the soundwaves can have a clean bounce of the surface!
Step 10: Measure Your Max. Rainwater Level
Measure at which level of rainwater you want to open the "gates". This can be done by using the ultrasone sensor or by using a ruler.
Then, put the preferred distance in your code. At this distance, the motor will activate and it will loosen the tension in the wire. This causes the gates to open!
Step 11: Rainwater Sluice Complete!
Add water to the plastic basket and test if your gates will open at the preferred distance.
After this, your rainwater sluice is complete!