Open Arduino

Enter Your Project for a chance to win a grand prize for the most innovative use of Arduino or a $200 shopping cart! The Birthday Special: Arduino Projects for Arduino Day!

Back to The Project14 homepage

Project14 Home
Monthly Themes
Monthly Theme Poll

 

Cycloboat is a recycled boat robot that uses plastic bottles to float on water.

It can detect objects and avoid it using ultrasonic.

 

I will be posting more videos with some more description later.

 

1. Right Angle Gear Motor: voltage is 4.5-6V with a no load current of 190mA, output shaft is 9mm long and the gearbox ratio is 48:1 with a wheel speed of 140 RPM (unloaded)

2. Dual Ball Bearing Hub

3. Arduino Uno as a brain and control system of Cycloboat

4. L298N Motor Drive Controller Board Module Dual H Bridge.

5. Ultrasonic Module

6. Batteries 4 x 1.5v each total of 6v dc

7. Fan recycled from old fan

8. Sealed wood box.

9. Aluminum Pole and mounting channels hub.

10. Recycled plastic bottles X 3.

Figure (1): Right Angle Gear Motor

Figure (2): Dual Ball Bearing Hub

Figure (3): ARDUINO UNO MCU ATMEGA328p

Figure (4): L298N Motor Drive Controller Board Module Dual H Bridge.

Figure (5): Ultrasonic Module.

Figure (7): Fan recycled from old fan.

Full System

Code:

 

$regfile = "m328pdef.dat"
'$regfile = "m16def.dat"
$crystal = 8000000




Config Pind.2 = Output : Dc1 Alias Portd.2 : Reset Dc1
Config Pind.1 = Output : Dc2 Alias Portd.1 : Reset Dc2


Config Pind.3 = Input
Config Portd.4 = Output
Portd.3 = 0
Portd.4 = 0
Dim Distance As Word , W As Word , I As Byte


'-----------------------[LCD Configurations]




Distance = 0
Cls


Do
Pulseout Portd , 4 , 20                                     'Min. 10us pulse
'Waitms 100 'meant for testing error
Pulsein W , Pind , 3 , 1                                    'read distance
Incr I
If Err = 0 Then
W = W * 10                                                  'calcullate to
W = W / 58                                                  ' centimeters
'W = W / 6 ' milimeters
Distance = W
Gosub Move_backward : Waitms 200
Else
Distance = 0
Gosub Move_forward : Waitms 200
End If






Waitms 200
Loop
Return


'--->[Move Renbot with 4 motors forward]
Move_forward:


   Set Dc1 : Reset Dc2
   Waitms 100
Return
'-----------------------


'--->[Move Renbot with 4 motors backward ]
Move_backward:


   Reset Dc1 : Set Dc2 :
   Waitms 100
Return
'-----------------------

 

First test: