This simple little floating boat bounces off walls, can be steered with a flashlight, and won't hit something head-on.
Step 1: MATERIALS
hot glue + glue gun (silicon optional)
two small DC motors
two water bottles
two small propellors
arduino + USB cable + computer
a plastic box
a 9V battery + a connector
a power diode (like 1n4004)
a soldering iron + solder
a MOSFET transistor or TIP 120
2 few switches + 2 photocells
Step 2: Put the Motor in the Cap
2. Poke a hole in each cap
3. Apply hot glue to the inside of the cap, but not on the hole. Slip the motor shaft through the hole. When dry, the shaft should spin freely.
Do this with both bottle caps and motors.
Step 3: Tape the Water Bottles Together
Step 4: Solder Leads to the Dc Motors If There Are None
Solder on long (about 10") leads to the motors, if there aren't any.
Step 5: Cut a Slit in the Water Bottle
This is the hole through which the wires from the motors will poke through.
Step 6: Put on the Cap and Feed Through the Wires
Step 7: Make the Electronics House
Now, put a bit of hot glue on the holes you made in the bottles to make sure the bottles are watertight.
Step 8: Build the Circuit
It uses it to power a high current load because Arduino does not output enough amperage to turn the motors.
Follow this schematic for the first motor. Then, build the SAME circuit for the second motor, on the breadboard.
(You do not need a 9V battery second power source)
Step 9: Add Some Sensors
Ping Ultrasonic Rangefinder by Parallax works nicely on the front of the boat so it knows if something is in its path.
Photocells can act like antennas if you want a boat that steers towards light (for example).
I'm a fan of two simple switches, mounted on the sides of the boat, acting as obstacle detectors.
You can also modify the code and use some Infrared proximity sensors to detect short range obstacles
Step 10: Circuits for the Various Sensorsirc
See image for a circuit with a photocell with a 1K resistor: Do this twice, also, so that you can include a photocell on both sides of the boat. For more information and sample code, see the analog input example at www.arduino.cc/en/Tutorial/AnalogInput .
Step 11: Write Some Code or Download It
Here is my code for a boat with an ultrasonic sensor, two photocells, and two switches for obstacle avoidance
The way I have it operating is that if the boat approaches an obstacle ahead, it turns to avoid it. If the boat hits something from the side, it turns away from the barrier.
But here you can find various codes for the boat if you dont want to use all of the sensors, but just some of them https://github.com/gabriella/boat-
Or write your own.
Step 12: Box Everything
Step 13: Upload the Sketch
Select the correct board and correct port.
Compile and upload the sketch.
Step 14: Waterproof and Get Ready for Testing
Glue on the propellers to the motor shaft sticking out the cap.
test it out on the water!