Pololu Orangutan X2 User manual

Quick-Start Guide
Introduction
Contacting Pololu
The Orangutan X2 is the third release in Pololu's line of Orangutan robot controllers. Like the original Orangutan and subsequent Baby
Orangutan, the Orangutan X2 is designed to be a compact, high-performance control center for robotics and automation projects. The
Orangutan X2’s two-board design allows the unit to maintain the compactness characteristic of the Orangutan line while offering
substantially more electrical and computational power: the X2 can deliver up to a horsepower across two motor channels, and the twin-
microcontroller architecture allows maximum access to the primary microcontroller, an Atmel ATmega644 with 64KB of program space
and 4KB of RAM. Abattery, motors, and sensors can be connected directly to the module for quick creation of advanced robots.
You can check the Pololu web site at for additional information about the Orangutan robot controller ,
including color pictures, application examples, and troubleshooting tips.
We would be delighted to hear from you about your project and about your experience with the Orangutan X2. You can contact us through
our online feedback form or by email at . Tell us what we did well, what we could improve, what you would like
to see in the future, or anything else you would like to say!
http://www.pololu.com/ s
Hardware Overview
Two circuit boards.
Two microcontrollers.
A block diagram of the Orangutan X2 is shown below. The Orangutan X2 consists of two printed circuit boards
connected by a 20-pin connector. The top board holds the high-power motor drivers and power terminals; the rest of the electronics,
including the microcontrollers, is on the bottom board. The connections on the top board are symmetric, so until the connectors are
soldered on, the board can be mounted in either orientation. The Orangutan is available with two motor driver options: the VNH3SP30
costs less, but has slightly lower performance; the VNH2SP30 can deliver more current and adds current sensing. Battery and motor leads
(or leads to your favorite connector style) can be soldered directly to the top board, or the supplied terminal blocks can be used for quick
convenient motor or power supply changes.
The Orangutan X2 has two microcontrollers: an Atmel ATmega644 for the main application, and an auxiliary
ATmega168 that interfaces to most of the dedicated hardware on the X2 and serves as a programmer for the main processor. The two-
microcontroller design simplifies multitasking by relieving the main processor of common tasks such as motor control and melody
generation, and the approach also leaves the mega644 completely unencumbered, allowing the mega644 hardware, such as timers and
interrupts, to be used for your higher-level design.
For more details, please check the complete schematic included at the end of this document.
© 2007 Pololu Corporation
http://www.pololu.com/
Pololu page 1 of 6 org03a
Orangutan X2 Robot Controller
motor drivers
and power
connection
(VNH2SP30)
10x2 2mm
connector
buzzer
main user
microcontroller
(mega644)
auxiliary
microcontroller
(mega168)
USB-to-serial
adapter
(CP2102)
SPI
UART general
purpose
I/O headers
PORTA,
PORTD
PORTC
LCD
Top board
Main board LEDs and
pushbuttons
Orangutan X2 Block Diagram

Module Layout
The main features of the Orangutan X2 are indicated below. Most of the mega644 I/O lines come out to the 0.1” header along the right side,
but the two uncommitted port B pins and the optional mega168 handshaking lines are in the middle of the board. The motor driver board
has a few power supply capacitor options; the picture below shows a single capacitor bent over for a low-profile installation.
© 2007 Pololu Corporation
http://www.pololu.com/
Pololu page 2 of 6 org03a
Orangutan X2 Top View
motor driver ICs (VNH2SP30/VN3SP30)
reset/program
switch
LCD contrast or
PLED brightness
control
3 user
buttons,
5 user
LEDs
display
connector
power button
optional user
potentiometer
16 user
I/O pins
with
power
and
ground
to each
pin
motor direction
indicator LEDs
M1
outputs
M2
outputs
VIN GND
mounting hole
or probe
ground point
mounting hole
power LED
Orangutan X2 Main Board, Component Side
10x2 connector to
motor driver board
USB connector
mega644 main microcontroller
LM2937 voltage
regulator
auto shutdown pin
(high to power-down)
LCD backlight control
(low to turn LEDs off)
USB suspend status
(high for USB active)
CP2102
USB-to-serial adapter
power connection
for bottom PCB
mega168 auxiliary microcontroller
buzzer
mega644:PB4
mega644:PB2
mega168 attention line
mega168 slave select (SS) line
USB and
programming
status LEDs

