You are on page 1of 16

ARDUINO MULTI-

FUNCTION SMART
CAR

Revision1 In-depth Installation Guide

Warning: Please do not dispose lithium battery in fire or municipal trash. Unit
can explode if undercharged or overcharged. If punctured please dispose at city
waste management center. This unit can catch on fire if left unsupervised please
do not give to pets or children without supervision. [AK-SMARTCAR]
Arduino Multi-Function Smart Car

I N - D E P T H I N S TA L L AT I O N G U I D E

Table of Contents
PREPARING FOR INSTALLATION ................................................................................................................... 2
Material Checklist ............................................................................................................................................................... 2
Recommended Tools or your Equivalent ........................................................................................................................ 3
INSTALLING MOTORS .................................................................................................................................. 4
Preparing the Base ............................................................................................................................................................. 4
Mounting the Motors .......................................................................................................................................................... 4
Testing Directions................................................................................................................................................................. 5
Optional Adjustments ......................................................................................................................................................... 5
INSTALLING LINE SENSORS .......................................................................................................................... 6
Preparing the Base ............................................................................................................................................................. 6
Installation Method 1.......................................................................................................................................................... 6
Installation Method 2.......................................................................................................................................................... 7
PREPARING TOP PLATE ................................................................................................................................. 7
Installation of Long Standoffs ........................................................................................................................................... 7
Installation of Arduino Standoffs ..................................................................................................................................... 8
Installing H-bridge .............................................................................................................................................................. 8
Installation of Arduino ........................................................................................................................................................ 8
Installation of Kill Switch .................................................................................................................................................... 9
Installation of Battery Holder ........................................................................................................................................... 9
Wiring of H-Bridge ............................................................................................................................................................ 9
ASSEMBLING SERVO MOUNT ..................................................................................................................... 10
Preparing the Servo Mount ............................................................................................................................................. 10
Drilling the holes ................................................................................................................................................................ 10
Assembling Frame of Servo ............................................................................................................................................ 11
Fastening Unit .................................................................................................................................................................... 11
Adjusting Unit ..................................................................................................................................................................... 11
Final Assembly of Servo Mount ...................................................................................................................................... 11
Securing to Top Plate ....................................................................................................................................................... 12
FINAL INSTALLATION PROCESS .................................................................................................................. 12
Wiring Motors to H-Bridge ............................................................................................................................................. 12
Loading Test Code ............................................................................................................................................................ 12
Battery Precautions ........................................................................................................................................................... 12
Powering Up and Testing Unit ........................................................................................................................................ 13
Powering Down and Securing Frames .......................................................................................................................... 13
Installation of Sensors ....................................................................................................................................................... 13

Page 1
Arduino Multi-Function Smart Car
WIRING AND CODE GUIDE ........................................................................................................................ 13
IR Robot ............................................................................................................................................................................... 13
Obstacle avoidance ......................................................................................................................................................... 14
Line tracking ....................................................................................................................................................................... 14
Bluetooth ............................................................................................................................................................................. 15

PREPARING FOR INSTALLATION


Material Checklist
Component Quantity Remarks
Female to Female DuPont Cable X40 Collated to one unit, pull to separate.
DC to 18650 battery holder X1 The remaining two leads to Vms of H-bridge
2.51” Rubber Wheels X4 Designed for minimum traction terrain
4.5cm for 3mm standoff X6 Used for top and bottom plate Support
2.6cm for 3mm standoff X3 Used for line tracking sensors
1.2cm for 3mm standoff X7 Used for Servo to plate attachment and Arduino
to plate attachment
6mm for 3mm screw ~X40 Packaged in Silver Bag
1cm for 3mm screw ~X35 Packaged in Silver Bag
7mm for 3mm nut ~X60 Packaged in Silver Bag
H-Bridge Board X1 L298N H-Bridge PCB
Arduino Sensor Shield X1 Use needle nose plier to align pins if needed
Infrared Line Sensor X3 This guide uses 2
18650 charger X1 Pay attention to polarity
HC-SR04 Sensor X1 Ultrasonic Rangefinder
Motor Mount kit X2 To connect motor to bottom plate
USB A to USB B Cable X1 Arduino Uno programming cable
IR Controller with battery X1 Remove plastic tab from battery compartment
Bluetooth Module X1 Do not remove plastic protection
18650 battery X2 Place in plastic compartment when not in use!
Arduino Uno Compatible X1 Never plug in USB and DC at the same time!
DC Motor with Adapter X4
Servo SG90 kit X1 Comes with screw
Top and bottom extruded acrylic plate X1 Yellow plate is top, Clear is bottom. You can
interchange orders
Infrared Sensor X1 Works with IR Remote
Standoff nylon X2 Kill switch mount
Large switch on-off X1 Kill switch

