2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMSFall 2009 Lab 1September 14, 2009Dr. Harrison H. [email protected] LabsWhy ArduinoArduino HardwareArduino Duemilanove MicrocontrollerArduino ComponentsArduino Circuit DiagramArduino Programming EnvironmentResourcesLabs 1& 2: The Arduio Kit ExperimentsResistor Color Code Chart2.017 DESIGN OF ELECTROMECHANICAL ROBOTIC SYSTEMSFall 2009 Lab 1September 14, 2009Dr. Harrison H. Chin9/14/2009 OETL 2Formal Labs1. Microcontrollers• Introduction to microcontrollers• Arduino microcontroller kit2. Sensors and Signals• Analog / Digital sensors• Data acquisition• Data processing and visualization3. GPS and Data Logging• GPS receiver and shield • Data logging• Visualization of data4. Motor Control•Motors• Encoders• Position control9/14/2009 OETL 3Why Arduino• Popular• Open source• Low cost• Large user community• Easy to use development environmenthttp://todbot.com/Courtesy of Tod E. Kurt. Used with permission.9/14/2009 OETL 4Arduino Hardwarehttp://todbot.com/Courtesy of Tod E. Kurt. Used with permission.Photos by SparkFun Electronics.Photos by SparkFun Electronics.Photos by SparkFun Electronics.Photos by SparkFun Electronics.Courtesy of Adafruit Industries. Used with permission.9/14/2009 OETL 5Arduino Duemilanove MicrocontrollerExpandable by stacking add-on modules for data storage, wireless, GPS, audio, motor drive,… etc.Microcontroller 8-bit ATmega328 (by ATMEL)Operating Voltage 5VInput Voltage (recommended) 7-12VInput Voltage (limits) 6-20VDigital I/O Pins 14 (of which 6 provide PWM output)Analog Input Pins 6DC Current per I/O Pin 40 mADC Current for 3.3V Pin 50 mAFlash Memory32 KB (ATmega328) of which 2 KB used by bootloaderSRAM 2 KB (ATmega328)EEPROM 1 KB (ATmega328)Clock Speed 16 MHzhttp://www.arduino.cc/Courtesy of Arduino.cc. Used with permission.9/14/2009 OETL 6Arduino ComponentsATmega328Analog Input PinsDigital I/O and PWM Output PinsReset ButtonUSBInterfaceExternalPowerTest LED(Pin 13)TX/RX LEDsPower PinsUSB to Serial UART Interface 16 MHz ClockIn-CircuitSerial ProgrammingCourtesy of Arduino.cc. Used with permission.9/14/2009 OETL 7Arduino Circuit Diagramhttp://www.arduino.cc/Courtesy of Arduino.cc. Used with permission.9/14/2009 OETL 8Arduino Programming EnvironmentStatus Area Code AreaMenu Buttons“Sketch”Open sourceSimplified C++ like development environment that is easy to program and to upload the codeSeveral examples are included that demonstrate various I/O capabilitiesBuilt-in libraries that simplify data I/O tasksLarge user communityCourtesy of Arduino.cc. Used with permission.9/14/2009 OETL 9Resources• http://arduino.cc/• http://ladyada.net/learn/arduino/• http://todbot.com/blog/category/arduino/• http://freeduino.org/• http://adafruit.com/• http://sparkfun.com/• Books:– “Arduino Programming Notebook”, Brian W. Evans– “Physical Computing”, Dan O’Sullivan & Tom Igoe– “Making Things Talk”, Tom Igoe– “Hacking Roomba”, Tod E. Kurt9/14/2009 OETL 10Labs 1& 2: The Arduio Kit Experiments • {CIRC01} Getting Started - (Blinking LED)• {CIRC02} 8 LED Fun - (Multiple LEDs)• {CIRC03} Spin Motor Spin - (Transistor and Motor)• {CIRC04} A Single Servo - (Servos)• {CIRC05} 8 More LEDs - (74HC595 Shift Register) • {CIRC06} Music - (Piezo Elements)• {CIRC07} Button Pressing - (Pushbuttons)• {CIRC08} Twisting - (Potentiometers)• {CIRC09} Light - (Photo Resistors)• {CIRC10} Temperature - (TMP36 Temperature Sensor)• {CIRC11} Larger Loads - (Relays)Lab 1Lab 2Lab 1red green brown gold2 5 0 Ω 5%0 0 100 - 1101 - 10102 - 100103 - 1000104 - 10000105 - 100000106 - 1000000107 - 10000000108 - 100000000109 - 10000000000 09 97 76 65 54 43 32 21 1%2%3%4%5%10%20%1ColorBlackBrownRedOrangeYellowGreenBlueVioletGrayWhiteGoldSilverNone1st-bandDigit2nd-bandDigit3rd-bandDigit4th-bandDigit1st Significant Digit ToleranceMultiplier2nd Significant DigitRed Green Brown Gold250 Ω 5%9/14/2009 OETL 11Resistor Color Code ChartFigure by MIT OpenCourseWare.MIT OpenCourseWarehttp://ocw.mit.edu 2.017J Design of Electromechanical Robotic Systems Fall 2009For information about citing these materials or our Terms of Use, visit:
View Full Document