Module Layout (continued)
Some hardware options on the Orangutan X2 are accessed by making or breaking solder bridges across surface-mount pads on the bottom
side of the main printed circuit board; the pads are indicated below.
Orangutan X2 Bottom View
general I/O
power selection
(note: each jumper
controls four pins;
and the position
of different voltages
is different for
each jumper)
this jumper connects
ADC6 to just under
1/3 of the input voltage
this jumper connects ADC7 to the
output of the user potentiometer
(which is on the other side of this corner)
This jumper connects
USB bus power to
the 5V net on the board.
This eliminates the
need for a power supply
when only the bottom
board is being used.
Connect this jumper
at your own risk!
© 2007 Pololu Corporation
http://www.pololu.com/
Pololu page 3 of 6 org03a
Power Connections and Limits
The Orangutan X2 power input is on the two lower, middle pins of the upper board. The operating range is . When using large
motors, make sure the power supply and wiring can handle the current; you might also consider putting a fuse in line with the main power.
The motor drivers are capable of delivering surges of up to 30 A, and continuous current will depend on the environment. The VNH3 is
generally good for up to about 9 A continuous, and the VNH2 is good for up to about 14 A. Heat sinks can improve the motor driver
performance.
The power to the main PCB is delivered through four pairs of pins on the 2mm connector, which limits the total power to the bottom board to
approximately 6 A. The onboard 5 V regulator is good for up to 500 mA, but since the practical limit comes from power dissipation, the
usable current will depend on the input voltage and the ambient temperature. The Vservo line is about 2V below the input voltage, and it
can be used to power servos when the main supply is just a bit too high for servos, as with 6- or 7-cell NiMH battery packs. The limit for this
supply is about 3A, but as with most power issues, it depends on how much heat the rest of the board is dissipating.
The Orangutan X2 is intended to be used as a single unit with both boards connected together. However, it may sometimes be convenient to
work with just the lower board, without motors or a large power supply connected. In such cases, the two power input pins above the 20-pin
connector can be used. In cases where very little power needs to be supplied outside the board, the USB port can also be used as a power
source.
.
The Orangutan X2 power is controlled by a pushbutton; push it to toggle the unit on and off.
Only power for the main board is switched; the motor driver board power is not switched.
The power consumption in the off state depends on the input voltage, but it is typically under 100 uA, most of which comes from the motor
driver quiescent current and power supply capacitor leakage current.
6-16V
Power Button
Because the power switch is operated by a
pushbutton, many buttons can be used in parallel, allowing for external power buttons in cases where the main unit is difficult to access.
In this case, the power switch will not work, and your computer will be exposed to any voltage fluctuations on yourVcc line,
so do so at your own risk
Note: the power switch does not actually disconnect the power
supply from the board, so even if the board is turned off, it is possible to do things like accidentally short-circuit the power supply!

