Introduction: Car With Remote to Choose Path

Quick Preview 

After many long years of anticipation, the first model of Car with Remote to Choose Path has finally been created. We know what you are thinking. Why would I ever need something like this in my life? The answer is quite simple. A tool like this could revolutionize your day-to-day life and quality of life and because of that you could never go back to the way it was before having this awesome device. This vehicle of a lifetime can travel a path that you the user may make for it and with our fancy 8th generation technology and guide you too at home will be able to make this fantastic vehicle. 

Supplies

Materials List: 

Quantity:    Name:                                                            Sets required: 


1x                    Arduino Uno or Red board                          (1x) 


4x                   10000 Ω resistor                                            (1x) 


3x                   Push button                                                     (1x) 


1x                   LCD 16x2                                                         (1x) 


2x                   Hobby Gearmotor                                         (1x) 


1x                   Motor Driver                                                    (1x) 


14x                 Wires connected to the motor driver          (1x) 


4x                   Wires per push button                                (3x) 


1x                  Bread Board                                                  (2x) 


2x                  Wires per breadboard (2x) 


12x               Wires per LCD                                               (1x) 


1x               Cardboard                                               (1x) 


1x               Tape                                               (1x) 

Step 1: (Getting Your Kit and Materials):

(Getting your kit and materials): 

To begin, purchase this kit: 


https://www.sparkfun.com/products/15631


As well as an additional breadboard: 

Step 2: (Tinker Cad):

(Tinker Cad): 

Begin wiring by using Tinker Cad as a guide: 


https://www.tinkercad.com/


Start by creating an account (by clicking sign up red in the first picture / has an arrow pointing toward it). Create a personal account with an email you can access and a password you remember.  

Then navigate to your designs. (red arrow in the second picture / has an arrow pointed toward in in the second picture) 


Step 3: (Beginning Your First Circuit)

(Beginning your first circuit)


Click on the create button on the top right and click on circuits. 

You will be greeted by a blank canvas in circuit view. 

You might want to change the title in the top left from the randomly generated one so that you have an easier time returning to your project. 

Simply click on the title. Press delete or backspace when it is highlighted, then type your preferred project name. 

Step 4: (Selecting Components)

(Selecting Components)

Option 1: 

To begin the circuit, go into the search bar and type in: 

“Arduino Uno R3” 

Without the quotation marks. 

At the very top, before starters, there should be an object entitled “Arduino Uno R3” click on it. Then, drag your cursor to the left and left click on the white background. 

Option 2: 

Make sure you see in the top right corner (a little bit down from there and to the left a tad) something that says ‘Components” the below it “Basic”. If it says “Components” then below it “All” or “Starters” left, click on the menu and then left click “Basic” 

  • You should see below this a search bar. 
  • Below that, you should see various items. 
  • At the top right of this list of items should be “Pushbutton” 
  • Navigate, visually, 3 items down to what says “Arduino Uno R3” 
  • Click on this. 
  • Drag your cursor to the left. 
  • Click on what was previously a blank white canvas to place your board. 



Step 5: Instructions

Instructions:  

These instructions might have a little more redundancy than a well-versed robotics veteran would expect. This tutorial can be used by someone with any level of expertise in circuitry and robotics, especially accommodating those who may have never touched a wire before and are unsure of where to start. We want our design to be accessible to an absolute novice, leaving them wanting of details and steps as little as possible. We will put our utmost into attempting to provide an easily digestible and thoroughly descriptive instruction guide into how to wire our design, as well as program it, coupled with debugging tips and advice you can apply outside of this design. 


Breadboard: 

