This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com)
I’m with the make course at the University of South Florida. This instructable features my project an infrared controlled car.
Step 1: Materials
1. Arduino Uno
2. 1 dc motor
3. 2 9V batteries
5. 1 3/8 in wooden dowel (drive shaft)
6. 1 servo motor
7. 1 IR Controller and receiver
8. A sheet of .22in thick acrylic
11. 1/8in diameter steel rod (for gear shafts)
12. Access to a 3d printer and laser cutter
Step 2: CAD Models, 3d Printing and Laser Cutting
First figure out what you want your car to be capable of. You can do whatever you want with it, provided you keep in mind the range of the IR remote you decide to use if you stick with IR. This is important for materials selection as well as design considerations.
Next design your car using a 3D CAD software, I used SolidWorks, but you can use any 3D CAD software (Autodesk Inventor is free for students if you need something cheap). You will need at least to model all of the components you plan on 3d printing (unless you can find what you need on GrabCAD or similar site), it is helpful to model the entirety of the car to make sure it functions properly before using materials.
If you plan on making your own gear system you will need to model them in a 2D sketch software as well (for the laser cutter). I cut mine out of acrylic because I could get a pretty large sheet of it for $20 but you can use wood or even metal if you’d prefer, just make sure the gears are accurately spaced and will mesh properly.
Step 3: The Circuit
The circuit is fairly simple (Fritzing schematic above)
Pin 9 on the Arduino connects to pin 1 on the H bridge, it controls the dc motors power supply which for my motor was a 9V batter. Pins 2 and 3 on the Arduino connect to pins 7 and 2 on the H bridge respectively, they control the direction of rotation of the DC motor. Pin 10 controls the servo motor and pin 11 is the input for the IR receiver.
Step 4: Arduino Sketch
Attached are the files I
created for my project. They are for the Arduino UNO, using the IR remote, H bridge and IR receiver listed in the materials section
I began by including the standard libraries for the IR remote and servo, those that aren’t included with Arduino can be found on the make course site (www.makecourse.com).
I then defined the pins; 3 are for controlling the H-bridge, 1 for the Servo, and 1 for the IR receiver.
The main loop consists of a series of if statements that will occur if the IR receiver receives data. Each of these if statements corresponds to a movement of the car depending on the button that was pressed and if the button is still being pressed. If the IR receiver isn’t receiving data nothing will happen.
I also added a counter throughout the code, this is to prevent the loop from occurring faster than the IR receiver receives data. I also added a delay so that the loop only occurs every 50 milliseconds.
Step 5: Assembly and Testing
The next step is to assemble your car I used an epoxy for all of my parts that required gluing.
Congratulations! You now have a fully functional IR controlled car! Do some donuts, do some wheelies, chase your neighbors annoying kid, I don’t care enjoy it!