210 likes | 417 Views
CSC-2700 – (3) Introduction to Robotics. Robotics Research Laboratory Louisiana State University. CSC-2700 Introduction to Robotics . Lecture Time - 3:10 ~ 5:00 PM, Tuesday Class Room (Lecture & Lab) 168 Coates ( Microcomputer Lab ) Office hours Dr. Kundu : kundu@csc.lsu.edu
E N D
CSC-2700 – (3) Introduction to Robotics Robotics Research Laboratory Louisiana State University
CSC-2700 Introduction to Robotics • Lecture Time - 3:10 ~ 5:00 PM, Tuesday • Class Room (Lecture & Lab) • 168 Coates ( Microcomputer Lab ) • Office hours • Dr. Kundu: kundu@csc.lsu.edu • 287 Coates Hall , 2:00 ~ 3:00 PM Tuesday • JongHoon Kim : jkim24@lsu.edu • 168C Coates Hall (RRL), 5:00 ~ 6:00 PM Tuesday • Class Home Page • http://www.csc.lsu.edu/~rrl/csc2700.html
Grade • Homework – 10% • Mid-Term – 20% • Individual Project – 30% • Team Project – 40% • A >= 85 • B >= 70 • C >= 60
What you will learn • How to program on Microcontroller • How to handle digital input/output • How to control actuators • How to interact with sensors • How to communicate with controllers, robots, pc • How to design mobile robots Introduce the basic concept in Robotics
Course Topics • 1. Introduction • 2. Robot Controller (AVRC Basic) • 3. Digital In/Out (Button , LED) • 4. Pulse Width Modulation (PWM Control) • 5. Motion Controller – DC Motor • 6. Motion Controller - Servo Motor • 7. Analog to Digital ( ADC basic ) • 8. Sensor – IR Sensor, Sonar • 9. Mobile Robot Design ( Mechanical, Electrical, and Programming ) • 10. Laser Cutting • 11. Robot assembling • 12. Manual Controlling • 13. Autonomous Robot
What you will make • Line Follower Robot , SeaPerch
Reference Books • Robotic Explorations: A Hands-On Introduction to Engineering • Fred G. Martin • Robot Builder's Bonanza, 4th Edition • Gordon McComb • Embedded C Programming and the Atmel AVR • Richard H. Barnett • Robot Programming : A Practical Guide to Behavior-Based Robotics • Joseph L. Jones
What is next after this course • Robotics 1 (Wheel based robot) • Map Generation • Optimizing Path • Robotics 2 (Leg-based robot) • Motion Planning • Balancing • Advanced Robotics ( UAV, Humanoid) • Image Processing • Voice Recognition • Precise localization • Advanced motion controlling
What is a Robot? • There is no one definition of robot which satisfies everyone and many people have their own • In general, robots tend to do some or all of the following: move around, operate a mechanical limb, sense and manipulate their environment, and exhibit intelligent behavior — especially behavior which mimics humans or other animals
What is a Robot? • For Mechanical Scientist • For Electrical Scientist • For Computer Scientist Mechanical machine which is guided by mechanical inputs Greece, 3rd century BC Electro-mechanical machine which is guided by electronic inputs Electrical dishwasher Electro-mechanical machine which is guided by computer and electronic programming
What types of robots • Fixed • Mobile • Ground Robot • Wheel based • Leg based • Underground • On Air • On Water • Underwater
Major Components for CSC2700-3 Robot Programming AVR-Stamp AVR-Programmer AVR Stamp Slot Transceiver for MAX232 AVR-Stamp Board Button Buzzer potential meter Voltage Requlator Breadboard LED
Let’s look at simple codes • #include "Hardware.h" • #include "Timer.h" • void WaitForTimerRollover(void); • intmain(void) { • InitHardware(); • while (1){ • WaitForTimerRollover(); • WaitForTimerRollover(); • WaitForTimerRollover(); • WaitForTimerRollover(); • WaitForTimerRollover(); • WaitForTimerRollover(); • TOGGLE_PIN(BUZZER); • } • } • void WaitForTimerRollover() { • tick_tcurTickCount = gTickCount; • while (gTickCount == curTickCount) { } • }
Let’s look at simple codes #include "Hardware.h" #include "Timer.h" void WaitForTimerRollover(void); intmain(void) { InitHardware(); intlightFreqType = 0; while (1) { if (0 == lightFreqType) { WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); lightFreqType = 1; } else if (1 == lightFreqType) { WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); lightFreqType = 2; } else { WaitForTimerRollover();WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); WaitForTimerRollover(); lightFreqType = 0; } TOGGLE_PIN(BUZZER); } } void WaitForTimerRollover() { tick_tcurTickCount = gTickCount; while (gTickCount == curTickCount) { } }
Compile the code and send it to the Robot • Make • Build compiling environment with Makefile, Rules.mk, and avr-mem.sh • Create required object files • Compile the code to make a binary code (.hex) • Sending the binary code with bootloader • avrdude –c stk500v2 –p m128 –P /dev/ttyACM0 –e –F –U flash:w:light-control.hex
Let’s look at simple codes • #include "Hardware.h" • #include "Timer.h" • void WaitForTimerRollover( int ) ; • int main(void) { • InitHardware(); • intlightFreqType = 0; • while (1){ • if (0 == lightFreqType) { • WaitForTimerRollover(5); • lightFreqType= 1; • } else if (1 == lightFreqType) { • WaitForTimerRollover(5); • lightFreqType= 2; • } else { WaitForTimerRollover(28); • lightFreqType= 0; • } • TOGGLE_PIN(BUZZER); • } • } • void WaitForTimerRollover(intnumUnits) { • tick_tcurTickCount; • int i; • for (i=0; i<numUnits; i++) { • curTickCount = gTickCount; • while (gTickCount == curTickCount) { } • } • }
If you want to buy • AVR-stamp board • https://www.futurlec.com/ET-AVR_Stamp_Board.shtml • AVR-Stamp • https://www.futurlec.com/ET-AVR_Stamp.shtml • 4 x AA Battery Holder • http://www.futurlec.com/Batteries-Holders.shtml • Small Breadboard • http://www.futurlec.com/Breadboards.shtml • Optical Switch (RPR220 * 4 , H21A3 * 2 ) • http://www.futurlec.com/LEDOptoSwitch.shtml • Registers (330 ohm * 4, 1.0 Komh * 4, 10 Komh * 4) • http://www.futurlec.com/Res14W.shtml • Pololu AVR-Programmer • http://www.pololu.com/catalog/product/1300 • Plastic Ball Caster Trio • http://www.pololu.com/catalog/product/174 • Dual Motor Driver • http://www.pololu.com/catalog/product/713 • Geared Motor • http://www.pololu.com/catalog/product/1121 • Acrylic Sheet 24*18 ( Lowes or Homedepot )
Homework • Find one example that fits with the definition of robot and one example that does not a robot • Choose the robots from common household/ everyday appliance or toy, etc and explain your answer ( robot/ not robot)