Orangutan-lib
- Tom Benedict
- Steve Judd
Supported Subsystems
- analog.h / analog.c
- bitfield.h
- buzzer.h / buzzer.c
- counter.h / counter.c
- i2cmaster.h / i2cmaster.c
- lcd.h / lcd.c
- pin-change.h / pin-change.c
- pwm.h / pwm.c (Symmetric)
- relay-motor.h / relay-motor.c
- * rtc.c / rtc.h
- servo.h / servo.c
- spi.c / spi.h
- uart-spi.c / uart-spi.h
- * sw-spi.c / sw-spi.h
- uart.h / uart.c
Planned Support
Orangutan Hardware
The Orangutan, the Baby-Orangutan, and the Orangutan-X2 are robot controllers produced by Pololu Robotics. The processor on the Baby-O is either an Atmel ATMega48 or an ATMega168, the difference being how much code you can load on it (4k for the Mega48, and 16k for the Mega168). The processor on the Orangutan is now an Atmel ATMega168. The processor on the Orangutan-X2 is an Atmel ATMega644 with an ATMega168 onboard to act as a programmer and to handle much of the onboard hardware.
The Baby Orangutan and the Orangutan-X2 both run at 20MHz and the Orangutan runs at 8MHz unless you install an external oscillator (though this eats two I/O lines). Since the Atmel AVR processors are RISC processors, this basically means they're 20 MIPS and 8 MIPS devices respectively.
Because the folks at Pololu were careful to keep pin assignments similar between the Orangutan and the Baby-Orangutan, the two are more or less interchangeable in terms of code. What works on one really does work on the other. (I know... I do it all the time.) The X2 is a different beast, so some care is required when porting code to it from one of the other Orangutans.
Since I'm fond of discussing shipping boxes, I've shown the one that the Orangutan came in. The Baby-O came in a little antistatic bag just big enough to hold the Baby-O and its headers (which don't come installed.) Each was small enough to be shoved into my P.O. box, which meant no waiting in line to pick up my packages! (This is a huge boon to people who don't have a mailbox at home.) The X2's box was understandably larger, and didn't fit into my P.O. box. Nonetheless, it's smaller than most mailboxes, so quick home delivery shouldn't be a problem.
If you're looking at diving into the Atmel AVR family of processors for the first time there's something to keep in mind regarding cost: With the OOPic II+ on my Mark III mini sumo robot, the "programmer" was basically a serial cable with the OOPic IDE running at one end and the OOPic at the other. With the AVR that's not the case. In addition to purchasing the Orangutan and the Baby-Orangutan, I also picked up an AVR ISP (in-system programmer) from Digikey. Recently Pololu came out with their own ISP Programmer but in any case an external programmer is required for the Orangutan and the Baby-Orangutan. So when you're working out the costs of all your bits and pieces, don't leave out the cost of the programmer!
The Orangutan-X2 has its own programmer built-in, and doesn't require an external programmer. From the AVR Studio standpoint, the X2 looks like a serial AVR ISP.
The other big difference between the AVR processors and something like the PIC or the OOPic is the compiler. The GNU C compiler, gcc, has been ported to the AVR platform. This is very very good in that this compiler has been around for decades, and is very mature. It's not so good because it means you can't entirely expect to find all the bells and whistles to take advantage of all the AVR's neat features, unlike the OOPic. But no matter what, it means you get a full-featured, ANSI-compliant C and C++ compiler for zero cost with a worldwide support network several million people strong. Can't really beat that. And considering that a full-featured PIC compiler can run upwards of a thousand dollars, a free copy of GCC and a $35 programmer (or $28 for the one from Pololu) starts to look extremely cheap.
With the caveats out of the way, here's my setup:
-
Orangutan,
Baby-Orangutan
running an ATMega168, or an
Orangutan-X2
from Pololu
- AVR Studio 4 (free from Atmel's web site)
- WinAVR (the Windows version of the Atmel GCC port)
- AVR ISP II in system programmer from Digikey
And here's the family portrait of all three devices:
(Yeah, the Baby-O really is that small!)
From the side, you can see the relative thickness of the three devices. The X2 is by far the thickest, though the capacitors for the motor driver board can be mounted sideways, or omitted for smaller motors. (Mine has both installed.) The Orangutan is next, but even its thickness is pretty minimal, with the LCD not protruding much higher than the I/O headers. The Baby-Orangutan takes the prize as the thinnest of the three devices, though the headers take up some room. But soldering directly to the pads or using low-profile machine pin headers would shave that off even further.
The LCD screen on the Orangutan is a two line, eight character display with 5x8 pixel characters. It's plenty readable, despite its small size. Real estate on the display is at a premium, though (a single 0-255 one-byte value takes up three characters unless you display it in hex!) so you do have to be careful about how you lay things out on it. Luckily it's a pretty full-featured display and can even do bi-directional scrolling.
The LCD on the X2 is considerably larger, with a 20x4 display. But it is not permanently installed on the X2, so its use is optional. The LCD connects through a 14-pin header, so it would be possible to build a robot with the X2 as a controller, and only use the LCD for setup and troubleshooting.
So how useful would they be in, say, a mini-sumo robot? At roughly 3g for the Baby-O and 27g for the Orangutan, weight is certainly not an issue. The Orangutan is 1.8"x2.0" in size, so it's even smaller than my stock Mark III board. The Baby-Orangutan is even smaller, and without the headers I can't even get my scale to register it's there.
But a picture's worth a thousand words. Yeah, they'd fit just fine.
On a whim I stuck my X2 on top of my mini-sumo robot and took a picture. Surprisingly, it also fits in the mini-sumo footprint and could be used as a controller. But it would be utter overkill for this application. Still, the thought of two 20+A motors driving a mini-sumo has some appeal. Not that I'll ever build it. I've got other plans for my X2.