You are on page 1of 20

ARTHROBOTIX

User Manual

i
About the User Guide

ArthroBotix is a workshop especially designed for robotics enthusiasts of all


disciplines from diploma Institutes to Engineering Colleges of all the branches like
Electronics, Telecommunication, Mechanical, Computer Science, Production, Metallurgy etc.

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:

Sr. No Product Quantity


1. Servo motor VTS-08A (grey) 1
2. Servo motor VTS-08B (black) 2
3. Quadruped robotic frame 1
4. Box for mounting circuit board and power supply 1
5. Main board 1
6. USB programmer 1
7. 16x2 Blue LCD 1
8. Servo interface board 1
9. 6 band ribbon cable with connector 1
10. 5 band FRC cable connector for USB programmer 1
11. Battery (9 Volt) 1
12. Battery (6 Volt,4.5Ah) 1
13. Battery Snapper (Battery Caps) 1
14. DC connector 6mm 1
15. DC connector 3mm 1

1
2. Product Description

Servo motor VTS-08A

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

Servo motor VTS-08B

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…

Box for mounting circuit board and power supply

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 :-

Includes ATmega 16 Microcontroller with 16kb flash memory working at 16MIPS


Compatible with ATmega 8535, ATmega 16, ATmega 32
On board LCD interface (it can also be used for any other general purpose
application)
On board regulated power supply
PC interface through UART
Buzzer interface
16 MHz external crystal
Exposed 8 channel I/O port for ADC and servo control with 5V 1A power supply
Exposed 16 channel I/O port for servo control with dual power supply
(configurable to external or internal)
Six tactile switches for external input, reset and interrupts
Four test LEDs for status and debugging purpose
Exposed ISP pins compatible with USB programmer

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.

Servo interface board

It is a small connector board used to reduce the number of wires needed to connect the
servo motors with the main board.

6 band ribbon cable with connector

These are basically a set of wires use to establish connection in between the main board and
the servo interface board.

5 band FRC cable connector for USB programmer

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.

Battery (6 Volt, 4.5Ah)

It is a 6V lead acid battery which provides better power and hence is used to drive servo
motors.

Battery Snapper (Battery Caps)

It is used to connect the 9V battery.

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

3.2. Parts description and connection details

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).

RS - Reset 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.

PORTB and PORTC


Can be used as both I/O port, pins are in the form of DATA-VCC-GROUND, Data pins
are towards Microcontroller, specially designed for interfacing servo motors, vcc5v or
external supply can be toggled by using switch “ES”.

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++.

Steps for writing a code using WinAVR

1. Open the programmers notepad and write your code


2. Create a new folder and save your code in that folder with extension name “.c”
3. Now open the make file and edit it as mentioned below
a. Make file→ main filename (give your file name here without extension)
b. Make file→ MCU type→ atmega→ (chose your UC)
c. Make file→ Debug format→ AVR-ext-COFF
d. Make file→ Programmer→ select your programmer (if your programmer is
not in the list then skip step3.d)
e. Make file→ port→ select the port where you have connected your
programmer
f. Make file→ enable editing make file→ then in your make file edit the
following things

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)

4.3. Sample codes


Code1. Program to send data 0x05 on port B

#include<avr/io.h> //basic header file for avr micro controllers


int main(void)
{
PORTB=0x00; // initialization of port A as all bits low.
DDRB=0xFF; // data direction declaration of port A lower bits as output port.

PORTB=0x05;

while(1)
{

}
return 0;
}

Code2. Program to blink all the LEDS connected in portB

#include<avr/io.h> //This is the header for AVR Microcontroller.


#include <technophilia/delay.h> //header file to generate time delay.
int main(void)
{
PORTB=0x00; // Port A initiallization as allbits low.
DDRB=0xFF; // Port A data direction declaration as out put.
while(1) //This is for the the infinity loop.
{
PORTB=0X0F;
delayms(1000);
PORTB=0X00;
delayms(1000);
}
return 0;
}

Code3.Taking input from a port

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;
}

Code 4.Generating frequency

#include<avr/io.h> //This is the header for AVR Microcontroller.


#include <technophilia/delay.h>//header file to generate time delay.

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);
}
}

Code 4.Interfacing 16x2 LCD

#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;
}

5. Concepts of servo motors

5.1. Basic Principles

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.

5.2. Servo Wiring

All servos have three wires:


1. Black or Brown is for ground.
2. Red is for power (~4.8-6V).
3. Yellow, Orange, or White is the signal wire (3-5V).
13
5.3. Servo Voltage (Red and Black/Brown wires)

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.

5.4. Signal Wire (Yellow/Orange/White wire)

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).

“The wavelength directly maps to servo angle”.

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.

The standard time vs. angle is represented in this chart:

5.5. Servo Current

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

You might also like