Keywords: Baja, Buggie, Mini, Living Room, Channel, Radio, PWM, Duty Cycle, Circuit, Transistor, MOSFET, Diode, Digital, Analog, Pin, pulse, serial, Perf Board
Picture compliments of http://www.treehugger.com/cars/the-car-an-anatomical-journey-video.html
The photo depicts the complexity of this project that appears to be extremely straightforward and quick to complete, which allows one to
understand the underlying complexity of this project. The big picture problem is that radio controlling an object requires knowledge and skill in multiple fields of engineering and manufacturing. Solving this partially or completely is important
because these skills form the basis for controlling almost any device in the current technological paradigm. This tutorial shows you how to
build a Living Room Baja Buggie first presented in Volume 14 of Make Magazine and takes approximately 32
hours to complete.
The rest of the tutorial is presented as follows:
To complete this tutorial, you'll need the following items (in table below):
|PART DESCRIPTION||VENDOR||PART||PRICE (2013)||QTY|
|Tamiya 70112 Buggy Kit (or other small toy buggy kit complete with motor)||Amazon||B002DR3H62||$23.49||1|
|Wireless Camera and Receiver Set||Amazon||B000JCQKVM||$35.12||1|
|Monitor or VGA Headset with Composite Video Input (or input compatible with wireless camera and receiver set)||Amazon||BWCMO363||$20.30||1|
|Arduino Uno (or other controller board with 3V Power and PWM input and output pins)||Amazon||B006H06TVG||$21.95||1|
|4-Channel Radio Transmitter||Amazon||B004NZGF98||$69.00||1|
|4-Channel Radio Radio Reciever (that can pair with the transmitter)||Amazon||B007TJU5KU||$30.59||1|
|9V Battery||Amazon||B00003IE4E||$4.20 for 2||2|
|9V Battery Connector||Amazon||B00CBSDFH4||$0.59 for 5||1|
|9V Battery Adapter for Arduino||Amazon||B005D65LEG||$2.83 for 2||1|
|0.1mm 1 Row, 3 Pin Housing||Digikey||609-2340-ND||$0.69||3|
|0.1mm Pin Crimps||Jameco||104480-8||0.15||9|
|22 AWG Wire||Jameco||734311||$10.95||1|
|Various Screws||Local Hardware Store||N/A||Varies||Varies|
Build the car's body as directed by the kit's instructions. Leave out electric components like the battery holder and like, we will be replacing those parts.
Your car should look something like this:
Solder a heavy guage wire in the shape of an Ω (ohm) to the steering bar of the car to allow for a servo to be used to remotely steer the cart.
The cart should look like this after the wire is attached:
Create the speed controller circuit shown below, test with the Arduino creating a PWM signal to ensure that circuit is functional before soldering.
Pair the transmitter with the reciever, use this to test the servos.
Attach the two servos to the cart using the 9V batteries as a vertical offset. Also attach the camera to the top of the horizontal actuating servo.
One 9V battery is used to power the camera, while the other battery is used to power the control circuitry.
The cart should look like this after you attached everything:
Attach the motor with control circuitry.
The cart should look like this now:
Power the reciever with the 3.3V pin on the Arduino using the wiring shown below, plug in the servos and calibrate.
Cart should look like this now:
Program the Arduino using the duty signal from the reciever. Using the wire shown below:
Code is attached below in the programming section.
The circuit should look something like this now:
Power everything and see the cart work!
Here is the finished product:
const int signalPin = A0; //pin where duty cycle of reciever is inputted
const int outputPin = 11; //pin where pwm signal is outputted
Serial.begin(115200); //serial monitor setup
pinMode(signalPin, INPUT); //sets pin as input
pinMode(pwmsignal, OUTPUT); //sets pin as output
duration = pulseIn(signalPin, HIGH); //detects duty cycle
pwmsignal = 924.375-0.6375*duration; //calculates equivalent PWM signal, you will need to calculate this signal using this program
if (pwmsignal>255) //saturation of signal limiter
if (pwmsignal<0) //negative signal limiter
analogWrite(outputPin, pwmsignal); //outputs PWM signal on pin 11
Serial.print(duration); //serial output of length of duty cycle
Serial.println(pwmsignal); //serial output of calculated PWM output
The Duty to PWM converter operates as follows:
The Arduino controller board detects and measures the length of the duty cycle. From there, the Arduino calculates what the equivalent PWM signal to output to the motor, and outputs it through the output pin.
Speculating future work, derived from this tutorial, includes creating a bi-directional duty cycle to pwm motor controller (so motor could move in forward and reverse). In the big picture, the problem of creating a DIY mini Baja Buggie and duty cyle to motor control circuit can be solved with this tutorial.
Click here to email me