Arduino TA0136 User Manual
Arduino TA0136 User Manual

Arduino TA0136 User Manual

Arduino 2 wheel drive ultrasonic robot kit

Advertisement

TA0136
USER MANUAL
ARDUINO 2 WHEEL
DRIVE ULTRASONIC
ROBOT KIT
I

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the TA0136 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Summary of Contents for Arduino TA0136

  • Page 1 TA0136 USER MANUAL ARDUINO 2 WHEEL DRIVE ULTRASONIC ROBOT KIT...
  • Page 2: Table Of Contents

    Contents Overview – TA0136 ......................1 Getting started: the 2 Wheel Drive Ultrasonic Robot Kit using Arduino UNO... 1 2.1. What is Arduino? ........................1 2.2. What is IDUINO UNO? ......................1 Software installation ......................2 3.1. Arduino Software/IDE ......................2 3.2.
  • Page 3: Overview - Ta0136

    Overview – TA0136 Overview – TA0136 In this instruction, we will introduce you through the fun project of the Arduino 2 Wheel Drive Ultrasonic Robot Kit. Get your Arduino board kit. Let’s get started! Getting started: the 2 Wheel Drive Ultrasonic Robot Kit using Arduino UNO 2.1.
  • Page 4: Software Installation

    3.1. Arduino Software/IDE Download from here. Open Windows-based app by double clicking it and follow the instruction to complete(Remember to install everything driver for Arduino). Easy! Figure 1 Installation of drivers Connecting your UNO board with your computer Connecting UNO and your PC by a blue USB cable, and if connected correctly you will see the green power LED light up and another orange LED is blinking.
  • Page 5: Play With Your First "Hello World" Led Example

    In this case for demonstration purpose, we are using the COM 4. 3.2. Play with your first “Hello World” LED example Firstly, let’s tell IDE where to find our Arduino port and which board you are currently using: The following instruction (Figure 3 and 4) shows the details:...
  • Page 6: Run Your Arduino 2 Wheel Drive Code

    It’s time to play with you first simple example. Following the path by File | Examples | 01. Basics | Blink. A new code window would pop up, press the arrow symbol to upload. You will notice the orange LED is blinking almost every second. 3.3. Run your Arduino 2 Wheel Drive code Upload to UNO Done uploading!
  • Page 7: Hardware Installation

    4. Rubber Wheels 5. Metal Pivot wheel 1. Ultrasonic Sensor 2. Arduino UNO Development Board 3. Arduino Sensor shield V5.0 4. 6 x AA Battery Box (Batteries not included) 5. L298N Motor Driver Board 6. Rocker Switch (Optional configuration please see Chapter 4.4)
  • Page 8: Chassis Frame Installation

    Chapter 4 Hardware installation 4.2. Chassis Frame Installation Remove the protective cover and prepare the items: 1. 4 x M3 6mm Screws 2. 4 x M3 10mm Spacers 3. 4 x M3 6mm screws 4. Metal Pivot Wheel Assemble the M3*10 spacers and M3*6 screws onto the Metal Pivot Wheel...
  • Page 9 Chapter 4 Hardware installation Screw in the metal pivot wheel to the chassis Gather 4 x M3 10mm screws and nuts to secure L289N Motor Drive board Screw the L289N Motor Drive board from the bottom chassis...
  • Page 10 Chapter 4 Hardware installation Gather 4 x M3 8mm screws and 4 x M3 35mm spacers Secure Spacers onto the chassis as per the picture on the left. Spacers/Stand-offs should look like this...
  • Page 11 Chapter 4 Hardware installation Gather the following components: 1. 2 x Acrylic Motor Brackets 2. 4 x M3 35mm Screws 3. 2 x Nuts *Attaching wheel encoders are optional. These are not required for this particular project...
  • Page 12 Chapter 4 Hardware installation Place acrylic DC motor Brackets on both side of the motors as shown on the left Gather another two acrylic fasteners and two wheels Insert the acrylic fasteners first in pre-cut slot...
  • Page 13 Chapter 4 Hardware installation Then tighten and secure the DC motor with one nut on the other side Fix the other motor as well Pull the wire through as we need to connect them to the L289N board...
  • Page 14: Arduino Installation

    Chapter 4 Hardware installation 4.3. Arduino Installation Let’s fix the Arduino UNO and Sensor shield in the following steps. Prepare the jumper cables Separate the jumper cable set into four and eight configurations Connect the 8 jumpers with L289N board as shown.
  • Page 15 Chapter 4 Hardware installation Prepare the following: Battery pack: • Arduino UNO development board • Top acrylic chassis • 6 x nuts • 6 x M3 10mm screws Peel the protective cover Place the battery pack and UNO board on the top acrylic chassis...
  • Page 16 Chapter 4 Hardware installation Secure the screws from the bottom It should look like this Feed the jumper wire from the L289N board and pull through to the top acrylic chassis hole to connect with the UNO board later...
  • Page 17 Chapter 4 Hardware installation Mount the top acrylic chassis to the bottom chassis Use four M3*6 screws to secure top acrylic chassis. It should look like this...
  • Page 18 Chapter 4 Hardware installation Place the sensor shield on the top of the UNO board and ensure the pins line up with the Uno Board.
  • Page 19: Sensor Installation

    Chapter 4 Hardware installation 4.4. Sensor installation Ultrasonic sensor acts as the eye of this 2-wheel drive car. In the following steps, we are going to guide you through the installation of ultrasonic sensor and servo. Items required in this step Assemble the FPV holder and servo Use two self-tapping screws (in...
  • Page 20 Chapter 4 Hardware installation Prepare the items To fit the servo horn into the black holder we need to modify as pictured. Best tool to do this with is a side cutter Caution: Be carefully with cutter and sharp edges of the horn...
  • Page 21 Chapter 4 Hardware installation Place the modified servo horn inside the bracket and secure with 6 * M2.5 screws in the servo package It should look like this To tighten the ultrasonic sensor, we can use several cable ties (Not included in the Kit). Alternatively, you can use other methods: - Use rubber bands...
  • Page 22 Chapter 4 Hardware installation It should look like this...
  • Page 23 Chapter 4 Hardware installation Prepare the Self-tapping screw in the Servo package and tighten the sensor part with servo rack It should look like this Gather four M2.5 screws and corresponding nuts in the FPV package to secure to the bottom chassis...
  • Page 24: Switch

    Chapter 4 Hardware installation Finished! 4.5. Switch The switch can save you a lot energy turning the car on and off. However, it’s just an option. It can be done by putting the switch in line with the battery box power wire. Insert the switch in pre-cut slot Solder the switch in line with the power cable...
  • Page 25 The following diagram shows the switch connection with battery pack and L289N. Caution: Do not modify your programming code when USB cable plugged in Arduino UNO development board and your computer with wires connecting to L289N Motor Drive board as a large amount of current will drain from the USB cable which will burn out the computer USB port.
  • Page 26: Wire Connection

    Chapter 4 Hardware installation 4.6. Wire Connection You are almost there. Final step is to wire the cables to power supply (i.e. Battery Box), UNO board, ultrasonic sensor and Servo. The following diagram shows the connection map. Don’t panic if this is your first project, you can also follow the connection table 2.
  • Page 27 Chapter 4 Hardware installation Figure 4 Arduino Sensor shield v5.0 Diagram Figure 5 Overview...
  • Page 28: Have Fun

    Have fun Have fun Now it’s time to have fun! Turn the power on, and see how your DIY Arduino Robot car goes! After final assembly and activation, the Robot car may require adjustments and debugging. The Robot will perform on how it is programmed. Figuring out what the code is doing is part of the learning process.
  • Page 29: Appendix

    Appendix Appendix Code: ********Code begin******** #include <Servo.h> int pinLB=6; // define pin6 as left back connect with IN1 int pinLF=9; // define pin9 as left forward connect with IN2 int pinRB=10; // define pin10 as right back connect with IN3 int pinRF=11;...
  • Page 30 Appendix digitalWrite(pinRB,HIGH); digitalWrite(pinRF,LOW); digitalWrite(pinLB,LOW); digitalWrite(pinLF,HIGH); delay(e * 50); void stopp(int f) //stop digitalWrite(pinRB,HIGH); digitalWrite(pinRF,HIGH); digitalWrite(pinLB,HIGH); digitalWrite(pinLF,HIGH); delay(f * 100); void back(int g) //back digitalWrite(pinRB,HIGH); digitalWrite(pinRF,LOW); digitalWrite(pinLB,HIGH); digitalWrite(pinLF,LOW); delay(g * 300); void detection() //test the distance of different direction int delay_time = 250; // ask_pin_F();...
  • Page 31 Appendix void ask_pin_F() // test forward distance myservo.write(90); digitalWrite(outputPin, LOW); delayMicroseconds(2); digitalWrite(outputPin, HIGH); delayMicroseconds(10); digitalWrite(outputPin, LOW); float Fdistance = pulseIn(inputPin, HIGH); Fdistance= Fdistance/5.8/10; Serial.print("F distance:"); Serial.println(Fdistance); Fspeedd = Fdistance; void ask_pin_L() // test left distance myservo.write(5); delay(delay_time); digitalWrite(outputPin, LOW); delayMicroseconds(2); digitalWrite(outputPin, HIGH);...
  • Page 32 Appendix if(directionn == 6) back(1); turnR(6); Serial.print(" Right "); if(directionn == 4) back(1); turnL(6); Serial.print(" Left "); if(directionn == 8) advance(1); Serial.print(" Advance "); Serial.print(" "); ********Code End********...

Table of Contents