Вы находитесь на странице: 1из 60

Seminar on “Mobile Robotics” – First page

NIT Warangal
ACKNOWLEDGEMENT

™ Mobile Robotics Lab, AE, IISc


™ POR Lab, NIT Warangal

NIT Warangal
AGENDA

• Introduction
• Concept
• Stepper Motor Basics
• Parallel port programming
• Robocar – an application
Mobile robot
• Discussion

<http://frontier123.blogspot.com>/
Evolution

‰ The word robot comes from the Czech


word "robota", meaning "forced labor."

‰ A robot is an electro-mechanical device


that can perform autonomous or
preprogrammed tasks.

<http://frontier123.blogspot.com>/
Laws of Robotics
(Asimov, 1942)

‰ Zeroth Law: Robot may not injure humanity, or, though


inaction, allow humanity to come to harm.

‰ First Law: A robot may not injure a human being, or, through
inaction, allow a human being to come to harm, unless this would
violate a higher order law.

‰ Second Law: A robot must obey orders given it by human


beings, except where such orders would conflict with a higher
order law.

‰ Third Law: A robot must protect its own existence as long as


such protection does not conflict with a higher order law.

<http://frontier123.blogspot.com>/
What is Robotics science?

‰ Robotics is the science or study of the technology


associated with the design, fabrication, theory, and
application of robots.

‰ The technology developed to combine software,


mechanical manipulators, sensors, controllers and
computers to provide programmable automation.

‰ Robots are nothing but very sophisticated and


intelligent machines that are helpful.

<http://frontier123.blogspot.com>/
APPLICATION

‰ Edutainment
¾ Educational Robots, Robot Toys, Entertainment, Robotic Art
‰ Outdoor Robotics
¾ Land, Sea, Air, Space Æ Wheeled Mobile Robot
‰ Advanced production systems
¾ Industrial robotics
‰ Adaptive robot servants and intelligent homes
¾ Indoor Service Robots, Ubiquitous Robotics
‰ Network Robotics
¾ Internet Robotics, Robot ecology
‰ Health Care and Life Quality
¾ Surgical Robotics, Bio-Robotics, Assistive Technology
‰ Military Robotics
¾ Intelligent Weapons, Robot Soldiers, Super-humans

<http://frontier123.blogspot.com>/
Wheeled Mobile Robot…

¾ Easy to startup with, into robotics.

¾ There has been a convergence of research talents in


recent years.

¾ Motor driven wheels are the only moving part.

¾ a self-propelled and self-contained robot that is


capable of moving over a mechanically
unconstrained course.

<http://frontier123.blogspot.com>/
AGENDA

• Introduction
• Concept
• Stepper Motor Basics
• Parallel port programming
• Robocar – an application
Mobile robot
• Discussion

<http://frontier123.blogspot.com>/
CONCEPT

¾ Mechanics (31%)
¾ Electronics (29%)
¾ Mathematical modeling
concepts (21%)
¾ Software (19%)

<http://frontier123.blogspot.com>/
MECHANICS

‰ The body structure


¾ Chasis (Aluminum, wood)
ƒ Strength issue
ƒ Dimension and weight issue
¾ Wheel placement, and Payloads

‰ Selection of motor
¾ Brushed DC motor Æ Common
¾ Brushless DC motor Æ High speed requirement
¾ Servo motor Æ Feedback requirement
¾ Stepper Motor Æ Better control, but slow

<http://frontier123.blogspot.com>/
CONTINUED…

‰ Requirements:
¾ Aluminum sheets
¾ Nuts and bolts
¾ Hacksaw (for cutting)
¾ File (for smoothening)
¾ Rubber wheels with better grips
¾ Front free wheel

‰ Aluminum chasis
‰ Front free wheel
‰ Two back wheels controlled by motor
‰ Wheels coupled to stepper motors

<http://frontier123.blogspot.com>/
electronics

‰ Component selection and Design (35%)


¾ Controller, Sensors
¾ Circuit Design
¾ Power supply