We define the breadboard as having 30 columns and 10 rows (not including the 4 rows used for ground and power. When you see the words “row” used in the document, think about this orientation of the board. It is sort of placed hamburger-style, not hotdog, and has a similar row and column description as a matrix in this orientation. I will try to link back to this section whenever the word “row” is referenced so you can refresh yourself on the meaning in this context, novel as it might be to you. 


Wiring: 

On all boards, you must make sure you properly have the ground and the live rows on your board clearly defined. Unlike in other wiring, we define black as ground wires and red as the live wire in robotic circuitry (this may be surprising to an electrician, for instance). There is a pin on your board labeled “GND” in fact, there are multiple, but it would be ideal to use the GND directly adjacent to the pin labeled 5V. The 5V pin is what we will have live wire connected to. On the board, two rows on one side and two rows on the other side of the board are labeled + and – respectively. They are mirrored on the other side of the board. 


LCD: Warnings: 

You must be extra careful with the LCD, so you do not short it, since it has some specific resistor requirements while having many pins. 


Motor Driver: 

This differs from what we use in Tinker Cad, so it can be a bit confusing. On Tinker Cad, we must use an h-bridge, since Tinker Cad does not have our motor driver component, but don’t worry, they have similar levels of difficulty to wire; it’s not more complicated wiring the breadboard. 


Pushbuttons (Buttons): 

We are using the buttons in a way that might be a little strange, plugging them into an analog pin and all, but we do this to conserve space on our Arduino/Redboard. While on a digital pin, you will typically use a button in its input-pullup wiring orientation (because it is so much easier to wire), we must use the default input reading that analog pins use. To do this, we wire the button so that it matches more of a photoresistor than a typical button. All three buttons have the same wiring configuration, and so does the photoresistor, so it is not that difficult to implement after you understand how to do it the first time. One good thing about buttons is that their orientation on the breadboard doesn’t affect how they function. You could put the button on the breadboard, turn it 90 degrees (while still parallel to the breadboard) and do this until you make a full 360 and it still works the same way each time.  


Photoresistor: 

 This also can be placed on the breadboard in any of the two possible ways you could put it on the breadboard so that both pins are on the same row. 


Difference Between H-Bridge in Tinker Cad and motor driver: 

  • The difference between the H bridge or driver in Tinker Cad and the physical model is not that huge, but there is sure some that we can point out. An H-bridge is a type of motor driver designed to control a motor's direction by allowing current to flow in both directions. In contrast, a motor driver is a broader term that includes any device that powers and controls the operation of a motor. In Tinker Cad, simulating an H-bridge motor driver is straightforward and perfect, without real-life problems, making it great for learning and trying out ideas. But, when you use an H-bridge motor driver, you'll encounter issues like parts behaving differently than expected and being affected by things like temperature. While Tinker Cad is easy and safe for beginners, using actual hardware teaches you more about dealing with electronic challenges. While Tinker Cad is easy to use and safe, the experience of using a physical board is significantly different. I believe that using physical components teaches us much more than using Tinker Cad. 


Describe the wiring of the H-bridge motor driver. 

The wiring for the H-bridge initially consists of setting up all the separate components for this part we are setting up the gearmotors and the H-bridge (H-bridge on Tinker Cad). For this process, we set up the H-bridge on the breadboard saddling the gap in the middle. When setting it up from left to right we first set up the power on the top and wiring to the Arduino Uno on the bottom. The next column has two wires to the Arduino coming from the top and bottom of the bridge. Then onto the next where we use the negative wire from one gearmotor on the top and the positive wire from the other gearmotor on the bottom. The next column has just a grounding wire on the top. After this, you can repeat this pattern in reverse ending with a column that has power on the top and a connection to the Arduino on the bottom. 


The wiring for the R.B.G. LED consists of a resistor under the first and third plugs in then under those connections to the Arduino. Then under the second plug-in, there is a ground wire. 


For the buttons directly to the left of a button put a resistor saddling the gap. Then have wires under that resistor go to the ground and wires above the resistor go to the ground side of the button. The button saddling the gap is directly to the right of the resistor. Under the black wire that comes from the resistor, you put a wire that leads to the Arduino Uno. 


For this project we are using two boards for these two boards to connect we attach the positive and grounding strips with wires. 


For the photoresistor, the first wire on the left should link the spot directly under the left plug-in to the spot to the left of it. Under the spot it is connected to, you need to insert a resistor and a link to the ground. Under the original left plug-in, you should connect a wire leading to the Arduino. On the right plug-in, you can connect the spot to power.  



Step 6: Wiring the Board for the Car

Wiring the Board for the Car 

After you have a sufficient understanding of using the H-bridge and its differences between the physical version and the one in Tinker Cad, you are ready to wire the physical board. It should be noted that everything in the physical model will be identical to Tinker Cad, minus the H-bridge. Copy the Wiring diagram below: 

For better understanding, wire colors correlate to: 


  • Red – Power and Output for Motors 
  • Black – Ground and Output for Motors 
  • Turquoise – AIN1 and AIN2 as well as PWMA for Motor 1 
  • Orange – BIN1 and BIN2 and PWMB for Motor 2 
  • Blue – Analog Pins for Photoresistor and Buttons 
  • Green – Digital Input Pins for Colored LED, as Well as Connecting the Potentiometer to the LCD to Determine Brightness 
  • Gold – Digital Input Pins for LCD Screen 
  • Pink – Input Pins for LCD Screen 

Resistance value for the resistors on the LCD and LED are 330 Ohms, and the Button resistors as well as the resistor on the Photoresistor are 1K Ohms.  


Step 7: Creating the Physical Model

Once the physical board is wired, you are ready to create the car itself. Begin by making three identical, thin pieces of cardboard that will be used as the main body. Use hot glue/tape to put your Arduino board onto one of the pieces of cardboard, and make cutouts as shown on the picture below. The exact locations of these holes are not important, they simply serve as holes to route your wires from the gear motors as well as being able to plug in the cord to download your code onto the board and plug in batteries which we will show on a later step.  

Refer to the first photo.

Once these pieces are made, start by making a box with the 2 additional long pieces of cardboard by glueing them to the sides of the cardboard with the Arduino components on it. Finally, make an additional cardboard piece, approximately 4 inches by 5 inches to serve as the top. Use glue or tape to make it look like this: 

Refer to the second photo.

Next, tape the second breadboard to the front of the box as shown below, so the LCD can be seen from above the box: 

Refer to the third photo.

Now it is time to glue the motors on, as well as the suspension-like system below. Orientation of the motors is not important here, just that they can be connected to the breadboard with the driver through the hole in the base. The bottom of the car should look like this: 

refer to the fourth photo.

Step 8: Suspension System for the Bottom of the Car

Suspension System for the Bottom of the Car 

Download the STL files here and print them: 

Step 9: Code

The code we made for this is attached here along with a flowchart of the code

Step 10: Videos to Help

Potentiometer Tutorial Video

https://mediahub.ku.edu/media/t/1_s5v8s8gf


Introduction and Grounding Tutorial Video

https://mediahub.ku.edu/media/t/1_x6fawn4b


Photoresistor Tutorial Video

https://mediahub.ku.edu/media/t/1_cym7o3gh


Pushbutton Tutorial Video

https://mediahub.ku.edu/media/t/1_4j9sxtlj


Wiring the Car with Buttons to Choose Path

https://mediahub.ku.edu/media/t/1_ndrpqlyb


Walkthrough of Code and Tinker Cad Model

https://mediahub.ku.edu/media/t/1_b2tp0jjh


Completed Project Video

https://mediahub.ku.edu/media/t/1_zmeu8jrl