Robot Tank Car Kit Lesson 2: Install tank car control board

Byamber

Robot Tank Car Kit Lesson 2: Install tank car control board

Objective:

In this lesson, we will install the most important framework in the tank car and program the car to do some simple movements. If you have passed the test movement in this lesson, it means Arduino UNO board, voltage meter,motor control module, motors, batteries,chassis and wire connections between these parts are all functioning well.

As your experiments in future lessons are all based on frame work of Lesson 1 and lesson 2, it is very important to test the installation and sample code in this Lesson properly.

Parts and Devices:

Name and QTY
Picture
Screw Model and QTY
 UNO R3 board and cable  UNO R3 board and cable  M3*10 philip’s screws and nuts (x4)
 ESP8266 wifi board ESP8266 wifi board

 //
Motor driver board Motor driver board M3*10 philip’s screws and nuts (x4)
Bluetooth Model Bluetooth module //
Tracking sensor Tracking sensor //
Servo motor SG90 with blade and screws Servo motor SG90 //??
Ultrasonic sensor module Ultrasonic sensor M1.6*12 philip’s screws and nuts (x4)
Mount holder for ultrasonic sensor Mount holder for ultrasonic sensor Self-tapping philip’s screws  (x3)
Buzzer sensor module Buzzer sensor module M3*10 philip’s screws and nuts (x1)
Voltage meter Voltage meter M3*10 philip’s screws and nuts (x2)
IR receiver IR receiver M2.5*8 philip’s screws and nuts (x2)
IR remote controller IR remote controller //
DC power connector with wires DC power connector with wires //
Box for 18650 3.7V battery Box for 18650 3.7V battery M3*10 philip’s screws and nuts (x2)
Jumper wires Jumper wires //

I. Adjust the sensitivity of tracking sensor and Install the tracking sensor.

Befor assemble the control board, we need to adjust the sensitivity of tracking sensor.

Connect ESP8266 wifi board to tracking sensor as the following graph. Put the ESP8266 wifi board on UNO R3 board and connect Arduino UNO to PC with USB cable.Then adjust the potentiometer on the tracking sensor with cross screwdriver until you get the best sensitivity status: the signal indicate LED light will turn on when sensor is above white ground, and the signal LED will turn off when the sensor is above black track.

II.Install electronic board on tank car chassis

(1)Install Arduino UNO,ESP8266 expansion board,L298N board,Voltage meter and Buzzer Module on upper acrylic chassis with M3 x 10 philip’s head screws, Install IR receiver  with M2.5*8 philip’s head screws.

acrylic board

Install the ultrasonic sensor on black acrylic board with M1.6*12 philips head screws, then install it on servo arm with philip’s head sharp screws.

(2) Assemble the Neccessary Components

Install the LED lights and tracking sensors on tank chassis;

Install the SG90 servo motor and ultrasonic sensor with M2.5*8 philip’s head screws.

Install the acrylic board on tank car chassis with PCB spacers.

Install the battery box on tank car chassis with M3*10 philip’s head screws.

(3)Connection Diagram

Connect  L298N driving board K1 (or K2) and K3 (or K4) sockets to 2 motors as per the following graph.

L298N-Motor

Connect the 2LED light to ESP8266 wifi board as per the following graph.

LED-ESP8266 Board

Connect the right and left tracking sensors as the following graph.

Tracking-ESP8266-new

Connect the Uno board, battery box, Voltage Meter and L298N according below connection diagram.

Battery box-UNO

Connect Voltage Meter to L298N as below connection diagram.

L298N-voltage meter

Connect buzzer sensor, IR receiver,Ultrasonic Sensor and SG90 servo motor to L298N as below connection diagram.

Buzzer-ESP8266

IR_Receiver-ESP8266

 

UltrasonicSensor-ESP8266

SG90 Servo-L298N

Connect D5,D6,D8,D9,D10,D12 Pins to L298N module 6 control pins as per following graph (these pins are defined in sample code configuration.h file)

L298N-esp8266 wifi

Now hardware installation is almost down. Before we install 18650 batteries into the box, we need burn the sample code into Arduino First.

Software Installation:

Step 1: Install latest Arduino IDE (If you have Arduino IDE version after 1.1.16, please skip this step)Download Arduino IDe from https://www.arduino.cc/en/Main/Software?setlang=en , then install the software.

Step 2: Download the libraries from http://www.kookye.com/download/car/IRremote.zip open arduino IDE  -> click sketch -> Include Libraries->Add .zip Libraries -> choose zip file “IRremote.zip”-> Upload the .zip files

Step 3: Download Lesson One sample code from http://www.kookye.com/download/car/tank_robot_lesson2.zip , unzip the download zip file tank_robot_lesson2.zip, you will see a folder called tank_robot_lesson2 .

Step 4: Connect Arduino UNO to PC with USB cable, Open Arduino IDE -> click file -> click Open -> choose code “tank_robot_lesson2.ino” in tank_robot_lesson2  folder, load the code into arduino.

Step 5: Choose corresponding board/port for your project,upload the sketch to the board.

Testing :

Connect Arduino from PC, put 2 fully-charged 18650 battery into battery pox(check the box instruction and make sure polar direction is correct). Open the power switch in the box and open arduino IDE, set the buat rate as 9600. You will find the information as follows:

welcome to use kookye tank robot car…
send :line follow sensor
send :turn on LED
send :turn off LED
send : test servo
send : test HC-SR04
send : test buzzer
send : test robot go ahead
send : test robot go back
send : test robot stop

When you put the car on the ground and send “line follow sensor”, the signal indicate LED light will turn on when sensor is above white ground, and the signal LED will turn off when the sensor is above black track.

When you send “turn on LED”, the LED light on car should turn on. “turn off LED”, the LED light should turn off.

When you  send servo, the SG90 servo motor should move.

When you send buzzer, the buzzer should beep.

When you send go ahead, it should go forward;send go back,it should go backward;send stop,it should stop.

If the car does not move as per above mentioned result, you should check your wire connection, battery voltage(must over 7.2v).

About the Author

amber administrator

You must be logged in to post a comment