Introduction: BOATUINO

About: electrotehnician

Hi! I am presenting you my project BOATUINO for "Make it move contest" .

First thanks to all you who vote for this instructable!

BOATUINO- boat controlled by arduino. It is also my final work for the last year of school.

As a child I was allways fascinated with RC cars, planes and helicopters and I loved playing with them. But I never had an RC boat so now I decided to make one. This project has its own name ,logo and my personal logo. So please do not use them for your personal or other purposes.Thanks.

Step 1: MATERIALS:

MATERIALS USED FOR THIS PROJECT:

  • wood (for the boat)
  • tools ( drill, sand paper, sanding machine, exacto knife, glue,pliers, soldering iron...)
  • ELECTRONICS:
    1.) Arduino UNO ( any arduino will be fine) ,
    2.) LM298 DUAL H BRIDGE DC MOTOR DRIVER
    3.) DC Motor
    4.) Servo moto
    5.) Rain Sensor
    6.) Battery
    7.) Led diodes + resistors
    8.) Play Station 2 Wireless controller + reciever
    9.) RC boat rudder,shaft,propeller (parts for Feliun FT009)
    10.) Voltage Step Up module
    11.) wires

Here are photo examples for all electronic parts, you can order them from ebay, wish or any other site. If you need some links write me in comments.

Step 2: BUILDING THE FRAME:

The frame is builded from wood. There are 4 main parts shown on the second photo. All connected together make a great boat frame. frist I made a cubic hole in the wood and outlined the frame. I shaped it with an sanding machine. The parts were glued with wood glue. And in the end I sprayed the frame with colorless wood spray. And I added some stickers ( logos ).

Step 3: ELECTRONICS:

Here I uploaded the schematic for BOATUINO.
There is an 5V battery connected with a swtich, plus the battery is conected on an charging cotroller (from an old powerbank). After the switch I connected the Voltage-Step up module ( 5V DC to 12V DC) the 12V DC goes to the LM298 MOTOR DRIVER. Then on the LM298 built in 5V output goest to the "heart" of this project ( to the Arduino UNO) on arduino I connected 3 Lights ( Bled (Blinking led) LEDL(Led Light) and SLED (Signal led) LEDL2 is not used for now but it is in the code ), playstation 2 reciever (attention-D10, command-D11, data-D12, clock-D13). NOTE: the playstation2 reciever must be connected to 3.3V. servo motor is on D9 , and rainsensor. Rainsensor is used for protection, if water comes inside the boat, it sends signal and turns the signal light on. A small DC motor is connected to the LM298, it is used for Foward and Back direction. And the servo motor is used for turning Left and Right. The range for controlling the boat is 25+ meters.

Step 4: CODE:

#include<PS2X_lib.h>
#include<Servo.h>
PS2X ps2x; 
Servo LXservo;
int PS2 = 0; </servo.h></ps2x_lib.h></p><p>const int in1 = 2;    
const int in2 = 4;    
const int ena = 3;    
int fspeed;           </p><p>int BLED = 7; 
int LEDL = 8;
int LEDL2 = 5;</p><p>int rainsense = A0; 
int countval = 0; 
int SLED = 6;</p><p>void setup(){ 
  Serial.begin(57600);
  LXservo.attach(9);
  PS2 = ps2x.config_gamepad(13,11,10,12, true, true);   
  
  pinMode(in1, OUTPUT);     
  pinMode(in2, OUTPUT);      
  pinMode(ena, OUTPUT);</p><p>  pinMode(BLED, OUTPUT);    
  pinMode(LEDL, OUTPUT);   
  pinMode(LEDL2, OUTPUT);</p><p>  pinMode(SLED, OUTPUT);
  pinMode(rainsense, INPUT);</p><p>}</p><p>void loop(){
  digitalWrite(BLED,HIGH);
  delay(95);
  digitalWrite(BLED,LOW);
  delay(95);
ps2x.read_gamepad();</p><p>  if(ps2x.ButtonPressed(PSB_L1)) digitalWrite(LEDL, HIGH);
  if(ps2x.ButtonPressed(PSB_R1)) digitalWrite(LEDL, LOW);</p><p>  if(ps2x.ButtonPressed(PSB_L2)) digitalWrite(LEDL2, HIGH);
  if(ps2x.ButtonPressed(PSB_R2)) digitalWrite(LEDL2, LOW);</p><p>  
  if (ps2x.Analog(PSS_LY) == 128) analogWrite(ena, 0);
  
  if (ps2x.Analog(PSS_LY) > 128){
    fspeed = map(ps2x.Analog(PSS_LY), 129, 255, 0, 255);
     digitalWrite(in1, LOW);
     digitalWrite(in2, HIGH);
     analogWrite(ena, fspeed); 
  }
  if (ps2x.Analog(PSS_LY) < 128){
    fspeed = map(ps2x.Analog(PSS_LY), 0, 127, 255, 0);
     digitalWrite(in1, HIGH);
     digitalWrite(in2, LOW);
     analogWrite(ena, fspeed);
  }
  delay(50);</p><p> LXservo.write(map(ps2x.Analog(PSS_RX), 0, 245, 75, 105)); 
 delay(50);</p><p>int rainsenseReading = analogRead(rainsense);
                    if (countval >= 10){
                                       digitalWrite(SLED, HIGH); 
                                       }
                   if (rainsenseReading > 250){
                                             countval++;
                                             }
                   else if (rainsenseReading > 250){
                                                   digitalWrite(SLED,LOW); 
                                                   countval=0;  
                                                   }
delay(100);         
}</p>


First you need to downloat the Bill Porter PS2X library and then include it to arduino.

Step 5: DONE:

The boat is done, now you can MAKE IT MOVEon water.

If you need any help or suggestions feel free to contact me.

Make it Move Contest

Participated in the
Make it Move Contest