‰ Fabrication or assembling (25%)


¾ Soldering
¾ Interface between different modules

‰ Testing and Debugging (40%)


<http://frontier123.blogspot.com>/
Basic Electronics

‰ Most of digital circuits use TTL (Transistor Transistor Logic) logic:


¾ Logic High: 2 – 5V
¾ Logic Low: 0 – 0.8V

‰ Basic components
¾ Resistors (1/4 W, ½ W) (Fixed/Variable)
¾ Capacitors (Electrolytic, Ceramic)
¾ ICs, Transistors, Diodes, voltage regulator
¾ LEDs

‰ Other requirements
¾ Power supply
¾ Connecting wires, cables
¾ Twisser, Stripper
¾ Bread board, Vero-board

<http://frontier123.blogspot.com>/
Identifying components

Resistors Variable resistors Capacitors LEDs

Voltage regulator IR LEDs TSOP 1738


(IR sensor)

<http://frontier123.blogspot.com>/
TOOLS and Equipments

Twisser and stripper Soldering rod, flux and Lead Digital Multimeter

C.R.O. Function Generator Analog multimeter

<http://frontier123.blogspot.com>/
CIRCUIT BUILDING
¾ First, test the circuit on bread-board if using first time.

¾ Choose the Veroboard and plan the proper placements of


components on board.

¾ Practice well for soldering.

¾ All the grounds should be common.

¾ Always use voltage regulator 7805 IC for TTL circuits.

¾ Use IC sockets, extension pins, male-female connectors.

¾ Test for continuity, once soldering the circuits is completed.

¾ Take care of IC pin numbers while inserting into the socket.

¾ Switch the power supply before removing any chip.

<http://frontier123.blogspot.com>/
CONTINUED…

Fig. Perforated strip-board (Vero-board)

¾ Select the kind of board as per requirement.


¾ Use twisser for placing components as well as ICs.
¾ Plan the placement of components well in advance.
¾ Place components on one the facing side as in fig (a). Connections to be
made on the other side, with metallic layer.
¾ Scratch the wires before soldering, to remove oxides.
¾ Pointed soldering rod is a better option. Use flux and Lead

¾ Use 7805 regulator, diode, IC socket,


Connectors.
¾ Don’t make connection on the facing side.

<http://frontier123.blogspot.com>/
Mathematical Modeling

Each motor comes with specifications such as maximum


current rating, number of steps per revolution, etc.

‰ For distance travel calculation


¾ Circumference of wheel = 2πr, is the distance covered by one
revolution by wheel.
¾ One of the motor is put in flipped manner, i.e. clockwise
motion of the flipped one will lead to backward motion rather
than forward motion.

ƒ 1 revolution = 200 steps (for e.g. from specifications)


ƒ No. of steps required for X distance = X /(2πr) * 200
Where, r = radius of wheel

<http://frontier123.blogspot.com>/
Algorithm For Turning

‰ For turning – 3 common strategies:


¾ Stop one wheel and move the other.

¾ Move one in forward direction and the other in backward. [This


strategy is followed in e.g. here.]

¾ Slow down one of the wheel.

Fig. one wheel Fig. Two wheel turning Fig. One wheel
moving and the in forward and moving faster
other stopped backward direction than other

<http://frontier123.blogspot.com>/
… CONTINUED

For turning – by 2nd strategy:

ƒ 1 revolution = 2πc = 200 steps of seqences

πc = 180o => xo =(π/180 * x)c = yc,


where d=width of robo, i.e. distance between
wheels.

ƒ yc=(200/2π * y) steps

<http://frontier123.blogspot.com>/
SOFTWARE

¾ C/C++
» Basic Linux environment
» Serial/Parallel port interfacing

¾ Assembly language
ƒ Emulator
ƒ Embedded software developer
» Keil
» EZ programmer

<http://frontier123.blogspot.com>/
AGENDA

• Introduction
• Concept
• Stepper Motor Basics
• Parallel port programming
• Robocar – an application
Mobile robot
• Discussion

