ROBOMART IBOT mini V3 User manual

1
USER MANUAL FOR IBOT mini V3 ROBOTICS KIT
USING AVR STUDIO
-------------------------------------------------------------------------------------------------------------------------------
Note: This tutorial is for the novice user. It shows how to set up AVR Studio 4.x and WinAVR so that C/C++ Source
files will be compiled using GCC. For further information on AVR Studio, AVR Libc, GCC, AVR ISP, AVR JTAG ICE, and
other tools please refer to the documentation which is also installed on the installation. Procedure described here
is followed.
-------------------------------------------------------------------------------------------------------------------------------

2
Table of Contents
1. Introduction ................................................................................................................................... 3
2. Introductions to AVR Series (ATmega8) microcontroller............................................................... 4
2.1.Overview .................................................................................................................................. 4
2.2.Pin Out of Atmega 8 ................................................................................................................. 4
2.3.Pin Descriptions........................................................................................................................ 4
3. Introductions to Motor Driver........................................................................................................ 6
3.1.H-Bridge.................................................................................................................................... 6
3.2.L293D Dual H-Bridge Motor Driver .......................................................................................... 6
3.3.Pin Diagram of L293D............................................................................................................... 7
3.4.Interfacing ................................................................................................................................ 7
4. Block Diagram of Development Board Connected......................................................................... 8
5. Block Description of Development Board Connected.................................................................... 9
6. Assembling IBOT mini V3 ............................................................................................................. 10
7. Starting AVR Studio ......................................................................................................................31
7.1.Writing your first C program ..................................................................................................31
7.2.Compilation of your first C program ......................................................................................32
8. Dumping Program in Development Board Connected.................................................................33
9. Connecting peripherals with IBOT mini V3 .................................................................................. 38
9.1.DTMF Decoder module .......................................................................................................... 38
9.2.Sound Sensor.......................................................................................................................... 39
9.3.Light Sensor............................................................................................................................ 40
10. Study of some C program using Loops and variables...................................................................41
10.1.Running LEDs........................................................................................................................ 41
10.2.Line follower Robot program ............................................................................................... 42

3
1. Introduction
Robots and robotic technologies have an intellectual and emotional appeal that transcends
any other type of engineered product, and this appeal is felt no more so than with children
and young adults. Robots and robotic technologies represent a practical application of
physics, computer science, engineering, and mathematics, and provide a very powerful and
flexible approach to demonstrate a variety of engineering concepts. In addition, robotics
appeals to a broad range of interests and allows multiple points of access to science,
mathematics, and engineering for many types of learners. As a result, robotic technology
and robots are being used by an increasing number of educators at the college level to
reinforce computer science and engineering theory, and to teach basic software and
mechanical engineering at the grammar school, middle school and high school levels. The
giant strides that we have made in the areas of Communications and Computers are
possible only because of the great successes that we have achieved in the field of
Electronics.
It is sometimes unbelievable, how many electronics gadgets that we carry these days in our
person –Digital Wrist-watch, Calculator, Cell-phone, Digital Diary or a PDA, Digital Camera
or a Video camera, etc. The different type of Electronic equipments that has invaded our
offices and homes these days is also mind boggling. Many things we use at home and office
are “remote controlled”, for example, Television (TV), Air-Conditioners, Audio equipment,
Telephone, etc. It is almost close to “magic” how even a child, now-a-days, can switch
channels, or increase decrease the volume of sound in a TV at home by just clicking on a
few buttons sitting at the comfort of a sofa away from the Television apparently without
any physical wiring or connection!
Again, we are astonished, how we are able to talk to our near and dear living several
thousands of Kilometers away, from wherever we are, at home, office, on the road in a car,
or in a classroom –by just clicking a few n umbers on our palm sized cellular phones!
Electronics has made deep impact in several vital areas such as health care, medical
diagnosis and Treatment, Air and space travels, Automobiles, etc. In short, the technological
developments of several countries of the globe are directly related to their strengths in
electronics design, manufacture, products and services. Just as we teach physics, chemistry,
biology and mathematics in our schools, it is high time we start teaching our children at
school, Electronics as a separate subject by itself. This brings us face to face to an important
question: How to teach the basic concepts of such an important subject like Electronics
most effectively? If one wants to gain a good understanding of electronics, he or she should
build circuits and test them independently. For this one should acquire a practical
knowledge of the characteristics of different devices and in constructing the various circuits.
Let us try to learn such skills by the proven scheme of “LEARNING BY DOING”. There is only
one way to learn to do anything: and I found Robotics is the best way to learn all this.
So let’s start doing Robotics!!!

4
2. Introductions to AVR Series (ATmega8) microcontroller
2.1. Overview
The ATmega8 is a low-power CMOS 8-bit microcontroller based on the AVR enhanced
RISC architecture. By executing powerful instructions in a single clock cycle, the
ATmega8 achieves throughputs approaching 1 MIPS per MHz allowing the designer to
optimize power consumption versus processing speed.
2.2. Pin Out of Atmega 8
2.3. Pin Descriptions
VCC: Digital supply voltage.
GND: Ground.

