Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
by deba168
Most of my Instructables are based on renewable energy, battery or recycling used materials. In
this Instructable, I have tried something new i.e., making a simple Arduino based robot car. This
is my first try to make a robot in my life. If you have never tried to make robot, you must be
thinking its a difficult hobby to jump into, but the Arduino and the 2WD / 4WD Robot Chassis
make it easy for you to build an awesome robot without any struggle.
I always love to share my knowledge learned from my experience. So writing this guide, it will
make easy for you to learn the basics of robotics and applications of the Arduino.
Many people request me to make a tutorial on Obstacle Avoiding Rover.So I made it finally.
Arduino_Obstacle_Avoiding_Rover.ino
Parts :
8. 0.5 sq mm Wires
Tools Required :
1. Structure / Chassis
2. Actuator / Motor
3. Controller
4. Inputs / Sensors
5. Power Supply
In the next steps I will describe each of the above components, so that you can understand easily.
Step 4: Actuator
An actuator can be defined as a device that converts energy (in robotics, that energy tends to be
electrical) into physical motion. Most of the actuators produce either rotational or linear motion.
In our case the actuator is DC gear motor.It is basically a DC motor combined with a gearbox that
works to decrease the motors speed and increase the torque.
Example : A DC motor having speed 3000 rpm and torque 0.002 Nm . Now we add a gear to it
with gear ratio 1:48.The new speed is reduce by a factor 48 ( resulting 3000/44 = 68 rpm ) and the
torque increased by a factor of 48.( resulting 0.002 x 48 = 0.096 N.m.
Step 5: Prepare the Motors Terminal
Cut 4 pieces of red and black wires with length approximately 5 to 6 inch.I was using 0.5 sqmm
wires.
You can check the motor polarity by connecting it to the battery pack.If it rotates in forward
direction ( red wire with positive and black wire with negative terminal of the battery) then the
connection is ok.
Attach the two acrylic fastener to each motor using two long bolts and two nuts.You can watch
the assembling video to know the details.
Note that the wires on each motor are pointing toward the centre of the chassis.
Join the two red wires and black wires of the motor on each side of the chassis.
So after joining, you have two terminals on left side and two terminal on right side.
Now the robot chassis and actuator are added but controller is missing.Chassis without controller
means nothing will happen. Your robot will sit in one place.Its just like a human without life.
So a controller ( brain ) is needed to move the robot from one place to another.It is a computing
device capable of executing a program and is responsible for all computations, decision making,
and communications.In our case, we are using an Arduino Nano microcontroller as a Controller.
The controller takes input ( sensors, Remote etc ) , process it and then gives a command to the
actuator ( motor ) to do the desired task.
If you take a battery hook the positive side to one side of your DC motor. Then you connect the
negative side of the battery to the other motor lead. The motor spins forward. If you swap the
battery leads the motor spins in reverse. You can use your microcontroller to rotate the motor in
one direction.But if you want to be able to control the motor in both forward and reverse with
your microcontroller, you will need more circuitry. You will need an H-Bridge
The term H bridge is derived from the typical graphical representation of such a circuit .It is a
circuit which can drive a DC motor in forward and reverse direction.
Working : See the above picture for understanding the working of the H bridge.It is consists of 4
electronics switches S1,S2,S3 and S4 ( Transistors / MOSFETs/ IGBTS ).
When the switches S1 and S4 are closed (and S2 and S3 are open) a positive voltage will be applied
across the motor.So it rotates in the forward direction.Similarly when S2 and S3 are closed and S1
and S4 are opened a reverse voltage is applied across the motor, so rotates in revers direction.
Note : The switches in the same arm ( either S1,S2 or S3,S4) are never closed at a same time, it
will make a dead short circuit.
H bridges are available as integrated circuits, or you can built your own by using 4transistors or
MOSFETs.
In our case we are using LM298 H-bridge IC that can allows to control the speed and direction of
the motors.
Pin Description :
GND: Ground
5v: 5V output if 12V jumper in place, ideal for powering your Arduino (etc)
EnA: Enables PWM signal for Motor A (Please see the "Arduino Sketch Considerations" section)
BEnB: Enables PWM signal for Motor B (Please see the "Arduino Sketch Considerations" section)
Step 10: Input / Sensors
Unlike humans, robots are not limited to just sight, sound, touch, smell and taste. Robots use
different sensors to interact with the external world.
A sensor is a device that detects and responds to some type of input from the physical environment.
The specific input could be light, heat, motion, moisture, pressure, or any one of a great number
of other environmental phenomena.
In this basic tutorial I am using Smartphone as a input device to control the Rover.
Step 11: Power Source
Show All Items
A robot needs a power source to drive the actuators ( motors ) and the controller. Most of the robots
are powered by a battery.When we talk about battery, there are lot of options
3. Li Ion Battery
4. LiPo Battery
So according to the requirement choose the suitable one.In my opinion, always choose a
rechargeable and sufficient capacity battery.I used 2nos of 2600mAh LiIon Battery ( 18650
Samsung Brand ).If you need more power for autonomy you can choose a large battery pack like
5A turnigy.
Battery Holder :
The battery holder that I am using is ordered from china.It is not suitable for flat top battery like
Samsung. So I attached two neodymium magnets on the positive terminal of the battery to fit
perfectly.
Charging :
You need a good charger to charge the battery pack.As per my experience these are few good
chargers
I used hot glue to mount the Battery Holder, Motor Driver (LM 298 ) and Mini Bread Board.You
can also screw it.
Connect the red wires of two motors ( on each side )together and black wires together.So finally
you have two terminals in each side.
MOTORA is in charge of two right side motors, correspondingly two left side motors are
connected to MOTORB
IN1 -> D5
IN2-> D6
IN2 ->D9
IN2-> D10
Rx-> Tx
Tx ->Rx
Power
GND -> Connect Battery Black wire and Arduino GND pin
After installing the app, you have to pair it with the Bluetooth module.The password for pairing
is " 1234 ".
If all the functions work perfectly, then its ready for actual operation.
Note : If the motors are rotate in wrong directions, just swap the wires.
You can add different sensors according to the requirements. These are some ideas to be
implemented in future