<http://frontier123.blogspot.com>/
Stepper Motor

‰ Stepper motors is a electromagnetic device that


converts digital pulses into mechanical rotation.

‰ Stepper motor uses the simple principle of Lenz’s


Law.

‰ When the stator coil is energized, electromagnetic


field is produced which in turn rotates the permanent
magnet (rotor).
<http://frontier123.blogspot.com>/
Continued…

‰ Types of Stepper Motor ‰ Leads configurations


¾ variable reluctant ¾ 4 lead
¾ permanent magnet ¾ 5 lead
¾ 6 lead
¾ hybrid motor.

‰ Modes of operation
‰ Configurations ¾ Full step
¾ Bipolar ¾ Half step
¾ Unipolar ¾ Micro stepping

<http://frontier123.blogspot.com>/
Merits Stepper Motor

¾ Draws almost constant current all the time.

¾ High torque at low speed.

¾ Input is digital signal .

¾ Better Control and precise positioning.

¾ Rapid discrete motion.

¾ Wide range of speed depending on input frequency


pulses.

<http://frontier123.blogspot.com>/
Demerits of Stepper Motor

¾ Consumption of current regardless of load.

¾ Low torque at high speed and resonance effect at low speed


Æ vibration.

¾ If a digital pulse input is missed, then it can exhibit a large


error and oscillation.

¾ Requires dedicated controller.

¾ Costly.

¾ Not a good option when speed is the criterion.

<http://frontier123.blogspot.com>/
Characteristics

Fig. Torque Vs Speed

<http://frontier123.blogspot.com>/
Modes of Operation
Stepping Sequence

a) Scheme-I b) Scheme-II
Fig. Full Stepping Mode

<http://frontier123.blogspot.com>/
Fundamental Operation

ÅCross-section

Stepper MotorÆ

Fig. Full Step Mode working

<http://frontier123.blogspot.com>/
SEQUENCE FOR DRIVING STEPPER MOTOR

ƒ A sequence (A Æ 6 Æ 5 Æ 9) will
move the motor in one direction
and the reverse sequence will
change the direction.
ƒ Repeat the same 4 steps of
sequences, and a total of 200 (from
specification) steps will make one
revolution.

<http://frontier123.blogspot.com>/
STEPPER MOTOR INTERFACING DETAILS

Fig: Various lead configurations


Fig. Driver IC uln2803

Darlington pair into the IC


to amplify current
Fig: A typical translator-driver connection

<http://frontier123.blogspot.com>/
CIRCUIT CONNECTIONS

ƒ Vcc=12V is given to 10th pin and ground of SPP & Power supply is
together connected to 9th pin of driver IC ‘ULN 2803’.
ƒ Data pins are connected to driver IC, accordingly sequence of inputs
for clockwise/anti-clockwise movement is given.
ƒ Output of IC is given to data pins of motor.
ƒ Two common points of motor is connected to 12V RPS.

<http://frontier123.blogspot.com>/
…CIRCUIT CONNECTIONS

<http://frontier123.blogspot.com>/
AGENDA

• Introduction
• Concept
• Stepper Motor Basics
• Parallel port programming
• Robocar – an application
Mobile robot
• Discussion

<http://frontier123.blogspot.com>/
Parallel Port programming

‰ The DB25, also called printer port


¾ Handling printer
¾ Faster communications with scanners, drives, and
other devices that send data to the PC
¾ PC to PC communication

‰ Programming Parallel Port in Linux


¾ Application in robotics

<http://frontier123.blogspot.com>/
PARALLEL PORTS (DB-25)

‰ Port is a set of signal lines that the microprocessor, or


CPU, uses to exchange data with other
components/device.

‰ Parallel port, also called printer port is found on the


back panel of CPU as a D-Type 25 pin female/male
connector.

‰ A parallel port transfers multiple bits at once and


the larger number of I/O pins makes external
circuitry to implement many simpler tasks.

