Arduino is an open-source computer hardware and software company, project and user community that designs and manufactures microcontroller-based kits for building digital devices and interactive objects that can sense and control objects in the physical world.These systems provide sets of digital and analog I/O pins that can be interfaced to various expansion boards ("shields") and other circuits.
Control your Arduino with voice commands using an Android smartphone! Before we make a bluetooth rover, we must first learn the basic principles of the experiment. This guide will let you command the Arduino using your Android smartphone and a HC-06 Bluetooth module.
How Does It Work?
Have you ever encountered Android's Rover Controller? Yes android has one and you can use it to control your Arduino, via Bluetooth. The App works by pairing your bluetooth module with your phone and then pressing the up, down, left and right for contolling the Rover. The app will then send data strings for the Arduino to process.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Parts and Materials
If your having trouble in finding them, I'm sure Amazon has all of them. If you are residence is not in the U.S and you want to buy online try searching on BangGood, Gearbest or DealExtreme.
Thing that you'll need:
Step 2: Assemble the Twin Motor Gearbox
Time to unbox the gearbox! Simply follow the instruction manual or just refer to the video tutorial below. The Tamiya Twin-Gearbox should come with two stock motors, grease, wrench, gears & housing.
HUGE REMINDER: USE THE "58:1" GEAR RATIO!
Tips & Reminders:- Grease the gears after assembling the gearbox. (not before)-
Don't forget the metal spacers, or the gearbox will screech.-
Go for the 58:1 gear ratio, it's faster than the 204:1 gear ratio.
I'll be posting my tutorial on the Twin-Gearbox assembly soon..
You can even use the Double Motor Gearbox but it will not fit in the platform therefore it is better to use the Twin Motor Gearbox
Sparkfun - Tamiya Twin Gearbox Assembly Tutorial Displayed Above
Step 3: Assemble the Track Set
After finishing the Twin-Gearbox's assembly, you can now unbox your plate and track set. When you open the track set, you'll find 1 gear wheel and 3 types of rollers. Don't follow the manual, we will be using a different configuration.
Steps [Simply Refer To The Photo or a Video]:
1st.) Mount the Twin-Gearbox by screwing it on the last hole of the plate set.
2nd.) Push the gear-wheel toward's the twin-gearbox's axle.
3rd.) Screw the 1st hole of the L-shaped mounts on the 6th hole of the plate set.
4th.) The largest roller goes to the 1st hole of the L-shaped mounts.
5th.) Mount the rear roller's mount at the last hole of the plate set.
6th.) The rear end of the plate set uses medium sized rollers.
7th. ) You won't be needing the small rollers.
Step 4: Mount the Arduino & Motor Driver
Simply screw the Arduino in place then stack the motor driver above it. Buy the smaller plate set or cut a piece of acrylic set if you want to suspend your Arduino. You can also use standoffs to replace the plastic suspender.
But since I don' t have a an Arduino Plate I have used double sided foam tape but its temporary.
Please note that while purchasing the motor driver make sure that you buy the L293D that I have mentioned , the reason is I tried using The Official Arduino Motor Driver and it didn't work as the pins are different and if you are using it you might have to make a lot of changes to the code.
Step 5: Connect the Bluetooth Module
You can buy the Bluetooth Module from DX.com, for $8, don't worry about the shipping, it's free. There's a gap between the Arduino board and Twin-Gearbox, better use that gap for the BT module or Add an universal plate on top of the gearbox using M3 screw sets and mount the Board and the BT module on to it.I used a blob of sugru to mount the Bluetooth module.
How Does It Work?
So far, I know that the app sends characters/ bytes to your Arduino board via Bluetooth (serial communication). Your Arduino, then decodes these by using conditional statements. (will be discussed on the programming page/ step)
- "TX of Bluetooth Module" goes to "RX of Arduino"
- "RX of Bluetooth Module" goes to "TX of Arduino"
- "VCC of Bluetooth Module" goes to "5v of Arduino"
- "GND of Bluetooth Module" goes to "GND of Arduino"
Upgrade would be useful :
Better upgrade the Bluetooth with a RF/ xBee/ WiFI transceiver for a longer range of transmission but if you prefer using a smartphone and app, you can stick with the BT module, although you would have a limited range of 20m.
Step 6: Mounting the FPV Camera
In this project I haven't added the FPV but if you want to do refer the steps below
First-person view (FPV), also known as remote-person view (RPV), or simply video piloting, is a method used to control a radio-controlled vehicle from the driver or pilot's view point. Most commonly it is used to pilot a radio-controlled aircraft or other type of unmanned aerial vehicle (UAV). The vehicle is either driven or piloted remotely from a first-person perspective via an onboard camera, fed wirelessly to video fpv goggles or a video monitor.
FPV' s are great for long range uses but Today I am just presenting it you guys for a better experience.
To use an FPV you need to have a transmitter and a reciever. You can get one from amazon.I bought Boscam transmitter and reciever combo. Its great one.You will also require a battery for powering up the camera.
Step 7: Connect the Battery
Lithium Polymer batteries are probably the most powerful batteries existing today. They are small in size, has a very high battery capacity, and has a high "c" rating. LiPos are also 7x-10x more power than AA (NiCd/ NiMH) batteries.
Risks Of Lithium Polymer:
We all know that Lithium-Polymers bloat, and when they bloat they start to become useless. LiPo batteries are high maintainance batteries that need to be recharged once in every 2 weeks otherwise they'll bloat. LiPos also need special balancing chargers, trickle chargers would destroy them.
You can also use a normal phone power bank by connecting it to the arduino using The USB cable provided.
Step 8: The Arduino Codes (C++)
Simply upload the sketch to your Arduino. If you have a Sainsmart Motor Shield, the codes would work like magic! BTW, you'll need to download and install the library in order for the codes to work.
The code is also uncomplicated.
- To control the motors, I used the library .
- The communication between the smartphone and the Bluetooth module was done using the serial communication arduino.
- The app "Bluetooth RC Controller" send to the bluetooth module the following commands:
- Forward -> F
- Back -> B
- Left -> L
- Right -> R
- Forward Left -> G
- Forward Right -> I
- Back Left -> H
- Back Right -> J
- Stop -> S
- Front Lights On -> W
- Front Lights Off -> w
- Back Lights On -> U
- Back Lights Off -> u
- Horn On -> V
- Horn Off -> v
- Extra On -> X
- Extra Off -> x
- Speed 0 -> 0
- Speed 10 -> 1
- Speed 20 -> 2
- Speed 30 -> 3
- Speed 90 -> 9
- Speed 100 -> q
- Stop All -> D
In this project was used just the basic commands: Forward, Back, Left and Right. The entire code is available for you to download.
APP Download: Arduino Bluetooth RC Car(Android Only)
1st.) Download App in google play
2nd.) Turn your bluetooth on, and open the app
3rd.) Establish a bluetooth connection betweeen your phone
Go to Settings> Press Connect> Press LINVOR (Your BT Device)
4th.) Wait for the red light to turn green. And Your'e Done!
Step 9: You Are Done
Now you have all you need to build your own robot controlled by a smartphone via Bluetooth. Easy and Fun.
Ideas for improving the current version:
- Adding ultrasonic sensors for obstacle avoidance
- Adding Xbee Modules for long range drives
- Adding FPV for real time live camera feed
- Improving Chassis by adding suspensions
- Upgrading Motors for a faster experience
- Upgrading motor shield to Pololu Dual VNH5019 for adding high powered motors
Participated in the
Arduino All The Things! Contest