Connecting the Orangutan to a Computer
Programming the Orangutan X2
Running the Orangutan X2
The mega168 microcontroller is the programmer for the main mega644 MCU. The mega168 performs this function by emulating an
AVRISP programmer, which connects to a computer serial (COM) port and programs AVR microcontrollers via the SPI (serial peripheral
interface) port. Instead of a standard serial port, the Orangutan X2 uses a USB-to-serial bridge that allows a USB connection to look like a
COM port. Before connecting the Orangutan X2 to a computer, the driver must be installed to allow the computer’s operating system to
treat the USB connection as an old-fashioned serial connection. The driver and installation instructions are available on the Orangutan X2
web page.
Once the USB-to-serial driver is installed and the Orangutan X2 is connected, the mega168 can communicate with the computer through its
serial port, and the green LED next to the USB connector will be lit. When programming the mega644, the Orangutan X2 will look like an
AVRISP programmer; during normal operation, the mega168 can send and receive data to or from the computer (e.g. using a terminal
program) for debugging or other purposes.
The Orangutan X2 can be programmed using any platform for which there is a USB driver and for which there is AVRISP-compatible
programmer software. We recommend using Atmel’s AVR Studio, an integrated development environment (IDE) that works with the free
GCC C compiler and includes a simulator and other useful tools, includingAVRISPsupport.
To enter programming mode, hold down the reset/programming button (next to the USB connector) for more than half a second. The
buzzer will beep, and the yellow LED will turn on, indicating that you have entered programming mode. The mega168 will no longer
respond to commands from the mega644, and it will wait for programming commands from the computer via the USB connection. When
programming is in progress, the red LED will be lit. When programming completes, the mega644 is allowed to execute, but the mega168
will remain in programming mode until the reset button is pressed.
It is also possible to set the mega168 to always look out for programming commands. In that state, normal serial port use is unavailable, and
any incoming serial data is treated as coming from the computer programming software. When programming is requested, the mega168
will program the mega644 and then reset itself and the mega644, allowing full operation to resume immediately upon completion of
programming.
When programming the mega644, access to some fuse settings is not available. The most important setting is the clock source setting since
the mega644 must be set for an external resonator, and the mega644 provides a 20 MHz clock to the mega168. In general, the fuses should
only be changed rarely and with great care since the Orangutan X2 could become unresponsive.
Using the Orangutan X2 is generally identical to using any other mega644-based project, and most of the mega644’s resources are available
to the user. The exceptions are the reset system and the SPI port, which are connected to the mega168.
Because the mega168 and mega644 need to stay synchronized, it is not desirable to reset the mega644 independently. The reset button does
not connect directly to either processor’s hardware reset line. Instead, the mega168 monitors the reset button and determines when to reset
itself or the mega644. Typically, the mega168 will reset both processors, keep the mega644 reset while it initializes, and then finally allow
the mega644 to begin execution. The reset button will not work during programming.
The SPI port is the main connection between the two MCUs. During programming, the mega168 becomes the master; during normal
operation, the mega644 is the master and sends the mega168 commands via the SPI interface. The default setup of the Orangutan X2
assumes no other use of the SPI lines (the mega168’s slave-select line is pulled down by a resistor). The SS line can instead be connected to
one of the mega644 I/O lines, and the mega644 can then control multiple slave devices on the same SPI lines. It can also be desirable to use
the SS line even without additional SPI devices since the SS line provides added robustness to the protocol.
The mega644 to mega168 SPI interface is detailed in a separate document; please see the Orangutan X2 web page for more details.
Reset
SPI Port
© 2007 Pololu Corporation
http://www.pololu.com/
Pololu page 4 of 6 org03a

