Authorized Online Retailers:

AMAZON
AMAZON-jp
amzuk

Welcome to the first lesson of Arduino smart car!

Objective

In this “Hello World” version lesson, we will install the most important framework in the smart car and program the car to do some simple movements. If you have passed the test movement of this lesson, it means Arduino, 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 One, it is very important to test the installation and sample code in this Lesson properly.

Parts and Devices:

Device Name
picture
qty
Screw Number
Arduino UNO
1
M3 x 10 screws and nuts, washers
Motor with wires

4
M3 x 30 screws and nuts
Wheels

4
OSOYOO MODEL X MOTOR driver module
 
1
M3  x 10 screws and nuts, washers
Box for 18650 3.7V battery+
                  1 M3 x 10 screws and nuts
DC power connector

1
voltage meter
1
M3 x 10 screws and nuts, washers
Jumper wires(male-male,male-female)
some
lower chassis

1
Copper pillar
upper chassis
1
Copper pillar

Installation

1)Connect 4 motors on lower chassis with screw M3 x 30

2)Install OSOYOO MODEL X motor driver module to lower chassis with screw M3 x 10, connect OSOYOO MODEL X motor driver module K1 to K4 sockets to 4 motors as per following graph:

3)Install Arduino UNO on upper chassis with screw M3 x 10

4)Install Battery Box on upper chassis with screw M3 x 10

5)Install Voltage meter on upper chassis with screw M3 x 10

6) Connect the Uno board, battery box, Voltage Meter and OSOYOO MODEL X motor dirver module according below connection diagram:

7)Connect Voltage Meter to OSOYOO MODEL X motor dirver module as below connection diagram.

Voltage Meter OSOYOO MODEL X motor dirver module
GND GND
VCC 12V
Vt V0

8)Connect Arduino UNO D2,D4,D5,D6,D7,D8 to OSOYOO MODEL X motor driver module 6 control pins as per following graph (these pins are defined in sample code configuration.h file)

Uno R3 Board OSOYOO MODEL X motor driver module
D2 IN1
D4 IN2
D5 ENA
D6 ENB
D7 IN3
D8 IN4

9)Connect upper chassis to lower chassis with five copper pillar screw supporters, then install 4 wheels onto the motors.

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 Lesson One sample code from http://osoyoo.com/driver/smartcar-lesson1.zip , unzip the download zip file smartcar-lesson1.zip, you will see a folder called smartcar-lesson1 .

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

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

Final Testing :

Disconnect 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 your smart is RUNNING!

When you put the car on the ground, it  should go forward 5 seconds, then go backward 5  seconds, then left turn for 5 seconds, then right turn for 5 seconds, then stop.

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

 

Leave a Reply

WordPress spam blocked by CleanTalk.
Bombax Theme designed by itx