Page 2
Arduino Multi-Function Smart Car
Recommended Tools or your Equivalent
Needle Nose Plier Philips Screw Driver (+) Flush Wire Cutter

100-007 800-002 #0 902-075

Wire Stripper X-Acto Blade Drill + Bit 3/32”

HT-1043 900-112

Heat Shrink (Optional) Soldering Iron (Optional) Brass Sponge (Optional)

FIT221-3/32-RD WEL-WLC100 TOL-08964

File (Optional)

900-019

Page 3
Arduino Multi-Function Smart Car

INSTALLING MOTORS
Preparing the Base
1. Remove the adhesive protection from the bottom plate.
2. The bottom plate is transparent, whereas the yellow plate is the top plate.

Mounting the Motors


1. Open the Motor Mount Kit and remove the metal block and long screws.
2. Taking the Motor with the Yellow gearbox and locate the extruded bump near the white shaft.

3. Slide in the Long screw from the opposite side, the extruded bump must face inwards when mounting
on the plate.
4. Place two Nuts and lock into place, it will look something like this!

Page 4
Arduino Multi-Function Smart Car
5. Do this for the other three motors and mount them over the slit, the hole on the bottom of the metal
block should line up over the slits. They should look like this:

6. To get the following motor orientations for the wires you can remove the plastic guard using a needle
nose plier and pull the silver motor out. You can then rotate the motor and insert it back in with the
plastic guard back on.
7. On the bottom use some 1cm screws to fasten the metal block to the base acrylic plate.

Testing Directions
1. Twist both positive wires of the motors in parallel shown by the black arrow indicated above.
2. Do the same for the negative wire and supply a (3v – 6v) battery voltage to the motors (DO NOT
USE THE 18650). Note the direction, they should be the same. If not change one of the motor wires to
match the direction. Do the same for the other side. Both motors should be heading in one direction, in
the end all four motors must be heading the same direction.

Optional Adjustments
1. Before mounting the motor onto the frame, you can place a small 3/32” heat shrink tube onto the
motor leads and use a small heat source to shrink the tube to protect the leads from accidental
shortage. Do not use a soldering iron to heat the tube down, a lighter should be sufficient.

Page 5
Arduino Multi-Function Smart Car

INSTALLING LINE SENSORS


Preparing the Base
1. Locate the front of your bottom acrylic plate. The front of the plate has a cluster of premade holes for
mounting components.
2. Using the X-Acto knife at an angle, try to make the holes less thick by rotating the blade around the
hole. Your cut will end up creating this shape:

Plate Hole

3. They are three holes you may need to apply the cut to, depending on the installation type. Their
location will be shown in the picture below.

Installation Method 1
1. Installation Method 1 demonstrates three line sensors mounted onto the bottom plate. This method
gives a better accuracy however it will require additional wires to interface and will scratch the
bottom panel. This is located on the opposite side of the motor, which is the bottom.

Three Sensors Mounted


1 indented inwards

Page 6
Arduino Multi-Function Smart Car
Installation Method 2
Installation Method 2 Demonstrates two line Sensors mounted onto the bottom plate. This method will
result in lower accuracy however it will reduce the wiring required. This is located on the same side of
the motor, which is the top or inside and will require some 2.6mm standoffs.

PREPARING TOP PLATE


Installation of long standoffs
1. According to the following image, please do the same cuts with the X-Acto blade if required to slide
in the long 4.5cm standoffs and fasten the opposite side with some 3mm nuts. The top that is exposed
will be connected to the prepared top plate when stated further down in the instruction guide.

Page 7
Arduino Multi-Function Smart Car
Installation of Arduino Standoffs
1. On the following image, place three of the 1.2cm standoffs located in red. Tighten the opposite side
of the acrylic plate with the 3mm nut. Locate the blue circle as the reference point.

