The Driving Car

Introduction: The Driving Car

About: you can't make a difference unless you try to.

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (

"The Driving Car" is a small scaled, rural-styled roundabout street. It features a car that drives in a circle and obeys the commands of a traffic light.

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Modeling With Autodesk Inventor

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (

The first steps to any projects is to model it. So for the Makecourse class taught at the University of South Florida, we were asked to used a program called Autodesk Inventor. It is free for college students online at

The outside panels of the photo are wood. They are supports for the top piece of my project ( the roundabout). They White enclosed box is where all of my wiring and electronic components will be placed. It is a requirement of our class that we can not change any part of the dimensions of the enclosed box.

Sitting on top of the box is a red pole. The bottom of it is shaped like a washer and is mounted on top (and in the very middle) of the enclosed box. The skinny part that travels all the way to the top of the photo is exactly a quarter inch in diameter. This was used because it is a commonly used standard size. Everything else that is attached to the red pole will have similar dimensions in order to fit properly.

A little off on the right side of the white enclosed box is a mounted stepper motor. In the photo, it is actually on top of my box, but later on, you will see that I put it inside of the box instead, and mounted it to the roof. I just wanted people to see what it was powering the two gears so this is why I left it on top in my program.

The small blue gear in the photo is what rest upon the top part of the stepper motor. I made it so that the center of the gear had a hole that perfectly fit around the dimensions of the stepper motor head. The gear has 23 teeth and is connected to the golden gear which has 46 teeth. Making the gears in autodesk inventor is fairly complicated, so if you need help, watch this video:

On top of the golden gear is a bobby pin. It is essentially just a cylinder. I just mount that on top of the golden gear so that when the gear spins, so does the bobby pin.

On top of the bobby pin is the rotating disk (green piece). It is also mounted to the bobby pin so that when the gear spins, so does the bobby pin, and so does the rotating disk.

On the side of the rotating disk, near the edge, there is a peg that I used to connect to the car. In autodesk inventor, I just use a square peg, but you will see in my actual project, I just a piece of aluminum instead.

finally, I included a top piece. This is just a circle that is a little smaller in diameter than the rotating disk. You dont want it to be too much smaller though because then there will be a large gap in the project. My gap difference between the rotating disk and the top circle was a 1/4"

Step 2: Wiring the Breadboard and Arduino

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (


On the breadboard, there are two power rails. One on each side. The strips are powered vertically. On the inner parts of the breadboard, there are two sections as well. These will be powered horizontally instead.

The first thing to do is to run current on the breadboard. The arduino has a 5v pin that you can connect to with a wire, and place directly on one of the power rails. The arduino also has several ground pins that you can choose from to connect to the bread board as well. Once you have completed this, you will have a simple direct current of 5v running through one of the power rails.

Now we get to start connecting parts of the electric components. I pluged in the stepper motor into the "motor driving module." The next step is to run power to the module. Take a wire and place it in the power rail where you have 5 volts running, and plug it into the module. Then place a ground wire that leads on the negative side of the power rail since this is grounded back to the arduino anyways. Now we have to plug 4 wires into the arduino that lead to the module. These will be the ports that give the module a command on when/how to spin the motor. I used serial ports 8, 9, 10, 11.

Now that the motor is taken care of, we can start plugging in wires for the LED traffic light. In my photo, I tied off all three LED lights together (the ground current flow) to take up less space on the breadboard. It really cleans it up and makes everything much visually clearer. Just make sure that you connect a 220 ohm resistor from the positive power rail (your 5 volts) to somewhere in the middle section of the breadboard and have it run in connection with the ground. Now Plug in three wires to the positive ends of your LED lights somewhere on the breadboard. I used serial ports 2, 3, and 4 for the LED lights in order to give commands.

The last electronic piece we need to plug in is the IR Receiver. This has three parts that must be connected to the breadboard. A ground, a positive, and a communication wire plugged directly into the arduino. I used serial port number 6 to give commands.

If you have any issues, the photos above should show you whats going on.

Step 3: Coding

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (

To program the arduino, you must download all of the neccessary software from

The coding uses libraries that are not downloaded regularly. You will have to download the exact library in order to make the coding work. It is called the IREMOTE.H library, and if you need help on doing this, these videos here will help you with it.

The coding for my project is pretty simple.

Step 1: Include libraries

step 2: Define variables and PINS - go back to the last page and refer to what PIN numbers I used so that you can see exactly why I defined my PINS the way I did.

step 3: Declare your objects- in order for your Stepper motor to work, you have to realize how it works. For instance, for " Stepper smal_stepper (STEPS, 8, 10, 9, 11)" , you have to have the numbers in that order because that is the case in which the magnets inside of the stepper motor work. You could not change it with a 8,9,10,11. You have to also declare the IRecv and decode_results so that the remote sends an infrared signal to the receiver, and so that the receiver sends a signal back to the arduino to let it know that it got a signal from the remote to begin an action.

step 4: void setup - Now your going to make the procedure of the loop. In my code, i changed the PinMode numbers to names of the LED colors so that it would look clear in my code. It can get confusing really fast when your constantly looking at a bunch of numbers.

Step 5: Now really all you have to do is make sure that for the case if the "+" button is pushed, the sequence is started for the LED lights and car movement.

Step 6: End Main loop

If you have any extra questions, refer to the first video posted. It goes in depth with the coding that I used a for my project. All you have to do is add the blink commands in between where you would want them.

Step 4: Final Project Showcase

This instructable was created in fulfillment of the project requirement of the Makecourse at the University of South Florida (

Here is a final video that goes over everything you will need to understand the project, and its functionalities. Good Luck!

Be the First to Share


    • Backyard Contest

      Backyard Contest
    • Silly Hats Speed Challenge

      Silly Hats Speed Challenge
    • Arduino Contest 2020

      Arduino Contest 2020