1 / 22

Introduction to Robotics Tutorial: 3Pi

Introduction to Robotics Tutorial: 3Pi. Presented By: Md Aminul Islam Chair, IEEE Computer Society Carleton University . Robotics Club. Agenda:. Brief History A Simple Robot Introduction to 3Pi Hardware Overview Environment Setup. Robotics Tutorial: 3Pi. Not:

belva
Télécharger la présentation

Introduction to Robotics Tutorial: 3Pi

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. Introduction to RoboticsTutorial: 3Pi Presented By: MdAminul Islam Chair, IEEE Computer Society Carleton University Robotics Club

  2. Agenda: • Brief History • A Simple Robot • Introduction to 3Pi • Hardware Overview • Environment Setup

  3. Robotics Tutorial: 3Pi • Not: • Artificial Intelligence or Robotics class • Programming class/course. • About Getting “F” Grade • About: • Some basics • How to program/use 3pi and setup environment • Entertainment and Information • Improving Skills (A++) Note: A copy of this material will be found in my blog: http://www.tanjir.net

  4. Brief History

  5. A Brief History 1495: First Humanoid Robot 250 BC: First Mechanical Robot

  6. A Brief History • Three Rules of Robots • Zeroth Law 1942: Robot as Man Like Machines

  7. A Brief History • "I'm sorry, Dave. I'm afraid I can't do that" 1968, 2001: A Space Odyssey

  8. A Brief History Star Wars, 1977

  9. A Brief History 2005: For hire Honda Asimo $166,000/Year 1997

  10. A Simple Robot • (input->BlackBox->output) • Is Very Simple! Consists of : • uController, small memory, few sensors, buttons,led, display. (Blacbox= uController+memory) • Some Popular Microcontrollers: • PIC, Atmel AVR, BASIC Stamp, Arduino • Typical Languages: • Almost everything can be used: All ISs converted to HEX • C is the most common. * IS= Instruction Set * RISC = Reduced Instruction Set Computer

  11. 3Pi • 3Pi is a Simple Robot • Has Atmel Atmega328p uController-C programmable • Speed: Maximum 1m/s (3.6km/hr) • 5 Reflectance sensors  • 3.5 inch D, 83gm • 2 Motors • ArduinoCompatible • Price: $69-$100

  12. Hardware Overview (Top View)

  13. Hardware Overview (Bottom View)

  14. Start: To start, you will need:

  15. Environment Setup + Following Software/Tools: • Pololu USB-to-serial adapter driver • WinAVR • C/C++ AVR Library • AVR Studio • USB Tiny ISP Driver * • com0com* • USBtiny500* * You will need these, if you are using USB Tiny ISP instead of Pololu USB AVR Programmer. For the later one, you will only need to install the black ones. All of these can be found as a big zip file: http://www.tanjir.net/upload/3pi.zip

  16. Environment Setup Pololu USB-to-serial adapter driver -> Unzip -> Install PololuUSBInstaller.exe WinAVR -> Run WinAVR-20100110-install.exe C/C++ AVR Library -> Unzip directory -> Copy avr/*.a files to C:\WinAVR-20100110\avr\lib -> Copy entire pololu directory under C:\WinAVR-20100110\avr\include USB Tiny ISP Driver -> Unzip the directory -> Plug in the USB programmer -> Advanced -> Show the path to the unzipped directory

  17. Environment Setup com0com -> Install com0com (make sure to unselect the last optioncomA<->comB) -> Run install command -> Check your com ports and make a list: (3,4) -> Run: “install PortName=COM2 PortName=COM6” -> Install new drivers using recommended path (twice) AVR Studio -> Install AVR Studio 4 -> Install Update patch USBtiny500 -> Install -> Select the right ComPort from the USBtiny 500 (you can choose either 2 or 6)

  18. Environment Setup Go back to libpololu-avr/examples, atmel328p, then go into any example (I did buzzer3) Open the .aps file (it should open with AVR Studio 4). Build Tools-> Program AVR -> Connect STK500-> (Select the opposite one of what you have selected in USBtiny 500 ie: For 2, select here 6 or for 6, select here 2) Cancel the update message Under Main tab, Read signature If you see all OK in bottom, then you are good to go!

  19. Hello World!!! To Program: Program Tab: Select the hex file Select the elf file Program WARNING! WARNING!! WARNING!!! NEVER EVER STOP WHILE IT IS RUNNING (SEE BOTTOM/SEE RED LIGHT ON THE PROGRAMMER!!!)

  20. Programming 3Pi (Motor) Physics: Output ports: PD5, PD6 (M1) PD3, PB3 (M2) Sample: 0 1 Forward 1 0 Reverse 0 0 or 1 1 Brake Speed  is reduced by pressing brake.  Code: set_motors(180,180);  Range: -255  to 255

  21. Programming 3Pi •  Include header files for 3pi and memory space • To store data to memory: • “const char wc_msg[] PROGMEM = " Pololu";” • To display on LCD: • print_from_program_space(wc_msg); • lcd_goto_xy(x,y);  /* Axis */print_long(pd);   • print(string) • To play music: • play_from_program_space(music); • To get battery power: • read_battery_millivolts() • Delay: • delay_ms(100);   • Wait for button: • wait_for_button_release(BUTTON_B); 

  22. THE END!!! Question or Pop Quiz?

More Related