Terminal Block

Front

Installing H-Bridge
1. Looking at the image above, the green color indicates where the H-Bridge terminal block will be
located and where is should be facing. The H-Bridge will be hanging underneath the acrylic plate.
Once this unit is installed then you can place the Uno over and screw into place.
2. Take the H-Bridge and orient the Terminal blocks to the position suggested, using some 1cm screws
and place into the screw holes of the H-Bridge with the flat head on the side of the heatsink.
3. Flip the board and screw some 3mm screws to keep the screw in place and to provide spacing, insert
into the purple circle indicated in the image above and place another additional nut to fasten into
place. Ensure the direction of the terminal blocks are facing front.

Installation of Arduino
1. Place the Arduino USB Port Facing to the right of this picture, the back two screw mounting holes
should align with the two back standoffs. The front single standoff will be the support of the unit’s
weight and does not need to be fasten down.

Page 8
Arduino Multi-Function Smart Car
Installation of kill switch
1. Using the two nylon spacer insert in the beige circle shown above. On the opposite side use two 7mm
screws to fasten into place. On the top, place a switch and either using a soldering iron, solder the red
wire from the battery compartment or twist tie the red wire to the switch and insulate with electric
tape. The connections of the switch should look like this:

On
Battery
Off

To VMS

2. The second wire is a normal breadboard wire that will connected to the middle contact which goes to
VMS of the H-Bridge. The Middle Connection must always go the H-Bridge, only then when the switch
is left or right, it can be considered an open or closed circuit. Insert two 7mm screws on the top to
secure the unit to the frame.

Installation of the Battery Holder


1. On the back of the top plate place the 18650 Battery holder over the two parallel screw holes and
fasten down with a 7mm screw and 3mm nut on the opposite end. The leads should be located close to
the DC port of the Arduino.
2. DO NOT PLACE THE BATTERY IN UNLESS SPECIFIED!
3. The ground wire of the battery holder will go straight into the GND of the H-Bridge.

Wiring of the H-Bridge


1. Place the top shield over the bottom shield that has the long spacers installed, do not screw them in
place.
2. Take the wires from the motor and insert into Motor A and Motor B connection. The connection might
look like this:

GND1 VCC1 VMS GND N/C GND2 VCC2

Left Side Motors Center Right Side Motors

3. In the back simply connect a 6 pin Female to Female DuPont Cable. Leaving +5v & GND unconnected.
Feed the wires through the hole.

Page 9
Arduino Multi-Function Smart Car

ASSEMBLING SERVO MOUNT


Preparing the Servo Mount
1. Opening the Motor Mount Kit and SG90 Servo Kit remove the “+” shaped gear and cut the long ends
with only two holes left. Using a file you can sand down the gear until it fits in place of the black gear
circular frame or using the flush cutters you can keep trimming the sides down until it fits in place.

Drilling the holes


2. Using a 3/32” Drill bit and driller make small holes from the extremities of the both ends through the
plastic motor mount and holder.

Page 10
Arduino Multi-Function Smart Car
Assembling the Frame of Servo
3. Take the two plastic holder pieces and slide the motor into the unit, firmly lock the unit together and
insert the provided screw to fasten the unit together.

Fastening Unit
4. Insert two long screws included with the SG90 Servo kit and fasten them down into the holes of the
plastic motor mount and holder.

Adjusting Unit
5. Place the Servo motor inside the grooves of the plastic motor mount. Twist the Motor by hand to the
maximum endpoint. If you move clockwise that is your starting point. If counter clockwise it is your
ending point.
6. Adjust the motor by pulling it out and reseating in the proper position of the groove and test again
before you insert the final screw.

Final Assembly of Servo Mount


7. Flip over the unit and insert from the SG90 kit the big washer based screw to keep the unit securely
firm.
8. Taking four 1.2mm standoffs place the male end through the plastic and secure with nut on the other
end.

Page 11
Arduino Multi-Function Smart Car
Securing to Top Plate
9. Place the unit on the Acrylic frame and tighten with three 7mm screws, fourth one will act as support.
10. Place the HC-SR04 against the holder with rubber bands to keep them in place. The pins of the sensor
will be sticking upwards, connect four Female to Female DuPont cables to the unit.

