1 / 31

http://students.iitk.ac.in/roboclub

http://students.iitk.ac.in/roboclub. LINE FOLLOWING ROBOT. Main Components: Sensors Micro controller Motor drivers Chasis. SENSORS. How IR Led sensors work??. On the basis of variation in reflection property of Different Colours. MICRO CONTROLLERS. Atmega. Difficulties with Atmega.

ling
Download Presentation

http://students.iitk.ac.in/roboclub

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. http://students.iitk.ac.in/roboclub

  2. LINE FOLLOWING ROBOT • Main Components: • Sensors • Micro controller • Motor drivers • Chasis

  3. SENSORS

  4. How IR Led sensors work?? On the basis of variation in reflection property of Different Colours

  5. MICRO CONTROLLERS Atmega

  6. Difficulties with Atmega • Software is not User Friendly • Many softwares required : • CVAVR – Editor and Compiler • AVR Studio – Transfer code to Atmega • External Programmer required So is there a better solution

  7. ARDUINO – Open Source Platform

  8. What is Arduino?? • Open-source physical computing platform. • Physical Input / Output board (I/O) with programmable Integrated Circuit (IC) • Contains Atmega series Micro controller

  9. Why Arduino ?? • Easy to use • Provides a number of libraries to program the microcontroller easily • Hardware platform already has the power and reset circuitry setup • Hardware provides circuitry to program and communicate with the microcontroller over USB • Arduino has a great community of users that you can get help from

  10. Getting Started • Check out: http://arduino.cc/en/Guide/HomePage • Download & install the Arduino environment (IDE) • Connect the board to your computer via the USB cable • If needed, install the drivers. • Launch the Arduino IDE • Select your board • Select your serial port • Open the blink example • Upload the program

  11. Arduino IDE See: http://arduino.cc/en/Guide/Environment for more information

  12. Try It: Connect the USB Cable

  13. Select Serial Port and Board

  14. A Little Bit About Programming • Code is case sensitive • Statements are commands and must end with a semi-colon • Comments follow a // or begin with /* and end with */ • loop and setup

  15. Our First Program

  16. Terminology

  17. Digital I/0 • pinMode(pin, mode) • Sets pin to either INPUT or OUTPUT • digitalRead(pin) • Reads HIGH or LOW from a pin • digitalWrite(pin, value) • Writes HIGH or LOW to a pin

  18. MOTOR DRIVER

  19. Why MOTOR DRIVER ??? • Micro controllers (Atmega ,Arduino) require 5-10 mA while motors require 150 mA and above so Motor Driver is used . • For driving motor at different rpm by using PWM

  20. H-Bridge • An electronic circuit that enables a voltage to be applied across a load in either direction.

  21. What is PWM ??  Known as Pulse Width Modulation  Simple method of obtaining analog output of any value between 0 and 5V

  22. Suppose we need 3V for our device at a • specified pin. •  We supply 5V on it for (3/5)* 100 % = 60% of the time period and 0V for the remaining • time period •  The average voltage at the pin for a time • period becomes 3V •  If this step is repeated very fast (T is very • small), then the output behaves as a analog • signal of 3V.

  23. Programming for Motor Driver in Arduino

  24. ALGORITHM BLOCK DIAGRAM

  25. Line following using 2 sensors Both the sensors detect the line then both motors rotate at same pwm. Hence the bot moves forward . When the right sensor detects the line , left motor is given more speed . Hence the bot moves towars right. When the left sensor detects the line , right motor is given more speed. Hence the bot moves towards left.

  26. PWM of Left motor=MEAN PWM –(kp*deviation) PWM of Right motor=MEAN PWM +(kp*deviation) Kp – Constant of Proportionality Derived experimentally

More Related