วันอาทิตย์ที่ 11 มิถุนายน พ.ศ. 2560

Bluetooth RC car controlled by Aduino via Android Application


       The instruction introduce to build a radio controlled car by Bluetooth connection with Arduino controller via Android application.

       The steering motor and driving motor are operated by TB6612FNG dual motor drive module.

Materials and Tools
Materials
1.RC car toy.









2.Arduino NANO









3.HC-06 Bluetooth module for Arduino.


4.TB6612FNG Dual H-Bridge motor drive module.













5.Dupont wires 


6. 2-LEDs(White for front light and Red for rear light)
 

7. 2-Resistor 1 kohm. 1/4 watt.













8.Piezo buzzer.













9.Diode 1N4004
10.IC Regulator 7805
11.Capacitor 22 microF.
12.Capacitor 47 microF.
13.DIY PCB












14.Wires


15.JST pig tail
16.Pin header
17.Shrink tube

18.Velcro
19.2s Lipo Battery 7.4 V.


Tools
1.Screw driver
2.Plier
3.Fixing material : screws
4.Soldering gun
5.Soldering wire
6.Soldering paste

Hardware assembly & Electrical wiring

1.Dismantle toy radio control board and cut some unuseful plastic for preparing DIY PCB space.
2.Install and solder Arduino NANO,Buzzer,TB6612FNG module on DIY PCB.
3.Install LEDs front and rear lights on car body.
4.Wiring all components together as circuit diagram.
Caution : Making good soldered ground,otherwise many false will appear.
Arduino pins to HC-06 :
0 - Tx
1 - Rx
2 - State
GND - GND
VCC - 5V supply

Arduino pins to TB6612FNG motor drive module :
12 - BIN2
11 - BIN1
10 - STBY
9 - AIN1
8 - AIN2
7 - backLights LED
6 - Buzzer positive+
5 - PWMB
4 - frontLights LED
3 - PWMA

TB6612FNG motor drive module :
VM - Battery positive+
GND - Battery ground - NANO's GND
A01 - Driving motor
B01 - Driving motor
A02 - Steering motor
B02 - Steering motor

The sketch code and Android application
Arduino sketch code :
1.Down load TB6612FNG library from SparkfunGithub and add to Arduino IDE.
2.Down load sketch.ino from Github.
2.Upload sketch to Arduino controller.(Before click upload ,it's necessary to take HC-06 Bluetooth 5V. power off)

Smart phone/Tablet Android application installation :
1.Open Google play store.
2.Install Arduino Bluetooth RC Car application on smart phone.
Bluetooth HC-06 with smart phone Connection :
1.Open Android setting to connect bluetooth device.
2.Pairing Bluetooth communication between smart phone and HC-06.
 2.1 Scan for device and make pairing.Default password of HC-06 is "1234".
 2.2 Open application and click Bluetooth connection button to connect to RC car.
 2.3 If communication complete,green light should appear.If communication does not complete,red light will blink.Try to pair device again.
3.Playing RC car ,testing every function.