Introduction: Robo-Band Car
This is an upgrade from your traditional rubber band powered car
Step 1: Gather Materials
For this project, you will need the following items:
- 4 wheels preferably the same size (we 3D printed ours)
- One dowel that fits in the wheels
- An arduino kit (we used a SparkFun RedBoard kit)
- Structure for the arduino to sit on (we 3D printed ours)
- Battery pack
- Rubber bands
- Some material to raise the arduino so it's not directly on the body (we used nuts)
- Hot glue
- A hinge-like device
- Optional: duct tape and plywood to make a ramp
Step 2: Design Your Structure
You will need to 3D print the base where the arduino will set
For this, use an online software that allows users to design their own model which can be printed
OnShape is a great and free online design software we used
Our base was a trapezoid with two holes for axles in the structure
The dimensions of the sketch are listed in the above picture as well as a link below:
Step 3: Design Wheels
This step is not mandatory, we just wanted to explain every step we did
If you can find four wheels of the same size, use those and make sure the axle fits in those wheels
We 3D printed all of the wheels using OnShape
Note: The four wheels do not have to be the same size. As long as there are two pairs of the same size, each pair does not have to be exactly equal. If you have uneven pairs of wheels, put the smaller pair in the front of the car.
Here is the link for our design on OnShape:
Step 4: Set Up Arduino for Buzzer
Follow the instructions in the SIK Guide for circuit 11, the Piezo buzzer
This setup is pretty simple so just follow the directions in the book
A necessary alteration is that the buzzer must be moved to the bottom half of the breadboard. It does not matter which location you choose, just as long as the two wires grounding the buzzer are in the rows adjacent to the buzzer's legs. The orange wire connecting the buzzer to the arduino RedBoard MUST be repined to hole 8.
Troubleshooting: Our original buzzer was hooked up correctly, but not very loud, so we switched with a buzzer from a different kit and the volume was much louder
Step 5: Set Up Arduino for Lights
Follow instructions in the SIK Guide for circuit 3, the RGB LED
Add this circuit to the previous circuit to allow both functions to run simultaneously on the arduino
The wire connecting the blue leg of the RBG LED MUST be repined to hole 6.
Again, this step is following the instructions in the book, but be sure to double check all of the connections if you are having difficulties
Step 6: Combine Codes
This part is a little tricky. You will need to combine the codes for both circuits to ensure they run simultaneously.
The complete program is shown above, but I will walk you through the more complex alterations.
First, move all the variable from the two SIK Circuit tutorials to the top of the program.
Redefine the variable BLUE_PIN to 6.
Redefine the variable buzzerPin to 8.
The notes, tempo, and beats can be changed to reflect any song that you wish, but make sure that the variable songLength is equal to the number of notes in your song.
All that should be in this loop are the four pinMode commands: one for each light and the buzzer.
First, combine the void loops from the two programs.
Then, delete the lines of code controlling the lights: We are going to change the code to flash random colors in sync with the song.
Inside the void loop, define myColor as void myColor(int redIntensity, int greenIntensity, int blueIntensity). This line goes just above the analogWrite commands at the bottom of the combined loop.
Above the command for tone, define myColor to myColor(r,g,b). Above that, define int r, int g, and int b to random(255). This will call a random intensity for each color.
Below that, establish a Serial.println command for each of r, g, and b.
Your finished code should mach the photographs above. The photos are broken apart into variables, void setup, and void loop, with void loop having two photographs. Have fun!
Double check that myColor(r,g,b) is defined before tone!
Step 7: Print
Now that the arduino is set up, you can print your designs from OnShape
Step 8: Assemble Structure
Materials: Battery pack, printed body structure, wheels, axels, rubber bands, completed arduino circuit board, hot glue, nuts, screw
- Hot glue two nuts on the top side of the structure close gap in the structure
- Secure the arduino onto the structure by wrapping a rubber band tightly around the structure and arduino
- Hot glue your hinge to the side of the structure so it can support the battery pack without getting in the way of the rubber band used to power the car (pictures 3 and 4)
- Use a rubber band to secure the battery pack to the hinge. It should be resting outside of the entire structure (pictures 5 and 6)
- Put the dowel into the axel holes and make sure the wheels are securely attached to the axel
- Drill a hole in the center of the back axel
- Put the screw into the screw hole
Step 9: Prepare for Launch
You're almost done!
- Put one rubber band on each back wheel for traction
- Make a chain of rubber bands and attach it to the lip at the front of the body
- Hook the last rubber band on the screw and wind the axel backwards
Step 10: Launch
Step 11: Optional: Build a Ramp
Get any piece of wood or plastic or whatever you want that's wide enough for your wheels!
As you can see, we used duct tape and plywood, so really anything will work
Then get a support to raise your ramp to a desired angle, launch your car, and watch!
We have a be nice policy.
Please be positive and constructive.