3. MICRO CONTROLLER ??
•
Microcontroller is a small (micro) single-chip
computer designed to perform a specific function,
and the specific function is to control (controller)
objects, processes or events.
•
It is dedicated to one task, or a set of closely
related task. It is similar to a personal computer, it
has similar components built on to a single chip:
CPU, Memory (ROM and RAM), I/O ports, Serial
ports, Timer, ADC.
4. BASIC ARCHITECTURE OF MCU
• CPU: Processing Module.
RAM: for storing DATA.
ROM: for storing the app. program.
Ports: For interfacing with the
outside world.
Timer: Allows the MCU to perform
tasks for certain time periods.
ADC: Allows the MCU to accept
analogue input data for
processing.
5. BASIC DIFFERNCE BETWEEN
MP & MC
•
Clock rate of MPs are of the order of GHz.
Where as ........
MCU is a more self-contained (CPU, RAM, ROM, I/O ports,
and timers) and independent and functions as a tiny computer
dedicated to a specific task to control a single system...
• Clock rate of MCs are of the order of MHz
6. WHY PIC HAS BEEN PICKED ?
•
•
•
•
•
•
•
•
•
•
Wide range: More than 200 MCUs in the product portfolio.
Available in 8 ,16 and 32 bit in analogue as well as Digital Signal
Controller family.
RISC based architecture
Pin out compatibility
Software compatibility, Simple Instruction Set
Peripheral compatibility
Easy migration across product families.
Common and easy to use development tools.
Extensive support - Information is available in wide range and depth.
Available in all package types
10. VON NEUMANN ARCHITECTURE
•
•
•
Single memory for storing both
program and data.
It has single bus which is multiplexed
to be used as both address bus and
data bus.
The content of RAM can be used for
both program storage as well as
variable storage.
Single bus
11. HARVARD ARCHITECTURE
•
•
•
Separate memory banks for
program and data storage.
It has a RAM for data storage
and separate ROM for program
storage.
Has two sets of buses.
One can simultaneously
access these buses.
Program
address bus
Data address
bus
16. PORT PINS
•
•
•
•
•
•
•
•
Port A is a 8 pin bi directional port
5 analog / 6 digital pins
Port B is a 8 pin bi directional port
8 digital pins/5 analog pins
Port C is a 8 pin bi directional port
8 digital pins
Port D is a 8 pin bi directional port
8 digital pins
Port E is a 4 pin port
3 pin bi directional
3 analog / digital pins
Pin 1 Digital input pin
Pin 13 & 14 are digital I/O digital pins if not used for XT Osc
Total availability
13 analog pins
35digital pins
1 digital input pin
Pin 39 & 40 (PORTB) are used for programming/debugging.
24. Program of PWM
List p=18F4431, f =inhx32
#include <p18F4431.inc>
;This is a header file for PIC18F452
org
00000h
goto
START
START
CLRF PORTC
MOVLW 0X63
MOVWF OSCCON
CLRF TRISC
; PORTC AS OUTPUT
MOVLW .25
;FREQUENCY IS 38 KHZ
MOVWF PR2
;TIME PEROID OF 26 US
MOVLW .13
; FOR DUTY CYCLE OF 50%
MOVWF CCPR1L
; SET THE CCP FOR PWM
MOVLW 0X0C
MOVWF CCP1CON
;SETTING FOR THE PRESCALER OF TIMER 2
MOVLW 0X00
MOVWF T2CON
;THE TIMER IS ON
BSF T2CON,2
GOTO $
;KEEP THE controller BUSY
END
25. PROGRAM OF TIMER 0
5 SECOND DELAY ,TIMER0,16BIT
LIST P=18F4520 , f = inhx32
#include <p18F4520.inc>
ORG 0X00
GOTO MAIN
MAIN
CLRFINTCON
;PRIORITY overflow ,int flag
MOVLW
B'00000110'
;Disable Timer0:16 bit,int clock.
MOVWF
T0CON
;Prescaler 1:128
CLRFTRISB
LOOP
BSF
PORTB,0
;LED ON
CALLDELAY
BCF
PORTB,0
;LED OFF
CALL DELAY
GOTO
LOOP
DELAY
MOVLW
0X67
MOVWF
TMR0H
MOVLW
0X69
MOVWF
TMR0L
BSF
T0CON,7
BTFSS
INTCON , TMR0IF
GOTO
$-1
BCF
INTCON , TMR0IF
BCF
T0CON,7
RETURN
END
27. Other programs done are
•
•
•
•
LCD
Stepper motor
Washing machine for fixed number of time
Washing machine for fixed number of
rotations
• Traffic lights
29. EVOLUTION OF ROBOT
•
Robotics brings together several very different engineering areas and
skills.
•
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.
Modern defination of Robot is
A robot is a machine designed to execute one or more task
repeatedly, with speed and precision.
31. Locomotion system
• Locomotion is nothing but the movement or the ability to
move from one place to another. So,
• Robot locomotion is the collective name for the various
methods that robots use to transport themselves from
place to place.
32. Mechanism to achieve Locomotion
• Wheeled robots – These robots are quite energy
efficient and simple to control.
• other forms of locomotion (legged locomotion) may be
more appropriate for a number of reasons e.g. traversing
rough terrain, moving and interacting in human
environments.
• A major goal in this field is in developing capabilities for
robots to autonomously decide how, when, and where to
move.
34. Main issue in legged locomotion
Stability is the main issue in legged locomotion.
Stability can be divided into the
1) Static stability criterion
2) Dynamic stability criterion.
35. Static stability criterion
•
Static stability means that the robot is stable, with no need of motion
at every moment of time.
•
Static stability is given, when the centre
of mass is completely within the support
polygon and the polygon’s area is greater
than zero.
•
To achieve statically stable walking a robot
must have a minimum number of four legs, because during walking
at least one leg is in the air.
•
Statically stable walking means that all robots’ motion can be
stopped at every moment in the gait cycle without overturning.
36. Dynamic stability criterion
•
Most two legged walking machines are dynamically stable for
several reasons Human like robots have relatively small footprints, because of this
the support polygon is almost a line which is even reduced to a
single point during walking. Therefore the robot must actively
balance itself to prevent overturning
In face of that the robots’ centre of mass has to be shifted actively
between the footprints. But the robots exact centre of mass is hard
to predict due to the high dynamic of walking (for example because
of the force which is imparted to whole robot when one leg swings
forward) .
37. Legged configuration
•
If a robot has k legs the number of possible events N is, accordant to [1],
N=(2k-1)!
In case of a bipedal walking machine (k=2) the number of possible events is
N=(2k-1)! = (2*2-1)! = 3! = 6
So there are six possible different events, these are
1. Lift left leg
2. Release left leg
3. Lift right leg
4. Release right leg
5. Lift both legs together
6. Release both legs together
•
In case of k=6 legs there are already 39916800 possible events
38. Power supply system
• Suitable power source is needed to run the robots.
• Mobile robots are most suitably powered by batteries.
• The weight and energy capacity of the batteries may
become the determinative factor of its performance.
39. Actuator
• An actuator is a type of motor for moving or controlling a
mechanism or system. It is operated by a source of
energy, typically electric current, hydraulic fluid pressure,
or pneumatic pressure, and converts that energy into
motion.
• An actuator is the mechanism by which a control system
acts upon an environment.
43. INTERFACE WITH OTHERS
•
Robotics is a versatile,
multi-disciplinary field,
spanning a number of
scientific and engineering
areas where the latest
knowledge and techno-logical advances
contribute to the
growth of Robotics.
44. APPS. OF ROBOTICS
•
•
•
•
•
•
•
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
Transportation
Intelligent Weapons, Robot Soldiers, Super-humans
robots in a hospital
45. Guide robot
in a hosp.
Machine-gun equipped
robot developed by
Samsung
Robot waiter
in Hong-Kong
restaurant
Pipeline
Inspection robot
Painting
Robots
49. Robocar using Arduino Board
•
It is a robot that can be
steered in any direction just like you
drive your car. Wireless steering
senses the motion and
transmits corresponding
instruction to control the robot
through RF communication.
51. Program of sensing directions from
accelerometer
const int groundpin = 18;
const int powerpin = 19;
const int xpin = A3;
const int ypin = A2;
const int zpin = A1;
// analog input pin 4 -- ground
// analog input pin 5 -- voltage
// x-axis of the accelerometer
// y-axis
// z-axis (only on 3-axis models)
void setup()
{
// initialize the serial communications:
Serial.begin(9600);
pinMode(groundpin, OUTPUT);
pinMode(powerpin, OUTPUT);
digitalWrite(groundpin, LOW);
digitalWrite(powerpin, HIGH);
}
void loop()
{
// print the sensor values:
Serial.print(analogRead(xpin));
// print a tab between values:
Serial.print("t");
Serial.print(analogRead(ypin));
// print a tab between values:
Serial.print("t");
Serial.print(analogRead(zpin));
Serial.println();
// delay before next reading:
delay(100);
}