<http://frontier123.blogspot.com>/
HARDWARE SETTING
To find the existing port in windows:
Click on control panel → system → hardware device
manager → ports → Printer port(LPT1) →
Resources
The parallel port’s hardware
includes the back-panel
connector and the circuits and
cabling between the connector
and the system’s expansion bus.
The PC’s microprocessor uses
the expansion bus’s data,
address, and control lines to
transfer information between the
parallel port and the CPU,
memory, and other system
components.

<http://frontier123.blogspot.com>/
DB25 CONNECTOR

Figure illustrates DB25 connector, DB25 cable and DB25


breakout board
IEEE Std.1284-1994 Standard Signaling Method for a Bi-directional Parallel Peripheral
Interface for Personal Computers"

<http://frontier123.blogspot.com>/
ADDRESSING

The standard parallel port uses three contiguous addresses


(port’s base address/ or data register, Status register, Control
register), usually in one of these ranges.
3BCh, 3BDh, 3BEh
378h, 379h, 37Ah (very common)
278h, 279h, 27Ah
<http://frontier123.blogspot.com>/
DB25 PIN CLASSIFICATIONS

¾ The pins are classified as follows:


8 out (but I/0 for bidirectional) DATA BITS (pins: 2-9)
4 CONTROL In-Out lines (pins: 1, 14, 15, 17)
5 STATUS In lines (pins: 10-13 & 15)
8 GROUNDS (pins: 18-25)
[Out of these 25 pins 1, 11, 14 & 17 are inverted.]

¾ Every port uses a range of addresses, and location of


addresses varies.

<http://frontier123.blogspot.com>/
PIN CONFIGURATIONS (DB25):

Pin No. Signal Name Pin No. Signal Name


1 Strobe 10 Acknowledge

2 Data 0 11 Busy

3 Data 1 12 Paper End

4 Data 2 13 Select

5 Data 3 14 Auto Feed

6 Data 4 15 Error

7 Data 5 16 Init

8 Data 6 17 Select In

9 Data 7 18-25 GND

Note: Pin nos. 10, 14, 15, 16, 17 are inverted.

<http://frontier123.blogspot.com>/
PROGRAMMING SPP UNDER LINUX

• Windows XP has put restrictions on I/O ports

• I/O port operations with Linux is simple. You should be root login to
access port.

• Header files to be used:


<sys/io.h> or <asm/io.h> & <unistd.h>

• ioperm() - to obtain hardware i/o access permission


• inb() - to read data from ports
• outb() - to send data to ports
• usleep(delay in us) - for delay in micro-second

<http://frontier123.blogspot.com>/
FUNCTIONS used…

outb writes the low byte of value to portid, the high byte to portid
+ 1, the function is defined as:
void outb(value, portid);

inb reads the low byte of a word from portid, the high byte from
portid + 2, the syntax is:
int inb(portid);

ioperm sets the port access permission bits for the process for num
bytes starting from port address from to the value turn_on. The
use of ioperm requires root privileges.
int ioperm(unsigned long from, unsigned long num, int turn_on);

<http://frontier123.blogspot.com>/
INITIALIZATION OF VARIABLES

#include <sys/io.h>
#include<stdio.h>
#define PORTADDRESS 0x378 /* Base Port Address */
#define DATA PORTADDRESS+0
#define STATUS PORTADDRESS+1
#define CONTROL PORTADDRESS+2
int main()
{
if(ioperm(0x378,3,1)) exit(1); //obtain hardware i/o access

return 0;
}
<http://frontier123.blogspot.com>/
AN EXAMPLE
Simple programs can be now written as such as can be tested by
glowing LED (Light Emitting Diode):

#include <sys/io.h>
#include <unistd.h>
int main()
{
char a; //store 8 bit data
if(ioperm(0x378,3,1)) exit(1);
outb(0xF0,0x378); //write 1111 0000 to data line
a = inb(0x378+1); //read data from input status register
cout<<“\nCharacter read : “<<a;
print(“\nHello parallel port\n”);
return 0;
}

<http://frontier123.blogspot.com>/
LEDs interfacing

‰ Make a connection like


aside.

‰ Write code for flashing


LEDs, running light, 7
segment display

‰ Take input from Hex-


keypad and accordingly
control the LEDs

<http://frontier123.blogspot.com>/
SAMPLE FUNCTION CODE FOR
STEPPER MOTOR CONTROL

#define BASEPORT 0x378


void forward(int delay) void right(int delay)
{
{ //delay in usec
//delay in usec outb(0x55, BASEPORT);
outb(0x59, BASEPORT); usleep(delay);
usleep(delay); outb(0x66, BASEPORT);
outb(0x6A, BASEPORT); usleep(delay);
usleep(delay); outb(0xAA, BASEPORT);
outb(0xA6, BASEPORT); usleep(delay);
outb(0x99, BASEPORT);
usleep(delay);
usleep(delay);
outb(0x95, BASEPORT); }
usleep(delay);
}

<http://frontier123.blogspot.com>/
AGENDA

• Introduction
• Concept
• Stepper Motor Basics
• Parallel port programming
• Robocar – an application
Mobile robot
• Discussion

<http://frontier123.blogspot.com>/
Pre-programmed
LINE Follower Robot

<http://frontier123.blogspot.com>/
Video Demonstration
pre-programmed Line Follower

<http://frontier123.blogspot.com>/
Points to be noted…

ROBOT CONTROLLER WHEEL MATHEMATIC REMARKS


NO. MODELLING
1 8051 MCU Wooden Just an Onboard
(not very smooth) approximation controller
made
2 Parallel port Wooden Compensation not More strain on
programming (comparatively taken into account one wheel at
good) turns
3 8051 MCU Wood wrapped Was not clear a) on-board
controller
with cotton and
b) Very high speed
then covered by – created problem
tape c) Chasis not very
strong

4 Parallel port Plastic wheels Well done and Best of all,


programming with better grip error factors too except for slow
compensated speed.

<http://frontier123.blogspot.com>/
Remote controlled robot

<http://frontier123.blogspot.com>/
Video Demonstration
Remote controlled Roborace

<http://frontier123.blogspot.com>/
Points to be noted…

‰ After every 4 steps or sequences, the remote control


input was constantly being checked.

‰ It is always better to practice with the kind of job robo


should compete beforehand. Skill of remote operator
matters.

‰ Though, here it proved to be better than the competitor,


but stepper motor are never a good choice for tasks like
racing.

<http://frontier123.blogspot.com>/
What’s Ahead?

‰ Implement Microcontroller controlled


robot.

Robo-controller MCU programmer


‰ Implement sensors.
IR sensors using TSOP 1738 as
receiver and IR LED flashing at
38Khz as transmitter

<http://frontier123.blogspot.com>/
AGENDA

• Introduction
• Concept
• Stepper Motor Basics
• Parallel port programming
• Robocar – an application Mobile
robot
• Discussion

<http://frontier123.blogspot.com>/
Conclusions

Implementing unique software strategies


is possible to achieve low cost robot
platform whose movement is controlled
by software through Parallel Port.

<http://frontier123.blogspot.com>/
Useful Links

1. Datasheets
MCU
 http://www.atmel.com/dyn/resources/prod_documents/doc0265.pdf
 http://ww1.microchip.com/downloads/en/DeviceDoc/39582b.pdf
Driver ICs
 http://www.ortodoxism.ro/datasheets/motorola/ULN2804A.pdf
Voltage regulator
 http://cache.national.com/ds/LM/LM341.pdf
Sensors
 http://www.vishay.com/docs/82030/82030.pdf

2. Softwares
 http://www.keil.com/dd/chip/2976.htm
 http://www.electronics-lab.com/downloads/cnt/fclick.php?fid=21

<http://frontier123.blogspot.com>/
Thanks
"It's not that i am genius,
but i stay a little longer
with problems" - Einstein.

<http://frontier123.blogspot.com>/

Вам также может понравиться