Intro: Nascarduino (Laptop Controlled RC Car)
This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com). My name Victoria Carlos and I’m a freshman majoring in Computer Science. My project is called the “Nascarduino.” I wanted to use this RC Car project as a stepping stone in making more projects for the Arduino and beyond.
Step 1: Step 1: Materials
Step 2: Step 2: Setup and Build
We want the RC car to have a tilting head that is glued to the servo. With this in mind, we will 3D print a head for the servo. Additionally, we will 3D print a stick that can serve as a connector between the head and the servo (I wrapped a bunch of duct tape to ensure that the servo and stick will stay together). Next, we will drill holes to the box that we will use as a foundation for the wheels. Tip, I used the chassis to know where to drill the holes. It is important to drill a hole at the very center so we can utilize it as an opening for the wires of the motors. Additionally, although not shown in the images, I drilled to small holes at the front and back of the box so I can glue the led lights to it. For circuit purposes, I sautered the led wires to jumper wires. The box should be set up as shown above.
Step 3: Step 3: Circuit
Now for the complicated part (stay strong my friend):
For a universal GND: Connect a wire in the negative side of the breadboard to GND in the Arduino. (Note: it doesn’t matter if you have
For a universal 5v: Connect a wire in the positive side of the breadboard to 5v in the Arduino
Bluetooth Module to Arduino: Attach TX to RX, RX to TX, the GND to GND breadboard, VCC to 3v
Servo to Arduino: Yellow/Orange to pin output (I chose pin 10), Red to 5v breadboard, black to GND breadboard
LEDs to Arduino: Non bent side to GND breadboard, bent side to one side of a resistor
- The other side of the resistor should be attached to output pins
Misc to Motor Shield: Connect each side of a motor to an output (OUT) pin to the shield. For the 6v battery, connect the red to 12v of the shield and black to GND of the shield.
Motor Shield to Arduino: The motor shield contains four input (IN) pins that can be attached to the output pins in the Arduino. OUT1 will correspond with IN1 and so forth. For the circuit, I connected IN1,2,3,4 to the Arduino pins 9,8,7,6 (My actual project actually does the reverse order but it’s up to your choosing). Lastly, the GND wire in the shield should be connected to the GND breadboard.
To help explain on the circuit setup, there is a universal GND and 5v pin that is hooked to the breadboard since we have a lot of materials that will be connected to GND and 5v. The servo, where are tilting head will be attached, is setup at pin 10 so the code will call upon it when needed. For the leds, notice how each one is connected to a resistor at first (it’s not going straight to the Arduino pins). This is because we do not want the light to burn out so the resistor is there to absorb it then, in a separate wire, attach the Uno board. For the motor, the 6v battery is used to power the wheels alongside the Arduino. The Bluetooth module is wired to receive and send data to the controller (in our case, the laptop).
Step 4: Step 4: Code
Whew! You made it pass the difficult part. Now for a more relaxing part :)
Attached is the code for the Nascarduino. The code is fairly simple as it gives variables to the pins and uses the switch cases (instead of if-else statements) to dictate what variable does what depending on the key pressed. Actions are done with functions as simple as digitalWrite, etc.
Tip: When uploading the code to the Arduino, unattach the tx and rx pins first then put it back when it successfully uploads)
Step 5: Step 5: Software – Teraterm
Teraterm is a Bluetooth application you can easily download in your laptop to act as a controller. To connect device, power your car; then in the computer, add a device to the Bluetooth setting. After, in the teraterm application (ttermpro), check the serial connection (bottom) and choose your outgoing port (in my case, it's COM8) and press ok. The car should now be running on whatever keys you chose.
Tip: If, in the code, you put uppercase letters, the car will ONLY run when caps lock is on, etc. Teraterm is very case sensitive!
Step 6: Step 6: Result
The car should now be working! Thanks for reading guys and feel free to add/tweak features. This was my
first introduction to the Arduino, I have learned valuable skills from all the successes and failures in making this project. And most importantly, I had fun!