Introduction: Robo-Band Car

Picture of Robo-Band Car

This is an upgrade from your traditional rubber band powered car

Step 1: Gather Materials

Picture of 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
  • Screw
  • A hinge-like device
  • Optional: duct tape and plywood to make a ramp

Step 2: Design Your Structure

Picture of 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:

https://cad.onshape.com/documents/048fc6be951616f14e2deccc/w/20989624bf2558bc37959b78/e/68c66e4b2b2e6e5c3f831475

Step 3: Design Wheels

Picture of 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:

https://cad.onshape.com/documents/e1922e8518bcb45ebed6572a/w/079056c283baf08413a9531b/e/6447ceb52e949cd1573223c7

Step 4: Set Up Arduino for Buzzer

Picture of 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

Picture of 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

Picture of 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.

Define Variables

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.

Setup Loop

All that should be in this loop are the four pinMode commands: one for each light and the buzzer.

Void Loop

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!

Troubleshooting

Double check that myColor(r,g,b) is defined before tone!

Step 7: Print

Picture of Print

Now that the arduino is set up, you can print your designs from OnShape

Step 8: Assemble Structure

Picture of Assemble Structure

Materials: Battery pack, printed body structure, wheels, axels, rubber bands, completed arduino circuit board, hot glue, nuts, screw

  1. Hot glue two nuts on the top side of the structure close gap in the structure
  2. Secure the arduino onto the structure by wrapping a rubber band tightly around the structure and arduino
  3. 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)
  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)
  5. Put the dowel into the axel holes and make sure the wheels are securely attached to the axel
  6. Drill a hole in the center of the back axel
  7. Put the screw into the screw hole

Step 9: Prepare for Launch

Picture of Prepare for Launch

You're almost done!

  1. Put one rubber band on each back wheel for traction
  2. Make a chain of rubber bands and attach it to the lip at the front of the body
  3. Hook the last rubber band on the screw and wind the axel backwards

Step 10: Launch

Congratulations!

Step 11: Optional: Build a Ramp

Picture of 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!

Comments

Swansong (author)2017-06-16

That looks like fun :)

About This Instructable

44views

2favorites

License:

More by Carebear856:Robo-Band Car
Add instructable to: