This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)
If you are like me enjoy all things cars, then this instructable is for you. For this project, I set out to design a platform which I could continue to add more and more features that all satisfy my need to tinker and also enjoy my interest of cars at the same time. While an RC car is nothing new, a bluetooth "RC" car is a challenge, and even more so when designing an entire chassis, drive system, and electronics along with the bluetooth communication. So seeing as we have a lot to go over, lets get started!
Step 1: Parts List
Arduino UNO R3 Development Board (ATmega328P) x 1
DC 130 Electric Motors x 2
L293D Motor Driver x 1
Tiny Breadboard (17 row) x 1
9 Volt battery x 1
9 Volt battery connector x 1
HC-05 Bluetooth Module x 1
670 Ohm Resistor x 2
Jumper Wire Assortment Set x 1
One foot of 22 Gauge Wire x 1
3/32" diameter rod (12 inch length) x 1
Electrical Tape x 1
Andriod Powered device x 1
Step 2: 3D Printed Parts
Now lets go over the 3D printed parts I made for this car.
The first was the basic frame/structure. Nothing too crazy here. Just a simple platform in which to begin this project which holds our microcontroller, both DC motors, our breadboard, and the battery. Also attached to this chassis is all the mechanisms to fasten everything we need to the car.
The next bits are the pieces needed to hold some of our parts in place. The battery holder is specifically designed to hold down our microcontroller and support the battery while still being compact in design. The other piece is our motor hold down. Its only job is to, obviously, hold down the motors. This is a tight fit, but don't worry, it does the job just fine.
Next we have the wheels. Two for the front and two for the back. Simple right?!
The final piece is just for show. It is the body cover to hide our parts and give this project some flash. It also attaches to the existing mounts on the chassis.
Step 3: Assembly
Now that we have our parts printed, we can begin fitting our parts to the chassis. Lets start from the back and work our way to the front of the car.
To attach the DC motors, we slide the shaft through the support ring on each side of the back of the chassis. Once both are fitted, we can use the motor stay to secure them to the chassis. Press hard to ensure motor stay mates flush with the chassis to ensure proper fitment. Now before mounting each rear wheel, wrap the contact surface once or twice with the electrical tape. This is only to allow for additional traction between the wheels and the road.
To attach the microcontroller, line up the four holes in the microcontroller to the four posts on the chassis and slide down until mated to the chassis. Next, do the same with the battery holder. This will hold the microcontroller in place.
To attach the front wheels, we need our 3/32' diameter rod. I chose aluminum but steel would work well also and be less likely to bend should you get a little too much air and have a rough landing. Cut off a piece of rod approximately 60mm in length. Once finished, you can slide the rod through the front axle holders and attach the front wheels.
We now have a rolling chassis!!!
Step 4: Wiring
Before we being, we need to make a quick modification to our mini breadboard. It's actually too big for us so let cut it in half! Find the middle row (it will be row 9 when counting either way) and cut it in half there. Perfect!
As shown in the circuit schematic, we will use one half of the now half-size breadboard on one side of the microcontroller and the other on the opposite side. Using the tape on the back side of the breadboards, adhere both to the chassis about 1/4" in front of the rear wheel as shown in the picture. Also ensure that these are snug up against the sides of the microcontroller.
As you perform your wiring, take your time and route the jumper wires in the most efficient way possible to ease headaches. It takes some patience but once done, a clean wiring set-up is far easier to work with.
When connecting the two DC motors, you may need to extend the leads. Use a splice made from the 18 gauge wire and solder in what you need.
Ensure that the 9 Volt battery has positive lead going to both the microcontrollers Vin pin and the correct pin on the motor driver chip.
Step 5: Bluetooth App
Download the Keuwl App on your Android device.
Once downloaded, power on the microcontroller. The HC-05 bluetooth module should now be blinking fast showing that it is in pairing mode. Open the Keuwl App and connect to the bluetooth module. I also suggest going into the app settings and turning on the Auto Connect and Auto Run features. Once done and connected to the RC Car, tap the reset button on the microcontroller. This will push the correct layout to your device. It should look like the image above.
Step 6: Control System
The fundamentals for controlling the system is fairly straight forward. We desire to use two motors to drive and steer our car. To do that we need the L293D Motor Driver chip for proper control. To use the chip, we have our microcontroller which can be programmed to the various pins of the chip. Now to control when the microcontroller activates the pins, we have our smartphone app. In order for this to communicate to the microcontroller, we need a middle man. This is where our HC-05 Bluetooth unit comes in. It is a basic control system to allow for quick fun.
Step 7: Arduino Coding
To program the microcontroller, you will need to download Arduino. I have included my file that will run the car and load the control panel in the app. I have also commented the code for troubleshooting also.
The code begins by setting some pin numbers to their respective motor driver chip names. I also created some local variables needed for driving the motors.
In the setup, we are setting the pins all as outputs as we are going to be sending commands to the motor driver chip.
The loop contains our control panel function commands. These are all if-statement based commands that are looking for the values set in the app to perform the desired functions. Each of these statements calls a set of void functions that are used to set the respective pins as high and low for motor direction and also send out our PWM for motor speed.
Step 8: Enjoy!!!
Now that we have our unit assembled, wired and programmed, you should be good to go for some fun. You can choose whether you want to use the body cover or not as it is not required to function properly and purely for aesthetics. Should you chose to use it, simply slide it onto the four posts as before with the microcontroller and the battery holder.
I hope you enjoy using this car as much as you'd probably enjoyed making it!!!
(((NOTE: Currently troubleshooting some interference problems from the motors. Will find a solution and post the fix once found.)))