Introduction: The Remote Arduino Bluetooth Love Boat, Exciting and New...

Picture of The Remote Arduino Bluetooth Love Boat, Exciting and New...

My son got an old RF boat on which the remote 47MHz control device is again and again broken. So I decided to build a new one with some additional skills:

- a more important remote range up to 1000 m in open areas

- a reverse drive when your boat is stuck with river weeds

- a power suplly with no special cells, only AA or R6 batteries

So, come on board...

Step 1: A Bit of Theory to Move a Boat:

Picture of A Bit of Theory to Move a Boat:

This boat is moved with 2 DC motors (permanent magnets). The different directions are explained on the datasheet above. The power supplied is made with 2 H bridges of MOSFET transistors. The voltage applied is a bipolar PWM as shown on the datasheet. The frequency used is very high (62500 Hz) so you can't hear any vibrations or whistling on the motors because 62500Hz is more than 20000Hz (max hearing freqency for humans).

When the average value of the voltage is

- positive, the DC motor rotates in one direction

- zero, the DC motor stops

- negative, the DC motor rotates in the other direction

Step 2: The Emitter (server):

Picture of The Emitter (server):

I used an atmega328p clone of Arduino link to a NRF24L01+PA+LNA in order to have a long range to communicate (1000 m max in wide and clear areas) and 2 joysticks. So, very cheap devices.

In the program I used:

- the Mirf library to send and receive data

- the FAST ADC method to increase the speed of AD conversion for both joystick

- a way to have a pseudo concurent Analog to Digital conversion with ADMUX registers

- a method to send messages in a frame: string array message->char array message->concat with interger to make the frame->send bytes of the concatenate frame.

- an external debugger (look at the pics) because when you use an USBasp (USB to SPI converter) the debugger doesn't work (it listens only COM port). So I used a Usb to serial converter like the µMB5 circuit, a level converter (RS232 3.3V->5V TTL) linked to RX (D0) and TX (D1) pins (see on the shematic). Then you can launch the debugger after you select the good COM port to listen. Now you can control and see what you send.

The frame sent is like this: "STOP_,0524,1023"

  • the first 5 characters: the direction : STOP_ , FW___ , RV___ , FWLFT , FWRGT , RVLFT , RVRGT
  • the second part: an integer free to use
  • the third part: an interger from 0 to 1023 for the speed set point RV to FW.

The frame is sent every 80 ms and with the skills descibed above, it gives a very quick and reactive remote control device.

Step 3: The Receiver (client):

Picture of The Receiver (client):

The receiver is made of:

- an atmega328p, programmed via USBasp and debugged with my special external debugger

- a NRF24L01+PA+LNA to bo paired with the emitter

- two H bridges of MOSFET canal N

- 4 circuits to control the MOSFETs (dead times, bootstrap): IR2302, because of its low voltage PWM input beetween 5V and 20V (around 10V for my receiver)

- 2 fuses: power circuit, control circuit

- 3 or 4 big capacitors of 4700µF each that YOU DO LINK ON THE PIN + AND - OF THE BATTERIES. If not, it doesn't work properly because of the big increase of current in the DC motors while they start. You need also to connect small capacitors of 10nF and 47nF on the motors to be prevented from HF parasites (see the pics above).

After several tests, the capacitors value (so high) for decouplings depends on your motors powers and your batteries quality but it's needed.

In the program I used:

- the Mirf library to send and receive data

- PWM on pin D5 and D6 with the special register TCCR0B to have a high frequency of 62500Hz. Its affects the timer 0 and some function may not work correctly (servo, delay and millis a little faster now)

- a method to receive messages and analyse the frame: byte recorded in a char array->string array to read the message->string to integer to read the set point of the speed

- a trick to reject the bad codes and to stop the boat when the emitter is off or under supplied.

- some settings to adjust the STOP state to 110 (0VDC average on the motors), max speed FW to 227(+VCC average on the motors), max speed RV to 3 (-VCC average on the motors), things you'll probably have to do with your own DC motor.

Step 4: The New Boat and How It Works:

Picture of The New Boat and How It Works:

Be carrefull of the good wiring of both DC motor in oder to have the good rotating direction.

I did a state diagram to explain how to use the joysticks and what happens when the boat moves.

Step 5: Conclusions:

You can fit the emitter and the the receiver on any devices which are moved with a DC permanent magnet motor. I used the schematic on previous projects.

Thanks to all people who publish very interesting tutorials and developp usefull scripts.

Comments

About This Instructable

3,598views

92favorites

License:

More by manu4371:Arduino-tomation Part 2Arduino 1.8.x Clone With Atmega 8535/32/644p/1284p: the MightycoreArduino PLC 32 I/O+State Machine+SCADA or HMI
Add instructable to: