embedded systems and robotics on avr platform

33
EMBEDDED SYSTEMS & ROBOTICS (on AVR platform) -neha sharma

Upload: neha-sharma

Post on 19-Jun-2015

1.802 views

Category:

Technology


6 download

DESCRIPTION

embedded systems and robotics on avr platform

TRANSCRIPT

Page 1: embedded systems and robotics on avr platform

EMBEDDED SYSTEMS

&

ROBOTICS(on AVR platform)

-neha sharma

Page 2: embedded systems and robotics on avr platform

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

Page 3: embedded systems and robotics on avr platform

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.

Page 4: embedded systems and robotics on avr platform

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.

Page 5: embedded systems and robotics on avr platform

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

Page 6: embedded systems and robotics on avr platform

APPLICATIONS

• Pen drives • Hard disk• Mouse

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

• Environment monitoring systems…

Page 7: embedded systems and robotics on avr platform

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.

Page 8: embedded systems and robotics on avr platform

Pin diagram of ATmega16

Page 9: embedded systems and robotics on avr platform

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.

Page 10: embedded systems and robotics on avr platform

PROGRAMMING KIT

PROGRAMMER

Page 11: embedded systems and robotics on avr platform

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.

Page 12: embedded systems and robotics on avr platform
Page 13: embedded systems and robotics on avr platform

CVAVR

Page 14: embedded systems and robotics on avr platform

Atmega 16

Page 15: embedded systems and robotics on avr platform
Page 16: embedded systems and robotics on avr platform
Page 17: embedded systems and robotics on avr platform

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

Page 18: embedded systems and robotics on avr platform

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[])

Page 19: embedded systems and robotics on avr platform

Selecting LCD in CVAVR

Page 20: embedded systems and robotics on avr platform

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

Page 21: embedded systems and robotics on avr platform

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

Page 22: embedded systems and robotics on avr platform
Page 23: embedded systems and robotics on avr platform

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.

Page 24: embedded systems and robotics on avr platform

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.

Page 25: embedded systems and robotics on avr platform

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

Page 26: embedded systems and robotics on avr platform

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.

Page 27: embedded systems and robotics on avr platform

ROBOT MOVING!!!

Page 28: embedded systems and robotics on avr platform

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

Page 29: embedded systems and robotics on avr platform

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

Page 30: embedded systems and robotics on avr platform

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.

Page 31: embedded systems and robotics on avr platform

REFERENCES

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

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

Page 32: embedded systems and robotics on avr platform

QUERIES???

Page 33: embedded systems and robotics on avr platform

THANK

YOU