Introduction: Remote Control Laser Cut Car
There's something very appealing about remote control cars. They move around, run into things, and they're fully controlled by you.
Check out my Vine of this project here.
Building off of makenai's free and open source laser cuttable or 3D printable car chassis, I added a few more open source parts so that you can put together a little car that you can control over WiFi with your computer's keyboard.
This is a beginner-level project! You don't have to know anything about electronics or programming to get started; I'll walk you through the robotics part step by step.
- 3D printed or laser cut robot car chassis (I like the laser cut version, personally)
- 6 3/8" wood screws
- 2 thick rubber bands
- 2 continuous rotation servo motors
- 16mm ball bearing
- Project Box
- Servo Module
- A USB battery like this one
- 12 male to female wires like these
- Drill or awl (to punch through the project box)
You do not need a soldering iron!
Step 1: Assemble the Car
Put together the laser cut pieces, the servos, and the ball bearing according to the instructions on makenai's page (up to about 11:42 in this video). Slip the rubber bands over the wheels as tire treads.
Drill a hole in the back of the project box so you can thread in the servo leads, and also drill a couple of holes through the bottom of the project box to screw the box onto the top of the car. You should now have a box affixed to the top of the car where you can hold your electronics.
Step 2: Electrical Assembly
- Make sure power is unplugged before you do anything with wires.
- Plug your servo module into port A on the Tessel (see this page if you're confused). Optionally, use 10 of the jumper wires as an extension cable between port A and the servo module (as shown in the pictures). This makes it easier to fit everything into the box on top of the car.
- Plug in your two continuous rotation servos to positions 1 and 2 on your servo module. Remember, the black wire goes to Ground/-.
- Using the remaining two wires to run power from the Tessel to the servo module. This is a little bit hack-y, but we'll get away with it in this application. Since you're powering Tessel from a 5V source (USB from your computer/the specified battery), Vin on the GPIO bank is 5V. Run a red wire from Vin to any of the + positions on your servo module (yes, the same kind of pins you plugged the servos into). Also run a wire from GPIO GND to servo module -. This means we don't have to plug in the servo module to an external power source like we usually do. Check out the picture, and let me know if you're still confused.
Step 3: Learn to Program/Learn to Use a Tessel
Okay, I know this part can be intimidating for people who haven't coded before, but trust me! You can do it! Please comment and let me know if you have any questions, and I'll help you out.
If you've never programmed before, or are unfamiliar with the command line, start here and complete the whole tutorial. It should only take about half an hour. I wrote that tutorial, so still please comment here if you're confused, and I'll make it better!
If you have programmed before but haven't used Tessel, start here and complete the whole tutorial. It will take slightly less than half an hour.
Step 4: Programming!
If you're already familiar with Tessel or have just finished the tutorial, let's jump into the project-specific programming.
- Download the code for this project by clicking here. This will download a ZIP file. Unzip the file however you normally unzip files.avigate in your command line (use the `cd` command) until you are inside the unzipped folder.
- Still in the command line, type `npm install`. This will automatically download and install some libraries that this code uses.
- From your Finder/My Computer window, open `server.js` in a text editor. (What's a text editor? Scroll down to Text Editors on this page.) In a variable called `wifiSettings`, change the ssid to match the name of the WiFi network your computer is connected to (in quotes). Also change the password to match your WiFi password (also in quotes). Save this file.
- Connect your Tessel to the same wifi network that your computer is connected to. Instructions are here.
From your Finder/My Computer window, open `client.js` in a text editor.
When Tessel connects to Wifi, it will list an IP address in the command line, for example "192.168.128.117". Change the `ipAddress` variable in `client.js` to be the IP address listed in your command line from when you connected Tessel to WiFi. Save this file.
You're going to need two command line windows. Open up a new command line window and navigate with `cd` until you're in the same folder with the second window that you're in with the first window.
In one of your command line windows, type "tessel push server.js" and hit enter to program your Tessel.
In the other command line window, type "node client.js" and hit enter to tell your computer to talk to the program running on Tessel. Once it's connected, you should be able to move your Tessel car around by typing "W" "A" "S" or "D" and hitting enter in the command line! Hit enter without typing W, A, S, or D to stop the car.
Is it working? Great, move on to the next step! If not, go to the "Test it Out" section on this page, which has some suggestions for debugging.
Step 5: Deploy
Type Control + C in the command line that's running `node client.js` (the one with the WASD controls) to stop the connection.
Unplug the Tessel from your computer, and plug the USB into the USB battery instead– now your Tessel car can run while disconnected from your computer! If you haven't already, put all the electronics in the box on top of the car.
When the green light on Tessel starts to blink, run `node client.js` again to remote control your car!
Step 6: Playtime!
Run that little Tessel car around with WASD controls :)
If you get stuck or if something stops working, there's some information here: http://www.hackster.io/ifoundthemeaningoflife/rc-s...
We have a be nice policy.
Please be positive and constructive.