Introduction: Arduino Robot From Wheeeebot RC Car
Want to get started with robots and Arduino's but don't know where to go? Here's a quick way to build a robot using an RC car, an Arduino UNO and a Motor Shield from SeeedStudio. The fun thing about this build is that the Wheeee-mote car only has one motor in it. The gearbox is designed so that when the car goes forward, it goes in a straight line. When the motor runs in reverse, the car spins to turn. The car does not back up.
Step 1: Items Needed
The items I used in this build are:
1. B. Toys Wheeee-mote RC Car
2. Arduino Uno
3. SeeedStudio Motor Shield
Assorted Tools
Step 2: Disassemble Your RC Car
The Wheeee-mote RC car is held to together using 4 screws located in the bottom of the car. Remove these screws to separate the top half from the bottom half.
Step 3: Prep the Car for the Arduino
Once the car is separated, your going to unscrew and remove the circuit board. Using snips your going to cut the wires that run to the circuit board as close to the board as possible. Now that the circuit board is removed your going to remove the speaker located in the front. Two screws and your good to go. Now finally your going to use your snips to cut the two plastic post located inside the frame of the car. You need to remove these to fit the arduino in.
Step 4: Fit and Wire the Arduino
Place the Motor Shield on the Arduino and bring the board set into position. Make sure the connections for the motors are facing the front of the car as shown. Now it's time to strip and attach the wires. Your going to wire up the two wires that come from the motor to the Motor A connections located on the Motor Shield. Next your going to wire up the power connections. When I first wired this up I didn't use an extra battery pack and I found that the 4 onboard batteries didn't have enough power to work with the arduino and shield, so I attached an extra battery pack in series with the battery pack located on the car (I got this battery pack from Radio Shack).
Step 5: Modifying the Top of the Car
Reassembly time. First I used some velcro to attached to the bottom of the arduino to hold my board in the car. Next I placed the lid on top to find out where to cut it. I cut the top body all the way up to the top of the windshield. I use a scroll saw to do this but there are lots of other ways to cut it. Once cut, I placed the body on and reattached the screws.
Step 6: Finished Car and Coding
Here it is. I placed the extra battery pack on top and velcro'd it into place. Next I used the following code to test my car:
int pinI1=8;//define I1 interface
int pinI2=11;//define I2 interface
int speedpinA=9;//enable motor A
int spead =127;//define the spead of motor
void setup()
{
pinMode(pinI1,OUTPUT);
pinMode(pinI2,OUTPUT);
pinMode(speedpinA,OUTPUT);
}
void forward()
{
analogWrite(speedpinA,spead);//input a simulation value to set the speed
digitalWrite(pinI2,LOW);//turn DC Motor A move anticlockwise
digitalWrite(pinI1,HIGH);
}
void backward()//
{
analogWrite(speedpinA,spead);//input a simulation value to set the speed
digitalWrite(pinI2,HIGH);//turn DC Motor A move clockwise
digitalWrite(pinI1,LOW);
}
void stop()//
{
digitalWrite(speedpinA,LOW);// Unenble the pin, to stop the motor. this should be done to avid damaging the motor.
delay(1000);
}
void loop()
{
forward();
delay(2000);
stop();
backward();
delay(2000);
stop();
}
Step 7: What's Next
Okay this was a fun start but the car just goes forward for about 2 seconds, stops , turns for 2 seconds and repeats. I think I would like to add an ultrasonic sensor so the car could navigate around a room. RC cars are a great platform to start with especially after the remote is lost. :)