© 2007 Pololu Corporation
http://www.pololu.com/
Pololu
Orangutan X2 Robot Controller Schematic Diagram
1
2
3
4
5
6
JP2
avrisp2x3 PC6 (RESET) 29
30
31
32
1
2VCC 6
GND 5
7
8
9
10
11
12
13
14
15
16
PD0 (RXD)
PD1 (TXD)
PD2 (INT0)
PD3 (INT1)
PD4 (XCK/T0)
PB6 (XTAL1/TOSC1)
PB7 (XTAL2/TOSC2)
PD5 (T1)
PD6 (AIN0)
PD7 (AIN1)
PB0 (ICP)
PB1 (OC1A)
PB2 (SS/OC1B)
PB3 (MOSI/OC2)
PB4 (MISO)
PB5 (SCK)
17
AVCC 18
AREF 20
GND 21
PC0 (ADC0) 23
PC1 (ADC1) 24
PC2 (ADC2) 25
PC3 (ADC3) 26
PC4 (ADC4/SDA) 27
PC5 (ADC5/SCL) 28
GND 3
VCC 4
ADC6 19
ADC7 22
GND 33
U2
ATmega168
SW1
RST/PROG
0.1uF
C5
0.1uF
C6
VCC
VCC
1KR3 10K
R5
1K
R4
VCC
BZ1
BUZZER
D2
(red)
Motor 2 PWM
Motor 1 PWM
644 Atention Request
D3
(yellow)
644 Reset
SS168 Reset
644 CLK out
Motor 1 IN A
Motor 1 IN B
Motor 2 IN A
Motor 2 IN B
Motor 1 DIAG
Motor 1 Current Sense
Motor 2 Current Sense
VCC
MOSI
MISO
SCK
Internally pulled high
168 Reset
RXD
TXD
AVCC168
Motor 2 DIAG
1
2
4
3
5
6
7
8
9
10
11
12
14
13
15
16
17
18
19
20
JP1
Header 10x2 2mm
to motor driver board
GND
GND
GND
GND
VBAT
VBAT
VBAT
VBAT
VCC
VCC
Motor 1 PWM
Motor 2 PWM
Motor 1 Current Sense
Motor 2 Current Sense
Motor 1 IN A
Motor 1 DIAG
Motor 1 IN B
Motor 2 IN B
Motor 2 DIAG
Motor 2 IN A
SW2
pushbutton
SW3
pushbutton
SW4
pushbutton
10KR8
10KR9
10KR10
1KR11
1KR12
1KR13
VCC
User pushbuttons
PC1
PC4
PC6
JP25
SMTjumper
ADC6
VIN
10.0K
R29
4.53K
R30
0.1uF
C13
10K
R14
TRIMPOT
VCC
ADC7
JP24
SMTjumper
0.1uF
C7
VCC
PB5 (MOSI)
1
PB6 (MISO)
2
PB7 (SCK)
3
RESET 4
GND
6
XTAL2
7XTAL1
8PD0 (RXD) 9
PD1 (TXD) 10
PD2 (INT0) 11
PD3 (INT1)) 12
PD4 (OC1B) 13
PD5 (OC1A) 14
PD6 (OC2B/ICP) 15
PD7 (OC2A) 16
GND
18
PC4 (TD0)
PC5 (TDI)
24
PC6 (TOSC1)
25
PC7 (TOSC2)
26
GND
28
AREF 29
PA7 (ADC7) 30
PA6 (ADC6) 31
PA5 (ADC5) 32
PA4 (ADC4) 33
PA3 (ADC3) 34
PA2 (ADC2) 35
PA1 (ADC1) 36
PA0 (ADC0) 37
GND
39
PB0 (XCK0/T0)
40
PB1 (T1/CLKO)
41
PB2 (AIN0/INT2)
42
PB3 (AIN1/OC0A)
43
PB4 (SS/OC0B)
44
GND
45
ATmega644
0.1uF
C8
MOSI
MISO
SCK
From mega168
644 Reset
1 3
2
20MHz
Y1
644 CLK out 1
2
3
4
JP6
1
2
3
4
JP4
DB4
DB5 12
DB6 13
DB7 14
LCD/User
1
2
JP9 User
1
2
3
4
JP5
1
2
3
4
JP7
User Connectors
ADC7
PC5
PC6
PC7
ADC6
AVCC644
Internally pulled high
1
2
JP26
1
2
JP27
9.1Ohm
R31
10k
R32
NP
R33
Q4
TP2
VCC
VCC
LCD
backlight
power
TP4
4.7K
R6
1
2
JP3
Header 2
SS
644 Atention Request
VCC 5
VCC 17
PC0 (SCL)
19
PC1 (SDA)
20
PC2 (TCK)
21
PC3 (TMS)
22
23 AVCC 27
VCC 38
U3 VCC
Vss 1
VDD 2
Vo 3
RS 4
R/W 5
E6
DB0 7
DB1 8
DB2 9
DB3 10
11
JP8
10K
R7
TRIMPOT
VCC
PC0
PC1
PC2
PC3
PC4
10uH
L1
0.1uF
C12
VCC AVCC168
10uH
L2
0.1uF
C17
VCC AVCC644
D5D6D7D8D9
1K
R23
1K
R24
1K
R25
1K
R26
1K
R27
PC0
PC2
PC3
PC5
PC7
User LEDs
RGRG
Y
(bottom of PCB) (top of PCB)
page5of6 org03a