5
Port B (PB7-PB0): Port B is an 8-bit bi-directional I/O port with internal pull-up resistors.
The Port B output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port B pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port B pins are tri-stated when a
reset condition becomes active, even if the clock is not running. Port B also serves the
functions of various special features of the ATmega8.
Port C (PC7-PC0): Port C is an 8-bit bi-directional I/O port with internal pull-up resistors.
The Port C output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port C pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port C pins are tri-stated when a
reset condition becomes active, even if the clock is not running. If the JTAG interface
is enabled, the pull-up resistors on pins PC5 (TDI), PC3 (TMS) and PC2 (TCK) will be
activated even if a reset occurs.
Port D (PD7-PD0): Port D is an 8-bit bi-directional I/O port with internal pull-up resistors.
The Port D output buffers have symmetrical drive characteristics with both high sink
and source capability. As inputs, Port D pins that are externally pulled low will source
current if the pull-up resistors are activated. The Port D pins are tri-stated when a
reset condition becomes active, even if the clock is not running. Port D also serves the
functions of various special features of the ATmega8.
RESET: Reset Input. A low level on this pin for longer than the minimum pulse
Length will generate a reset, even if the clock is not running. Shorter pulses are not
guaranteed to generate a reset.
XTAL1: Input to the inverting Oscillator amplifier and input to the internal clock
operating circuit.
XTAL2: Output from the inverting Oscillator amplifier.
AVCC: AVCC is the supply voltage pin for Port A and the A/D Converter. It should be
externally connected to VCC, even if the ADC is not used. If the ADC is used, it should
be connected to VCC through a low-pass filter.
AREF: AREF is the analog reference pin for the A/D Converter.

6
3. Introductions to Motor Driver
Whenever a robotics hobbyist talk about making a robot, the first thing comes to his mind is
making the robot move on the ground. And there are always two options in front of the
designer whether to use a DC Motor or a stepper motor. When it comes to speed, weight,
size, cost... DC motors are always preferred over stepper motors. There are many things
which you can do with your DC motor when interfaced with a microcontroller. For example
you can control the speed of motor, you can control the direction of rotation, you can also
do encoding of the rotation made by DC motor i.e. keeping track of how many turns are
made by your motors etc. So you can see DC motors are no less than a stepper motor. In
this part of tutorial we will learn to interface a DC motor with a microcontroller. Usually H-
bridge is preferred way of interfacing a DC motor. These days many IC manufacturers have
H-bridge motor drivers available in the market like L293D is most used H-Bridge driver IC. H-
bridge can also be made with the help of transistors and MOSFETs etc. rather of being
cheap, they only increase the size of the design board, which is sometimes not required so
using a small 16 pin IC is preferred for this purpose.
3.1. H-Bridge
3.2. L293D Dual H-Bridge Motor Driver
L293 series of chips are power H-bridge motor drivers. The L293D chip is in 16-pins
dip packages, and has two h-bridge drivers. An H bridge is typically capable of running
one DC motor bidirectional (forward, backwards, off), or two separate motors
unidirectional (forward, off). Thus a L293 chip can run two motors bidirectional, or 4
unidirectional.

8
4. Block Diagram of Development Board Connected

9
5. Block Description of Development Board Connected

10
6. Assembling IBOT mini V3
Let’s Start Assembling the IBOT mini V3 Robotics Kit -
a) Place the Clamp on the DC Gear Motor.
The DC gear Motors provided is fixed using clamps on the chasis board.

11
b) Fix the clamp on the motor using screws provided with the nut bolt packet.
c) Connect both the clamps with both the motors as shown in the below figure.

12
d) Chassis board is provided with package.
The motive behind providing chassis board is –
Give the Robot a base frame
Chassis give the main body of Robot a support while locomotion.

13
e) Place and fix the clamped motors on the chassis board using screws. The placement and
fixes has been highlighted in the figure.

14
f) Caster or support wheel is included in the package.
Place the caster wheel and screw it using the screws.
Caster wheel plays a vital role while Robot is in motion. The designed geometry
needs to balance the weight of the motors.

15
g) After fixing the caster wheel, spacers are connected as depicted in the figure.

16
h) Connect all four spacers as shown in the figure.
The fundamental use of spacers is to provide a support for placing another layer or
development board for robot control.

17
i) Wheels are connected to the motor’s shaft.
j) Connection of the wheel and the shaft.

18
k) Connect both the wheels with both the motors.
(TOP VIEW)

20
l) Fix the wheels connected with the shaft using a small screw as shown in the figure.
m) Place the screw as shown in the figure and tighten it using the screw driver.
Table of contents