FINAL INSTALLATION PROCESS


Wiring Motors to the H-Bridge
1. Taking the Sensor Shield, place it over the Arduino Uno and plug into the unit.
2. The H-Bridge 6 wires will be poking out of the hole, connect them to the following pins.

H-Bridge to Arduino pin ENB-A4 IN4-6S IN3-9S IN2-10S IN1-11S ENA-A5

Loading Test Code


1. Using the provided Blue USB cable connect the Arduino Device as you would normally on any
computer.
2. Open Arduino IDE, ensure the correct device is selected and com port.
3. Upload the motor test sketch. (MotorTest.ino)

Battery Precautions
1. Remove the USB cable when you are done compiling and uploading the code.
2. Never connect the USB cable when you have the Battery cable connected.
3. Never leave the robot unattended on idle with the battery plugged in.
4. These Batteries are extremely dangerous.
5. Avoid under charge as you might not be able to charge them again.

Page 12
Arduino Multi-Function Smart Car
6. Avoid overcharge as they might exploded, the charger should take care of this. However it is a good
practice to check the temperature and voltage of the device constantly with supervision.
7. When not in use place in a plastic storage compartment
8. Do not place the batteries in the wrong orientation and pay very careful attention to it!

Powering Up and Testing Unit


1. Plug the batteries in and feel the temperature of the battery. Ensure that the motor switch is off
beforehand and that the DC port is not connected.
2. Once you have waited a while and see the batteries are not smoking or getting hot, insert the DC port
into the Arduino and check the temperature of the Arduino and the temperature of the battery.
3. Once that is good turn on the switch and view the motor leds light up and note the directions of the
motor. If the motor is spinning the correct direction read power down. If the motors are not spinning in
the correct direction, remove the DC Adapter and switch the motor off. Change one of the motor
Wiring direction. Plug back in and re-test.

Powering Down and Securing Frames


1. Once you have confirmed the unit is heading in one direction for all wheels and does the sequences
which it is coded to do, simply remove the DC port and turn the switch off. Now using the 6mm screw
fasten the longer spacers of the bottom frame to the top frame.
2. Insert the wheels and if the wheels are rubbing on the acrylic frame simply sand the plate inwards.

Installation of Sensors
1. Install the Bluetooth sensor using zip ties to lock the sensor down onto the board and connect four
DuPont Female to Female cables.
2. Install the IR sensor using zip ties to lock the sensor down onto the board in the back and connect three
DuPont Female to Female Cables.
*NOTE: YOU NEED TO CONNECT SEL AS SHORT NEXT TO THE TERMINAL BLOCK, IF YOU WANT V
AND G TO PROVIDE POWER ON THE SENSOR SHIELD!

WIRING AND CODE GUIDE


IR Robot
Wiring on Shield Wiring on Sensor Code
IRremote_car.ino
Using remote control to tell
robot which direction to
move.
#2 Forward, # 5 Brake, 8
Reverse, # 4 left and #6
Right.
Read header in code for
assistance.

Page 13
Arduino Multi-Function Smart Car
Obstacle Avoidance
Wiring on Shield Wiring on Sensor Code
obs_avoid.ino
Using HC-SR04
and Servo to
sweep and detect
objects to avoid.

Line Tracking 2-Tracker only


Wiring on Shield Wiring on Sensor Code
tracking_car.ino
Using line sensor to detect
black line to follow. Adjust
potentiometer for
resolution.

Code only requires 2, for


three uncomment middle
sensor.

Page 14
Arduino Multi-Function Smart Car
Bluetooth
Wiring on Shield Wiring on Sensor Code
bluetooth_car.ino
1. Never connect when
uploading code.
2. EN and state not
required.
3. Upload
BluetoothSPP.apk to
get device working
4. Allow install from
unknown sources
5. Once installed open
application pair to
HC-06 lowest value
since it is near.
6. Press the menu
button to open as
normal mode.
7. Send keystrokes to
move device. View
header for
information.

Code can be found at www.abra-electronics.com and search AK-SMARTCAR in documentations you can find
French manual and code folder!
Le code peut être trouvé à www.abra-electronics.com et de recherche AK-SmartCar. Dans les documentations
que vous pouvez trouver manuel en français et le dossier de code!

Page 15

You might also like