0.1uF
C4
VCC
VDD 1
D- 2
D+ 3
NC 4
GND 5
NC
NC
NC
NC
NC
NC
6
7
8
9
10
11
J1 USBMINIB
3.3V 6
4
5
7
8
3
13
14
15
16
17
18
19
20
21
22
D+
D-
VREGIN
VBUS
GND
NC
NC
NC
NC
NC
NC
NC
NC
NC
NC
NC
10
RST 9
SUSPEND 11
SUSPEND 12
DCD 1
RI 2
CTS 23
RTS 24
RXD 25
TXD 26
DSR 27
DTR 28
U1
CP2102
1.0 uF
C1
0.1uF
C2
0.1uF
C3
10k
R1
1K
R2
D1
(green)
TXD
RXD
VCC
TP3
USBPOWER
SMTjumper
1
2
4
3
5
JP2
0.1uF
C3
VCC VBAT
middle
0.1” pins
Motor driver daughter board
10x2 2mm
to main board
19
20
26
27
28
18
VCC/HEATSLG1 31
VCC 3
VCC 13
VCC 23
OUTA 30
OUTA 25
OUTB 15
OUTB 16
5
10
6
8
11
OUTA 1
OUTA/HEATSLG3 33
OUTB 21
OUTB/HEATSLG2 32
GNDB
GNDB
GNDA
GNDA
GNDA
GNDB
INA
ENB/DIAGB
ENA/DIAGA
PWM
INB
CS
9
NC
NC
NC
NC
NC
NC
NC
NC
NC
2
4
7
12
14
17
22
24
29
U1 VNH2SP30/VNH3SP30
19
20
26
27
28
18
VCC/HEATSLG1 31
VCC 3
VCC 13
VCC 23
OUTA 30
OUTA 25
OUTB 15
OUTB 16
5
10
6
8
11
OUTA 1
OUTA/HEATSLG3 33
OUTB 21
OUTB/HEATSLG2 32
GNDB
GNDB
GNDA
GNDA
GNDA
GNDB
INA
ENB/DIAGB
ENA/DIAGA
PWM
INB
CS
9
NC
NC
NC
NC
NC
NC
NC
NC
NC
2
4
7
12
14
17
22
24
29
U2 VNH2SP30/VNH3SP30
Q1
Q2
D1
1
2
M1
1
2
M2
1
2
VIN
100k
R8
VBAT
VBAT
1kR3
1kR4
1kR5
10kR6
1.5k
R7
10kR10
1.5k
R9
1kR11
1kR12
1kR13
1kR14
1kR2
4.7kR1
4.7k
R15
33nF
C1
33nF
C2
VCC
VCC
VBAT
1.5k
R16
1.5k
R17
D2
D3
D4
D5
10k
R18
10k
R19
C4
axial
C5
10 mm radial
C6
10 mm radial
VBAT
Note: NC pins connected to nearby nets
1
2
4
3
5
6
7
8
9
10
11
12
14
13
15
16
17
18
19
20
JP4
VCC
VBAT
IN
1
2
GND
GND 4
OUT 3
U4
0.1uF
C9
10uF
C10
4.7k
R21
SW5
D4
Power (blue)
TP1
Shut Down
D10 D11
D12 D13
D14
10uF
C14
0.1uF
C15
0.1uF
C16
VCC
VServo
VIN
VBAT
GND
VIN VOUT
OFF
BTN1
BTN2
External power button
LM2937
1
2
3
4
JP10
1
2
3
4
JP18
VIN
VServo
VCC
JP11
User I/O power
selection x4
© 2007 Pololu Corporation
http://www.pololu.com/
Pololu page 6 of 6 org03a
Table of contents
Other Pololu Controllers manuals

Pololu
Pololu DMC01 User manual

Pololu
Pololu DRV8825 User manual

Pololu
Pololu A-Star 32U4 Series User manual

Pololu
Pololu Mini Maestro Series User manual

Pololu
Pololu Romi 32U4 User manual

Pololu
Pololu Jrk G2 21v3 User manual

Pololu
Pololu Orangutan SVP-324 User manual

Pololu
Pololu Qik 2s12v10 User manual

Pololu
Pololu G2 User manual
Popular Controllers manuals by other brands

Evco
Evco Vcolor 318 M manual

Norac
Norac UC4+ installation manual

Grundfos
Grundfos Fire RS Installation and operating instructions

SMC Networks
SMC Networks LER Series Operation manual

BARIX
BARIX Barionet HANDS-ON TRAINING GUIDE

Sentera Controls
Sentera Controls RDCZ Series Mounting and operating instructions