Professional Documents
Culture Documents
User Manual
i
About the User Guide
ArthroBots are walking robots with 2 or more legs. Hence this workshop aims at
giving an opportunity to the students to take a stand and actively participate in the
development of Legged Robots right from scratch. This workshop covers the concepts which
prove to be the basic building blocks of legged robots and enables the students to develop a
“QUADRAPED – 4 Legged Robot”.
The kit contents of this workshop are basically an AVR microcontroller development
board, a set of servo motors and a mechanical structure to forming the robot. The
development board embeds most of the features of AVR microcontroller with special
features to interface servomotors directly on it.
PROPRIETARY NOTICE
This document contains proprietary information furnished for evaluation purposes only; except with the express written
permission of Technophilia, such information may not be published, disclosed, or used for any other purpose. You
acknowledge and agree that this document and all portions thereof, including, but not limited to, any copyright, trade
secret and other intellectual property rights relating thereto, are and at all times shall remain the sole property
Technophilia and that title and full ownership rights in the information contained herein and all portions thereof are
reserved to and at all times shall remain with Technophilia. You acknowledge and agree that the information contained
herein constitutes a valuable trade secret of Technophilia. You agree to use utmost care in protecting the proprietary and
confidential nature of the information contained herein.
ii
Table Contents
1. ARTHROBOTIX PACKAGE CONTENT................................................................ 1
2. PRODUCT DESCRIPTION ................................................................................. 2
Servo motor VTS-08A .................................................................................. 2
Servo motor VTS-08B .................................................................................. 2
Quadruped robotic frame ........................................................................... 3
Box for mounting circuit board and power supply ...................................... 3
Main board ................................................................................................. 3
USB programmer......................................................................................... 3
16x2 LCD ..................................................................................................... 4
Servo interface board .................................................................................. 4
6 band ribbon cable with connector............................................................ 4
5 band FRC cable connector for USB programmer ...................................... 4
Battery (9 Volt) ............................................................................................ 4
Battery (6 Volt, 4.5Ah)................................................................................. 4
Battery Snapper (Battery Caps) ................................................................... 4
DC connector (6mm) ................................................................................... 5
DC connector (6mm) ................................................................................... 5
3. THE MAIN BOARD .......................................................................................... 6
3.1. PARTS IDENTIFICATION ................................................................................... 6
3.2. PARTS DESCRIPTION AND CONNECTION DETAILS .................................................... 6
7805 ............................................................................................................ 6
ATmega16 ................................................................................................... 7
Buzzer ......................................................................................................... 7
DB-9 connector ........................................................................................... 7
LCD Interface ............................................................................................... 7
Switches ...................................................................................................... 7
PROG-Programming .................................................................................... 8
LED .............................................................................................................. 8
ISP ............................................................................................................... 8
BUZZER........................................................................................................ 8
DC JACKs ..................................................................................................... 8
PORTA ......................................................................................................... 9
iii
PORTB and PORTC ....................................................................................... 9
4. THE AVR MICROCONTROLLERS .................................................................... 10
4.1. DESCRIPTION ............................................................................................. 10
4.2. PROGRAMMING.......................................................................................... 10
4.3. SAMPLE CODES ........................................................................................... 11
5. CONCEPTS OF SERVO MOTORS .................................................................... 13
5.1. BASIC PRINCIPLES........................................................................................ 13
5.2. SERVO WIRING........................................................................................... 13
5.3. SERVO VOLTAGE (RED AND BLACK/BROWN WIRES) ............................................ 14
5.4. SIGNAL WIRE (YELLOW/ORANGE/WHITE WIRE) ................................................ 14
5.5. SERVO CURRENT ......................................................................................... 14
iv
v
1. ArthroBotix Package Content
The ArthroBotix Kit can be used for most of the microcontroller based applications and
developments. Also this kit enables one to construct different walking robot models using
servo motor control in different ways.
Package Contents:
1
2. Product Description
This motor is basically used to drive the hip of the robot. The specifications of this motors
are given below :-
Color : black
Operating voltage : 4.8-6.0V
PWM Input Range : Pulse Cycle 20±2ms, Positive Pulse 1~2ms
STD Direction : Counter clockwise/Pulse Travelling 1500 to 1900sec
Stall Torque : >=5kgf.cm (69.6 oz/in) at 4.8V>=5kgf.cm (83.4 oz/in) at 6V
Operating Speed : 0.33sec/60A at no load at 4.8V, 0.3sec/60A at no load at 6V
Weight : 43g (1.5oz)
Size : 43x23x38.2mm (1.69x0.91x1.5in)
Plug Available : FUT, JR
Special Feature : Heavy Duty Plastic Gears, Economy Servo
This motor is basically used to drive the front and back legs. The specification of this motors
are given below :-
Color : gray
Operating voltage : 4.8-6.0V
PWM Input Range : Pulse Cycle 20±2ms, Positive Pulse 1~2ms
STD Direction : Counter clockwise/Pulse Travelling 1500 to 1900sec
Stall Torque : >=4kgf.cm (55.6 oz/in) at 4.8V>=5kgf.cm (69.5 oz/in) at 6V
Operating Speed : 0.25sec/60A at no load at 4.8V, 0.2sec/60A at no load at 6V
Weight : 43g (1.5oz)
Size : 43x23x38.2mm (1.69x0.91x1.5in)
Plug Available : FUT, JR
Special Feature : Heavy Duty Plastic Gears, Economy Servo
2
Quadruped robotic frame
It consists of 2 laser-cut acrylic sheets provided with servo motor mounting mechanical
couplings, 2 precisely constructed and bent aluminum legs, and necessary couplers including
nuts and bolts etc…
This is basically a metallic box to hold the AVR development board and power supplies. This
is also the main control station of the robot.
Main board
This is called the brain of the robot/ It has the following features :-
USB programmer
This device is also called burner or downloader. This device is basically used to transfer
codes from PCs or Laptops to microcontroller through a USB port.
3
16x2 LCD
This device can be use to display any message, status or also can be use for debugging
purpose.
It is a small connector board used to reduce the number of wires needed to connect the
servo motors with the main board.
These are basically a set of wires use to establish connection in between the main board and
the servo interface board.
It is used to establish connection in between the programmer and the main board.
Battery (9 Volt)
It is basically a small size 9V battery use to provide power to the main board.
It is a 6V lead acid battery which provides better power and hence is used to drive servo
motors.
4
DC connector (6mm)
This is used to provide power supply of 6V to the main board which can be used to drive the
servo motors as well.
DC connector (6mm)
This is used to provide power supply of 9V to the main board which is used to drive the
accessories connected with the main board.
5
3. The main board
3.1. Parts identification
7805
It is a three terminal 5V voltage regulator IC used to provide a constant voltage of 5V
to the micro controller and other peripherals attached in the main board.
6
Max232
This IC takes care of voltage conversion needed to communicate with the PC's RS232
(Serial/COM) port.
ATmega16
This microcontroller chip is the major processing chip of the board. It stores and
executes the necessary programs and data needed for controlling a robot.
Buzzer
It can be easily use to get audible feedback from the controller.
DB-9 connector
This is a 9 pin connector use to download program in the micro controller through
PC or can be use to communicate with the PC through UART.
LCD Interface
It can be used to interface a16x2 LCD in 4 bit mode or it can also be used as a general
purpose input output port. The pin connections for interfacing a LCD are given
bellow.
RS - Port C0
RW - Port C1
E - Port C2
D0 - Port C4
D1 - Port C5
D2 - Port C6
D3 - Port C7
Switches
S1 - Port A4 active low
S2 - Port A5 active low
S3 - Port A6 active low
S4 - Port A7 active low
S5 - Port D2, Interrupt INT0 (active low).
PON - Power ON
It is basically a push to on push to off type switch used to provide power
supply to the main board.
ES - External Supply
7
It is basically a toggle switch which toggles the power for the devices
connected to Port B and Port C, either to use the internal power supply (5V)
of the main board or to use any other external power source connected in DC
jack2.
PROG-Programming
It is also a toggle switch which sets the serial port in two modes either in
Programming mode or in UART mode.
LED
Active high
RED - Port B0, Port B1, Port B2, Port B3
BLUE - Power on indicator
ISP
It is the In System Programming interface of the main board which can be used to
connect any ISP programmer to download program in the microcontroller. It can also
be used in a SPI (Serial Peripheral Interface) communication.
MO - Master out Slave in
MI - Master in Slave out
SCK - Serial clock
RST - Reset
GND - Ground
BUZZER
Connected in active high mode
Port A7
J1-Buzzer enabled
DC JACKs
DC jack1 (3mm small one)-Main power supply (minimum 7VDC, maximum 16VDC)
DC jack2 (6mm big one)-External Power supply optional
8
PORTA
Can be used as both I/O and ADC, pins are in the form of DATA-VCC-GROUND.
9
4. The AVR Microcontrollers
4.1. Description
The AVR is a Modified Harvard architecture 8-bit RISC single chip microcontroller which was
developed by Atmel in 1996. The AVR was one of the first microcontroller families to use on-
chip flash memory for program storage, as opposed to One-Time Programmable ROM,
EPROM, or EEPROM used by other microcontrollers at the time.
Atmel's low power, high performance AVR microcontrollers handle demanding 8 and 16-bit
applications. With a single cycle instruction RISC CPU, innovative Pico Power® technology,
and a rich feature set, the AVR architecture ensures fast code execution combined with the
lowest possible power consumption.
Whether you program in C or assembly, the tuned AVR instructions decrease program size
and development time. The well-defined I/O structure limits the need for external
components and reduces development cost. A variety of internal oscillators, timers, UARTs,
SPIs, Pulse Width Modulation, pull-up resistors, ADCs, Analog Comparators and Watch-Dog
Timers are some of the features available for creative engineers.
The AVR microcontrollers are divided into 4 families tiny AVR, mega AVR, XMEGA and
Application specific AVR. Among these 4 families of AVR here we are going to use a
microcontroller of mega AVR family “ATmega16”
4.2. Programming
WinAVR is a suite of executable, open source software development tools for the Atmel’s
AVR series of RISC microcontrollers hosted on the Windows platform. It includes the GNU
GCC compiler for C and C++.
10
F_CPU = 8000000 (change it as for your crystal frequency)
AVRDUDE_PROGRAMMER = stk500 (here write down you programmers
name. If you are using Technophilia’s USB programmer, then enter
“USBASP”).
g. Save the make file in your folder without changing its name
4. Now open the programmers notepad
5. To compile your code and to generate hex file (Tools→ make all)
6. To upload your code into your UC (Tools → program)
PORTB=0x05;
while(1)
{
}
return 0;
}
11
#include<avr/io.h> //This is the header for AVR Microcontroller.
int main(void)
{
PORTB=0x00; // Port B initialization as all bits low
DDRB=0xFF; // Port B data direction configuration as output port
PORTA=0xFF; // configuring the PORTA in pull-up mode.
DDRA=0x00; // Port A data direction configuration as input port.
while(1)
{ if((PINA &
0x10)==0x00)
{
PORTB=0x01;
}
else if((PINA & 0x20)==0x00)
{
PORTB=0x02;
}
else if((PINA & 0x40)==0x00)
{
PORTB=0x04;
}
else if((PINA & 0x80)==0x00)
{
PORTB=0x08;
}
}
return 0;
}
int main(void)
{
PORTB=0x00; // Port B initialization as all bits low.
DDRB=0xFF; // Port B data direction configuration as output port .
while(1)
{
PORTB=0xff;
delayus(1000);
PORTB=0x00;
delayus(19000);
}
}
#include<avr/io.h>
12
#include<technophilia/delay.h> //header file to generate time delay.
#include<technophilia/lcd.h> //header file for interfacing LCD
int main()
{
lcd_init();
lcd_string("TECHNOPHILIA"); // function to print a string
while(1)
{
}
return 0;
}
Servos are DC motors with built in gearing and feedback control loop circuitry. Servos are
extremely popular with robot, RC plane, and RC boat builders. Most servo motors can rotate
about 90 to 180 degrees. Some rotate through a full 360 degrees or more. However, servos
are unable to continually rotate, meaning they can't be used for driving wheels (unless
modified), but their precision positioning makes them ideal for robot arms and legs, rack
and pinion steering, and sensor scanners to name a few. Since servos are fully self
contained, the velocity and angle control loops are very easy to implement, while prices
remain very affordable. To use a servo, simply connect the black wire to ground, the red to a
4.8-6V source, and the yellow/white wire to a signal generator (such as from your
microcontroller) . Vary the square wave pulse width from 1-2ms and your servo is now
position/velocity controlled.
Servos can operate under a range of voltages. Typical operation is from 4.8V to 6V. There
are a few micro sized servos that can operate at less, and now a few Hitec servos that
operate at much more. The reason for this standard range is because most microcontrollers
and RC receivers operate near this voltage. So what voltage should you operate at? Well,
unless you have a battery voltage/current/power limitation, you should operate at 6V. This
is simply because motors have higher torque at higher voltages.
While the black and red wires provide power to the motor, the signal wire is what you use
to command the servo. The general concept is to simply send an ordinary logic square wave
to your servo at a specific wave length, and your servo goes to a particular angle (or velocity
if your servo is modified).
So how do you apply this square wave to your servo? If your robot is remote controlled,
your RC receiver will apply the proper square wave for you. If however your robot is running
from a microcontroller, you must: bring high a digital port wait between1-2ms bring low the
same digital port for next 18 ms. Repeat this procedure until the servo reaches the desired
angle.
14
Servo current operates the same as in a DC motor, except that you now also have a hard to
predict feedback control system to contend with. If your DC motor is not at the specified
angle, it will suddenly draw huge amounts of current to reach that angle. But there are
other peculiarities as well. If you run an experiment with a servo at a fixed angle and hang
precision weights from the servo horn, the measured current will not be what you expect.
One would think that the current would increase at some fixed rate as the weights increased
linearly. Instead you will get unpredictable curves and multiple rates.
In conclusion, servo current draw is very unpredictable.
15