This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (www.makecourse.com) by Scott Enzinna
In this instructable we will go through step by step on how to make our Low Rider. This project is for the MAKE course offered at the University of South Florida. The purpose of this project is to give our 3D printed car hydraulics and other "car like" features. The hydraulics will cause the rear end of the car to lift up and down much like real hydraulics. Some of the other features we will implement will be headlights, tail lights, and a buzzer to make our 3D printed car seem realistic.
Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.
Step 1: Assembling the Arduino
The first step in making the Low Rider is to assemble the Arduino's electrical components. For our Low Rider we will be using two servos, two white LED's, two red LED's, one buzzer, and a voltage regulator.
The first step in assembling our control system is to set up power and ground. For this project we will be powering our Low Rider will a 9-volte battery and a voltage regulator that brings the voltage down 5-volts that can be used by the Arduino. The output from the regulator will be used to power the Arduino and the two servos. The output is channelled to the power and ground lines that run along the side of the breadboard. Finally, that Arduino is connect go the breadboard be connect the 5-volts inputs and ground pins on the Arduino to the power and ground lines on the breadboard.
Next we can get started on connect the LED that will act as headlights and tail lights on our Low Rider. We will be using pins 2, 3, 4 and 5 on the Arduino connect with 220 ohm resisters. The output from pins 2 and 3 will be connected to the resistors then the white LEDs, this will be our headlights. They same circuit will be used for pins 4 and 5 for connecting the tail lights. This circuit can be seen on the fritizing diagram.
Finally, we will connect our two servos and the buzzer. The first step is to connect both servos to power and ground on the breadboard. This is important because we will be powering the servos from the external power supply rather then powering the servos from the Arduino. Next we will connect one servo to pin 6, and the other to pin 11. These pins that the servos are connecting to are important because they differ from the other standard digital input pins. These pins are among the set of pins that have PWL (this is indicated with a "~" before the pin number). Lastly, we connect the pin number 11 to one pin on the buzzer and the other pin gets connect to ground.
Step 2: Writing the Arduino Code
The file attached contains the completed code for our Arduino. The code for the Arduino is broken into three files, a header file, a function file, and our main.
The header file contains the #defines for our IR sensor remote. These value are different for every remote. These value are what the main code will check against to see if a button has been pressed.
The next file, called "functions", contains the function that will be called when from the main loop when a button is pressed. This file contains nine functions that preform all of the functionality of the Low Rider. Below is a list functions and what they do.
Play_First_song() -- This function uses the buzzer to play a basic song.
Play_Second_Song() -- This function uses the buzzer to play the Low Rider song by War.
Lock() -- This function will flash the headlights and tail lights twice while playing a short beep.
Headlights_On() -- This function will turn the LEDs on located on pins 2 and 3 on, thus turning the headlights on.
Headlights_Off() -- This function will turn the LEDs off located on pin 2 and 3 off, thus turning the headlights off.
Taillights_On() -- This function will turn the LEDs on located on pins 4 and 5 on, thus turning the tail lights on.
Taillights_Off() -- This function will turn the LEDs off located on pin 4 and 5 off, thus turning the tail lights off.
Both_Servos_Up -- This function will set both servos to the correct angle so the rear of the Low Rider is lifted.
Both_Servos_Down() -- This function will set both servos to the correct angle so the rear of the Low Rider is lowered.
Lastly, the main file contains the setup loop and the main loop. The setup loop is used to set the initial values that the Arduino will use to control the Low Rider. The next loop is the main loop, this loop is always running and checking to see if the IR receiver has received a button push. Once the IR receiver receives a button push it call a function from the function file. This loop is constantly running checking for another button push.
Step 3: Assembling the Low Rider
Attached are the three .stl files needed to print the parts for the Low Rider. The design is split into three parts to meet the size constraints of most 3D printers. The design for the car is split into two half's that can be see in the images. To assemble the Low Rider, the two pieces must be supper glued together. To attach these pieces super glue works the best but hot glue or epoxy will also work.
The next step is to attach the front wheels to our Low Rider. These wheels are glued to the body of the car. The wheels should be placed in the middle of the two pieces of our car. This placement of the wheels along the cut of the car helps to insure that the placement of the wheels are the same on both sides.
Next, we will attach the Arduino and the breadboard to the bottom of the Low Rider and rout the connect wires. The Arduino will be placed right up against the font of the Low Rider, leaving enough space for the headlights to fit into place. Then, place the breadboard next to the Arduino.
The last step is to place to LEDs in the wholes printed on the Low Rider and connect the servos to the rear wheels. To do this we will glue the headlights and tail lights in the corresponding wholes. Lastly, we will connect the base of the rear wheels to the horn of the servo, this will allow the wheels to lift up and down when the servo is moved. Once the horns are connect to the wheels we will mount the two servo on the back of the Low Rider.