Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation Pololu Orangutan SVP User's Guide 1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.a. Supported Operating Systems . . . . . . . . . . . . . . 2. Contacting Pololu . . . . . . . . . . . . . . . . . . . . . . . . 3. Schematic Diagrams . . . . . . . . . . . . . . . . . . . . . . 4. Module Pinout and Components . . . . . . . . . . . . . . . . 5. Getting Started . . . . . . . . . . . . . . . . . . . . . . . . . 5.a.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 1. Overview The Orangutan SVP robot controller [http://www.pololu.com/catalog/product/1325] is a complete control solution for small and medium-sized robots running at 6 – 13.5 V.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation ◦ 17 free I/O lines on the main MCU, of which 8 can be analog inputs ◦ 4 input lines on the auxiliary processor, which can be either 4 analog inputs or dual quadrature encoder inputs ◦ 2 hardware UARTs • Removable 16-character × 2-line LCD with backlight • Primary 5V switching regulator capable of supplying 3 A • Secondary adjustable (2.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation Under Linux, the three virtual COM ports created by the SVP should appear as devices with names like /dev/ ttyACM0, /dev/ttyACM1, and /dev/ttyACM2 (the numbers depends on how many other ACM devices you have plugged in) and you can use any terminal program (such as kermit) to send and receive bytes on those ports. The Orangutan SVP’s USB connection is not compatible with any version of Mac OS.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 2. Contacting Pololu You can check the Orangutan SVP-324 robot controller page [http://www.pololu.com/catalog/product/1325] or Orangutan SVP-1284 robot controller page [http://www.pololu.com/catalog/product/1327] for additional information, including pictures, example code, and application notes. You can also find libraries for interacting with the onboard hardware and an assortment of sample code in the Pololu AVR Library [http://www.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 3. Schematic Diagrams Schematic diagrams of the Orangutan SVP are available here: Orangutan diagram [http://www.pololu.com/file/download/org06a02_schematic.pdf?file_id=0J265] (99k pdf) 3.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 4. Module Pinout and Components The Orangutan SVP contains a programmable AVR ATmega324PA or ATmega1284P microcontroller connected to two motor drivers for direct control of two DC motors, a 16×2 character LCD, a buzzer, three user pushbuttons, two user LEDs, and a demultiplexer for servo control.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation Orangutan SVP-324 with dimensions. Power & Motor Connections The power and motor connections are in the lower-right corner of the unit. The Orangutan SVP’s input voltage (VBAT) should be 6 – 13.5 V, from which the on-board regulator generates the 5 V supply (VCC) that is used to power the logic. The Orangutan SVP has one TB6612FNG motor driver for each motor output.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation For each motor, the Orangutan SVP has a current-sensing circuit that produces an output voltage proportional to the current the motors are using (850 mV/A). The respective outputs of these circuits are labeled CS1 and CS2, and they are accessible near the center of the board. User I/O & Power Outputs Sixteen user I/O lines can be accessed via the four 4×3 0.100" female headers along the lower edger of the board, as shown below.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation Trimpot The Orangutan SVP comes with a 10 kilo-ohm user trimmer potentiometer, located between the USB connector and the LCD connector. The trimpot is connected to the auxiliary processor, which measures its output voltage and reports it to the AVR. You can disconnect the trimpot from the auxiliary processor by cutting the labeled trace between POT and ADC/SS on the bottom side of the board.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation jumper attached to just the middle pin of each of the two servo power selection banks. In this default orientation, the jumper supplies no power to the servo power rail. Orangutan SVP with key integrated hardware labeled. Adjustable Voltage (VADJ) In addition to the 5 V regulator that supplies VCC, the Orangutan SVP comes with an adjustable voltage regulator. Both regulators can supply a current of 3 A.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation LEDs Orangutan SVP LEDs. The Orangutan SVP comes with 9 LEDs: • A blue power LED is located next to the power button. • There are four motor indicator LEDs located near the motor outputs. A green LED lit indicates that the corresponding motor is being driven “forward” (the voltage on output B is higher than the voltage on A).
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 3.0 V. If this happens to you, check your power connections and battery voltage, and make sure you are not drawing too much power from the board. 4.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 5. Getting Started 5.a. Installing Windows Drivers If you use Windows XP, you will need to have either Service Pack 3 [http://www.microsoft.com/ downloads/details.aspx?FamilyId=68C48DAD-BC34-40BE-8D85-6BB4F56F5110] or Hotfix KB918365 [http://support.microsoft.com/kb/918365] installed before installing the drivers for the Orangutan SVP.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation Windows XP users: After the INF file is installed, follow steps 5-9 for each new Orangutan SVP you connect to your computer. 5. Connect the device to your computer’s USB port. The Orangutan SVP shows up as three devices in one so your XP computer will detect all three of those new devices and display the “Found New Hardware Wizard” three times. Each time the “Found New Hardware Wizard” pops up, follow steps 6-9. 6.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 8. Windows XP will warn you again that the driver has not been tested by Microsoft and recommend that you stop the installation. Click “Continue Anyway”. 9. When you have finished the “Found New Hardware Wizard”, click “Finish”. After that, another wizard will pop up. You will see a total of three wizards when plugging in the Orangutan SVP. Follow steps 6-9 for each wizard. 5.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation If you use Windows XP and experience problems installing the drivers, the cause of your problems might be a bug in older versions of Microsoft’s usb-to-serial driver usbser.sys. Versions of this driver prior to version 5.1.2600.2930 will not work with the Orangutan SVP. You can check what version of this driver you have by looking in the “Details” tab of the “Properties” window for C:\Windows\System32\drivers\usbser.sys.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation Windows XP device manager showing the Pololu Orangutan SVP. Windows Vista device manager showing the Pololu Orangutan SVP. Some software will not allow connection to higher COM port numbers. For example, AVR Studio can only connect to COM1 through COM9. If you need to change the COM port number assigned to one of the COM ports, you can do so using the Device Manager.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation board) to proceed to the main menu. Press the Top Button (marked PC5) or the Bottom Button (marked PC2) to scroll forward or backward through the menu, and press the Middle Button to make a selection or to exit one of the demos. There are nine demos accessible from the menu: 1. Analog Inputs: This demo displays voltage readings from the Orangutan SVP’s 13 analog inputs as a bar graph.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation As a first step, we recommend you try to program your Orangutan with a simple program that blinks the red user LED on pin PD1. Download the file below that corresponds to your particular Orangutan SVP model: • Orangutan SVP-324: (7k zip) BlinkLED_m324.zip [http://www.pololu.com/file/download/ BlinkLED_m324.zip?file_id=0J235] • Orangutan SVP-1284: BlinkLED_m1284.zip?file_id=0J326] (8k zip) BlinkLED_m1284p.zip [http://www.pololu.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation As a second step, we recommend you install the Pololu AVR C/C++ Library [http://www.pololu.com/docs/0J20], which provides functions for interacting with all of the Orangutan’s integrated hardware, including the auxiliary processor, and many demo programs that show how to use these functions. For an overview of how to program your SVP using the library, see Section 6.j of the Pololu AVR C/C++ Library User’s Guide.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 5.d. Programming in Linux or Windows using AVRDUDE AVRDUDE [http://savannah.nongnu.org/projects/avrdude/] is a free program for Windows and Linux that allows you to program your Orangutan SVP’s on-board ATmega324PA or ATmega1284P microcontroller. You can compile an Intel Hex (.hex) file using avr-gcc, and then program the hex file on to your Orangutan SVP using AVRDUDE.
Pololu Orangutan SVP User's Guide • Orangutan © 2001–2010 Pololu Corporation SVP-324: (7k zip) BlinkLED_m324.zip [http://www.pololu.com/file/download/ BlinkLED_m324.zip?file_id=0J235] • Orangutan SVP-1284: BlinkLED_m1284.zip?file_id=0J326] (8k zip) BlinkLED_m1284p.zip [http://www.pololu.com/file/download/ You can move the Makefile from linux/ in to the top directory and compile using the make command. This should generate a file BlinkLED.hex which you can program on to your SVP by running avrdude.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation • One 3×7 female header block • Three 2-pin 3.5mm terminal blocks • Five blue shorting blocks [http://www.pololu.com/catalog/product/968] • Two 2×3 female header blocks [http://www.pololu.com/catalog/product/1023] • One 2×3 shrouded box header [http://www.pololu.com/catalog/product/854] • One 2×8 shrouded box header [http://www.pololu.com/catalog/product/898] • One buzzer • Five pushbuttons [http://www.pololu.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 2. Power input There are two parallel connection points provided for the 6–13.5V power input. You can install a 3.5mm terminal block on the large holes to accommodate large wires. You can also install a 1×2 male header on the smaller holes and plug a battery pack [http://www.pololu.com/catalog/category/54] directly in to it. 3. Motor outputs You can install two 3.5mm terminal blocks to accommodate your motor leads. 4.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 12. Auxiliary processor I/O block This block contains the auxiliary processor’s A, B, C, D/RX, and TX lines, as well as several connections to GND and VCC. You can solder in either the 3×7 male or 3×7 female headers here, or mix and match genders using the other provided headers. 13.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 6.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 7. AVR Pin Assignment Table Sorted by Pin 7.
Pololu Orangutan SVP User's Guide Port Pin A B C Orangutan Function © 2001–2010 Pololu Corporation Notes/Alternate Functions PA0 analog input and digital I/O ADC input channel 0 (ADC0) PA1 analog input and digital I/O ADC input channel 1 (ADC1) PA2 analog input and digital I/O ADC input channel 2 (ADC2) PA3 analog input and digital I/O ADC input channel 3 (ADC3) PA4 analog input and digital I/O ADC input channel 4 (ADC4) PA5 analog input and digital I/O ADC input channel 5 (ADC5) PA6 analo
Pololu Orangutan SVP User's Guide D © 2001–2010 Pololu Corporation PD0 digital I/O USART0 input pin (RXD0) PD1 digital I/O red user LED (low turns LED on; connection can be cut and replaced with jumper) USART0 output pin (TXD0) PD2 digital I/O USART1 input pin (RXD1) External interrupt 0 (INT0) PD3 digital I/O USART1 output pin (TXD1) External interrupt 1 (INT1) PD4 buzzer Timer1 PWM output B (OC1B) PD5 digital I/O servo pulse output (SPWM) Timer1 PWM output A (OC1A) PD6 M2 speed control line
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 8. Using the USB Communication Port The Orangutan SVP’s USB Connection provides a virtual serial port called the Pololu Orangutan SVP USB Communication Port which allows two-way communication between a personal computer and the Orangutan SVP’s AVR at a rate of over 20 kilobytes per second. The bytes sent from the computer will be transmitted to the Orangutan SVP’s auxiliary processor and made available to the AVR.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation the second port is the USB Communication Port. In Linux, the port name depends on how many other devices are using the USB CDC ACM driver to create virtual serial ports at the time the Orangutan SVP is plugged in. After determining the port name, you can use any serial port software to communicate on that port. There are many free terminal programs available, including PuTTY [http://www.chiark.greenend.org.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation // Disconnect from the port so that other programs can use it. port.Close(); Communication on the AVR side Writing programs for the USB Communications port on the AVR side is supported by two different sections of the Pololu AVR C/C++ Library. The SVP-specific functions section of the library provides the rts_enabled() and dtr_enabled() functions which return the states of those control lines.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 9. Using the TTL Serial Port The Orangutan SVP’s USB Connection provides a serial port called the Pololu Orangutan SVP TTL Serial Port which allows two-way communication between a personal computer and TTL-level serial devices at baud rates between 300 bps and 115200 bps. This serial port can be used for communication between a computer and an external serial device besides the AVR.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation PuTTY is a free Windows terminal program that can send and receive bytes on a serial port. If you need to send and receive non-ASCII bytes, you can use the Pololu Serial Transmitter Utility for Windows [http://www.pololu.com/docs/0J23]. Advanced users developing scripted applications kermit [http://www.columbia.edu/kermit/] (Windows or Linux).
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 10. Motor Driver Truth Table Input Orangutan SVP output PD7, PD6 PC7, PC6 M1A, M2A M1B, M2B motor effect LED on H H L H “forward”* green H L H L “reverse”* red L H or L L L brake low none * Note that the concept of “forward” is arbitrary as simply flipping the motor leads results in rotation in the opposite direction. Motor 1 is controlled by pins PD7 (i.e. OC2A) and PC7. Motor 2 is controlled by pins PD6 (i.e.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 11. USB Power When connected to a computer, the USB connection provides a 5 V power supply. If an external power supply is present, the unit will run off of the external supply and not draw any power from USB. If only the USB power is present, then by default the auxiliary processor will be powered from USB, but the AVR and the VCC power pins on the board will not be powered. An option is available for powering the entire board from USB.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 12. Upgrading Firmware The firmware (program) that runs on the Orangutan SVP’s auxiliary processor can be upgraded with bug fixes or new features. Version 1.01 of the firmware fixes some bugs with the quadrature encoder support on the auxiliary processor. If you use the auxiliary processor to read quadrature encoder outputs, we recommend that you upgrade to this version so that these bugs will not cause you any problems.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 4. The bootloader line is shown in the picture below. Short this line to ground by connecting one end of a wire to ground and touching the other end to the hole, being extremely careful not to touch any of the neighboring parts. Ground is available in many places on the SVP; check the Orangutan SVP Reference Diagram [http://www.pololu.com/file/download/orangutan_svp_reference_diagram.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 12. You can now unplug your SVP and plug it back in to the computer and use the new firmware. If you run into problems during a firmware upgrade, please contact us [http://www.pololu.com/contact] for assistance. 12.
Pololu Orangutan SVP User's Guide © 2001–2010 Pololu Corporation 13. Related Resources The following list of resources might come in handy: • WinAVR [http://winavr.sourceforge.net/]: free, open source C/C++ compiler for AVRs • AVR Studio [http://www.atmel.com/avrstudio/]: free development IDE from Atmel that uses WinAVR as its compiler • ATmega324PA documentation [http://www.atmel.com/dyn/products/product_card.