embedded systems and robotics on avr platform

Post on 19-Jun-2015

1.802 Views

Category:

Technology

6 Downloads

Preview:

Click to see full reader

DESCRIPTION

embedded systems and robotics on avr platform

TRANSCRIPT

EMBEDDED SYSTEMS

&

ROBOTICS(on AVR platform)

-neha sharma

CONTENTS1. Company overview2. Embedded Systems & types3. Applications4. Microcontroller5. Pin diagram & Features of ATmega 166. CVAVR 7. I/O function registers8. LCD interfacing9. SPI 10. Robotics (laws)11. Autonomous robots12. how robot moves?13. sensors

COMPANY OVERVIEW The Hewlett-Packard Company or HP is an American multinational IT company,

headquartered at US, founded by will Hewlett and Dave Packard in 1947.

• HP is the world’s leading PC manufacturing company since 2007.

• It specializes in developing and manufacturing computing, data storage, and networking hardware, designing software and delivering services.

• In 2012 it was the world's largest PC vendors by unit sale.• Merges with COMPAQ in 2002.• Majority of its products includes PC, laptops, printers,

scanners, digital cameras, servers, PDA.

WHAT ARE EMBEDDED SYSTEMS?

•An Embedded system is a Software program on a H/W chip designed for a specific purpose and can also contain some mechanical moving parts. • An embedded system is a microprocessor or microcontroller based electronic device used for specific task.

TYPES OF EMBEDDED SYSTEMS

1. Real time embedded system (a) Soft real time embedded

system (b) Hard real time

embedded system

2. Non real time embedded system

APPLICATIONS

• Pen drives • Hard disk• Mouse

• Calculators• Cell phones • Security system• Alarm system• Digital camera• Printers

• Environment monitoring systems…

microcontroller• It is a small computer on a single

integrated circuit containing a processor core, memory, and programmable input/output peripherals.

• It is designed for embedded systems.

Pin diagram of ATmega16

Features of

ATMEGA 16• It is a 40 pin IC.• Advanced RISC Architecture • 16 MHz clock frequency• 16K Bytes of In‐System Self‐Programmable Flash • 512 Bytes EEPROM • 1K Byte Internal SRAM • 32 Programmable I/O Lines • 3 channel interrupts • 8 channel, 10 bit ADC ‐ ‐• Two 8 bit Timer/Counters ‐• One 16 bit Timer/Counter‐• 4 channels for USART ,master/slave SPI.

PROGRAMMING KIT

PROGRAMMER

Code Vision AVR

(CVAVR)• CVAVR is an IDE (integrated development

program).• An IDE is a software having functions like

Preprocessing, Compilation, Assembly, Linking Object Translation, Text Editor etc.

• It has limitation of code size.• It works on computers with Windows platform

that is Windows XP & Vista.

CVAVR

Atmega 16

I/O functions Registers Input Output functions are set by Three Registers for each PORT.

•DDRX > Sets whether a port is ‐‐‐‐Input or Output of PORTX. • PORTX > Sets the Output Value ‐‐‐of PORTX. For ex. PORTA=255 ( all pins work of port A as output) for LED & LCD.

• PINX > ‐‐‐‐‐ Reads the Value of PORTX for ex. PINA.0=0 (0th pin of port A working as input ) for switches

LCD interfacing

• We have used 16x2 alphanumeric LCD, have their own embedded system in them.

• lcd_clear() clears screen• lcd_gotoxy(x,y) position• lcd_putchar(char c) display single character.• lcd_putsf(string) whole string• lcd_puts(char arr) for array• itoa(int val, char arr[]) • ftoa(float val, char decimal_places, char arr[])

Selecting LCD in CVAVR

SPI (serial peripheral interface)

It is a communication protocol, used between two or more microcontroller and devices supporting SPI mode data transfer.

1. MOSI : Master Out Slave In 2. MISO : Master In Slave Out 3. SCK : Serial Clock 4. SS: Slave Select

SPI We can transmit/receive only 1 byte of data.

LAWS OF ROBOTICS1. A robot must not

harm human being and humanity.

2. It must obey the orders given by human being, w/o conflicting law 1st.

3. A robot must protect its own existence as long as it doesn’t conflict with law 1st and 2nd.

AUTONOMOUS ROBOT

Basic elements for building autonomous robot.

• Robot chassis and actuators: body and wheels arrangement.

• Electronics: includes Sensors, motion control circuits, power management system etc.

• Power Source :Usually batteries or direct supply through wire.

• Intelligence: is achieved by using Microcontroller.

HOW ROBOT MOVES? (H/w)•3 motors for 4 wheels• 2 motors for 2 wheels and 1 ball bearing caster

•Controlling rpm and direction of wheels, controls speed

HOW ROBOT MOVES? (S/w)

• At first TIMER has to initialize. (Atmega has 3 timers 0, 1, 2).

• OCRX= (int. value 0-255);• forward movement: 1 in

clockwise other in anticlock direction.

• Backward: opposite of forward.

• turning left: left wheel having less value of OCRX.

• Turning right: right wheel having less value OCRX.

ROBOT MOVING!!!

SENSORS• Sensors are like “feel” for

robot.• Electronically :it is a device that

measures a physical quantity and converts it into a signal which can be read by an observer or by an instrument.

• TEMPERATURE SENSOR: like DS1621,thermistor. LM35 measures from 0 to 100 degrees

LIGHT SENSORS• Light Dependent Resistor (LDR): a resistor whose

resistance varies with intensity of light. • IR sensor: IR led + photodiode + LM358.• From any “non black body” i.e obstacle IR reflects and falls

on photo diode.• Hence Photo diode become forward bias, and it turn on the

IC LM358 that gives the output. IR LED

photodiode

LM 358

IR sensor

CONCLUSION• electronics + mechanics

+ software = ROBOT• By using all of the

commands of CVAVR, programming is done on a robot.

• A robot must be used for mankind.

REFERENCES

• www.google.com• www.wikipedia.com• Google images• http://www.embeddedsystem.

com/• http://robotics.nasa.gov/

QUERIES???

THANK

YOU

top related