Smart Bridge - Automatic Hight increase when flooding | Best science Project
Table of Contents
Introduction
In this tutorial, we will build a Smart Bridge that automatically adjusts its height based on water levels, making it ideal for areas prone to flooding. This project combines electronics and programming using an Arduino, servo motors, and sensors to create a functional and innovative solution.
Step 1: Gather Required Components
Before starting your project, ensure you have the following components:
-
Arduino Uno
-
2x Servo Motors
-
Soil Moisture Sensor
-
Sunboard Sheet
-
Jumper Wires
-
Breadboard
-
Basic Materials
- Soldering Iron
- Soldering Wire
- Glue Gun
- Glue Sticks
- Electric Tape
- Cutter Blade
- Tweezer
Step 2: Assemble the Components
-
Set Up the Arduino
- Connect the Arduino Uno to your computer using a USB cable.
-
Connect the Servo Motors
- Each servo motor should be connected to the Arduino. Typically:
- Connect the power wire (red) of the servo to the Arduino 5V.
- Connect the ground wire (black or brown) to GND.
- Connect the control wire (yellow or white) to a digital pin (e.g., pin 9 and pin 10).
- Each servo motor should be connected to the Arduino. Typically:
-
Install the Soil Moisture Sensor
- Attach the soil moisture sensor to the Arduino:
- VCC to 5V
- GND to GND
- Signal pin to an analog pin (e.g., A0).
- Attach the soil moisture sensor to the Arduino:
-
Build the Bridge Structure
- Use the sunboard sheet to create a bridge structure that can be raised or lowered by the servo motors.
Step 3: Write and Upload the Arduino Code
-
Obtain the Code
- You can find the Arduino code for this project here.
-
Upload the Code
- Open the Arduino IDE, copy and paste the code, and upload it to the Arduino board.
#include <Servo.h>
Servo servo1;
Servo servo2;
void setup() {
servo1.attach(9);
servo2.attach(10);
}
void loop() {
int moistureLevel = analogRead(A0);
// Logic to adjust height based on moisture level
if (moistureLevel < threshold) {
servo1.write(180); // Raise bridge
servo2.write(180); // Raise bridge
} else {
servo1.write(0); // Lower bridge
servo2.write(0); // Lower bridge
}
delay(1000);
}
Step 4: Test the Smart Bridge
-
Power Up the System
- Connect the Arduino to a power source and observe the servo motors.
-
Simulate Water Levels
- Use a container with water to test the soil moisture sensor. The bridge should rise when the sensor detects low moisture and lower when moisture levels are adequate.
-
Adjust the Threshold
- Modify the threshold in your code as needed based on your testing results.
Conclusion
You have now built a Smart Bridge that automatically adjusts its height based on water levels. This project not only demonstrates fundamental principles of engineering and programming but also offers a practical solution for flooding issues. For further enhancements, consider adding features like remote monitoring or alerts. Happy building!