Arduino on the Pololu Orangutang

With the new feature in Arduino 0011 that lets you skip the bootloader and write a sketch with icsp, has anyone been playing with the Orangutan boards from Pololu?

It looks like for $60, you get what is effectively an Arduino board with an integrated low-voltage motor controller and character LCD in a smaller form factor.

Nobody has insight into this?

It looks very interesting. I like the built in LCD and switches. It would make life a little easier.

The baby orangutang is worth looking at, too.

Can these be used with the Arduino IDE and code libraries?

Mike

Can these be used with the Arduino IDE and code libraries?

Exactly what I was asking :wink:

Hello, my name is Ben, and I'm involved with Orangutan development at Pololu.

I don't have much experience with the Arduino IDE and code libraries, but I'm interested in exploring using them with our Orangutan robot controllers. As you've noted, our Orangutan controller boards are designed around AVR microcontrollers (typically the mega48 or mega168, the same microcontrollers as are on the Arduino boards). We currently advocate programming them using an AVR ISP programmer and free software packages such as WinAVR (which gives you the GNU GCC compiler) and AVR Studio (which gives you an IDE and programming software).

If the Arduino software now supports standard in-system programming such as AVR ISP, then you would be able to use it along with an AVR ISP programmer (such as our Orangutan USB Programmer) to program the Orangutan. It's worth noting that most of our Orangutan models run at 20 MHz instead of the 16 MHz of standard Arduino boards, so I believe you would need to modify your board definition file.

I've briefly started playing around with Arduino 0011 in an attempt to use the Arduino software to program an Orangutan LV-168, but I have yet to figure out how to skip the bootloader and write a sketch with ICSP. Would anyone be able to provide me with any assistance here?

If the Arduino software now supports standard in-system programming such as AVR ISP, then you would be able to use it along with an AVR ISP programmer (such as our Orangutan USB Programmer) to program the Orangutan. It's worth noting that most of our Orangutan models run at 20 MHz instead of the 16 MHz of standard Arduino boards, so I believe you would need to modify your board definition file.

Thank you for taking the time to respond here.

As far as I know the 16MHz speed is a bit too hard-coded and some timings will still be out even if the declaration is changed. This is not a huge problem and I know people do use different speeds and just have to take that into account in their code.

I've briefly started playing around with Arduino 0011 in an attempt to use the Arduino software to program an Orangutan LV-168, but I have yet to figure out how to skip the bootloader and write a sketch with ICSP. Would anyone be able to provide me with any assistance here?

It's a little bit cryptic and you can't access that feature from the IDE. Take a look at http://www.arduino.cc/en/Hacking/Programmer

I do have an AVR-ISP and I'd love to try it out. I'm just a bit reluctant to spend the $60 when I don't know how well it will work.

While you're here, I bought a few things from your booth at Robothon in Seattle in 2006, and I remember you had a robot based on the Baby Orangutan. It was black in colour about 8 inches long, 2 inches tall and 3 inches wide. I didn't look closely because at the time I wasn't interested in AVR's. I can't find anything like it on your site now that I do use AVR's. Do you know what product that is?

Can you offer some suggestions on Driving the cheap Tamiya gear motors from an Arduino board? The issue comes up here from time to time, and just doesn't seem to make sense to people to buy a $40ish driver board for a $10ish motor assembly.

Thanks

It's a little bit cryptic and you can't access that feature from the IDE. Take a look at http://www.arduino.cc/en/Hacking/Programmer

I do have an AVR-ISP and I'd love to try it out. I'm just a bit reluctant to spend the $60 when I don't know how well it will work.

Thanks for the information. I'll try to get it working on an Orangutan LV-168 and let you know how it turns out. Are there any specific concerns or compatibility issues that you'd like me to test for, or is it simply a matter of demonstrating that it can be programmed through an AVR ISP using Arduino software?

While you're here, I bought a few things from your booth at Robothon in Seattle in 2006, and I remember you had a robot based on the Baby Orangutan. It was black in colour about 8 inches long, 2 inches tall and 3 inches wide. I didn't look closely because at the time I wasn't interested in AVR's. I can't find anything like it on your site now that I do use AVR's. Do you know what product that is?

I don't remember this robot, but it would have just existed as a Baby Orangutan demonstration, not as something we sold. Currently our only programmable AVR products are our Orangutan robot controllers, but we do have a mega168-based robot kit under development.

Can you offer some suggestions on Driving the cheap Tamiya gear motors from an Arduino board? The issue comes up here from time to time, and just doesn't seem to make sense to people to buy a $40ish driver board for a $10ish motor assembly.

It sounds like we should be designing a less-expensive, lower-performance version of our Low-Voltage Dual Serial Motor Controller! The only alternative to this I can recommend is the L298N dual motor driver. It should be capable of delivering the current you need to drive the Tamiya gearboxes, and the voltage drop will put the output voltage closer to the suggested 3V. Just make sure you solder caps across your motor leads because those Tamiya motors can be quite noisy.

I played around with some of the Arduino files this morning and was able to get the Arduino 0011 IDE to program an Orangutan LV-168 using an AVR ISP programmer (specifically, our Orangutan USB programmer).

I ended up making the following changes:

To the end of boards.txt (in arduino-0011/hardware) I added:

##############################################################

orangutan.name=Orangutan with Programmer

orangutan.upload.maximum_size=16384

orangutan.build.mcu=atmega168
orangutan.build.f_cpu=20000000L
orangutan.build.core=arduino

This accounts for the Orangutan's higher clock speed of 20 MHz, and I believe it increases the maximum upload size to the full flash size, allowing the bootloader space can be used for your program.

To make the IDE compatible with our Orangutan USB programmer, to programmers.txt (in arduino-0011/hardware) I added:

avrispv2.name=AVR ISP v2
avrispv2.communication=serial
avrispv2.protocol=avrispv2

The Orangutan USB programmer uses the avrispv2 protocol, which is not the same as stk500 or avrispmkii, so I added it to the list of protocols.

Finally, to preferences.txt (in C:\Documents and Settings<user name>\Application Data\Arduino) I changed the line

upload.using=bootloader

to

upload.using=avrispv2

If you have an AVR ISP programmer that uses a different protocol, such as avrispmkii, you would use that instead.

After all this I was able to start up the Arduino 0011 IDE, select "Orangutan with Programmer" as my board, specify my programmer's virtual serial port, and program the following (very slightly modified) default blink LED program:

/*
 * Blink
 *
 * The basic Arduino example, modified to work for Orangutans.  
 * Turns on an LED on for one second, then off for one second, 
 * and so on...  We use pin 1 because Orangutan's have an LED
 * on PD1, which corresponds to Arduino pin 1.
 *
 * http://www.arduino.cc/en/Tutorial/Blink
 */

int ledPin = 1;                // LED connected to digital pin 1 (PD1) on Orangutans

void setup()                    // run once, when the sketch starts
{
  pinMode(ledPin, OUTPUT);      // sets the digital pin as output
}

void loop()                     // run over and over again
{
  digitalWrite(ledPin, HIGH);   // sets the LED on
  delay(1000);                  // waits for a second
  digitalWrite(ledPin, LOW);    // sets the LED off
  delay(1000);                  // waits for a second
}

I played around with some of the Arduino files this morning and was able to get the Arduino 0011 IDE to program an Orangutan LV-168 using an AVR ISP programmer (specifically, our Orangutan USB programmer).

Thank you for the update and the information on exactly what you did. I was still trying to think of specific tests, but given that you got that far, I would think anything should work with the possible exception of timings with the different crystal.

Do you think you could test out the LCD from an Arduino program?

It might be helpful to post a mapping from the Orangutan pins to the Arduino pins, and offer a tutorial on using the motor driver and LCD from Arduino.

Any chance on an Arduino forum discount on the LV-168, the Tamiya double gearbox, and a chassis? :wink:

I don't remember this robot, but it would have just existed as a Baby Orangutan demonstration, not as something we sold. Currently our only programmable AVR products are our Orangutan robot controllers, but we do have a mega168-based robot kit under development.

That's quite possible. I remember at the time I was interested in the hardware to try and connect it to a PIC, and the woman at the booth was emphasizing the Baby Orangutan.

It sounds like we should be designing a less-expensive, lower-performance version of our Low-Voltage Dual Serial Motor Controller! The only alternative to this I can recommend is the L298N dual motor driver. It should be capable of delivering the current you need to drive the Tamiya gearboxes, and the voltage drop will put the output voltage closer to the suggested 3V. Just make sure you solder caps across your motor leads because those Tamiya motors can be quite noisy.

The description on your site of the L298N says the interface is the same as the L293N. Apart from possible pin spacing issues, would this work as a drop-in replacement for the L293N on an Arduino motor controller like Adafruit Motor/Stepper/Servo Shield for Arduino kit [v1.2] : ID 81 : $19.50 : Adafruit Industries, Unique & fun DIY electronics and kits?

I always find it surprising that something as tiny as the Tamiya motor takes so much current without burning up. Maybe I should look at better motors that will let me use the L293N-based shield, but I do like the simplicity of your chassis for the cheap motors.

Thanks,
Jason

Do you think you could test out the LCD from an Arduino program?

It might be helpful to post a mapping from the Orangutan pins to the Arduino pins, and offer a tutorial on using the motor driver and LCD from Arduino.

My goal is to make a detailed application note on using the Orangutan LV-168 in the Arduino environment. My next step will be to convert the LCD control code we provide into an Arduino library. The motor control code should be straightforward as the two timer0 PWM outputs control one H-bridge and the two timer2 PWM outputs control the other H-bridge. I'm hoping controlling the motors is as simple as using Arduino library functions to set the timer0 and timer2 pwm outputs for the desired speeds and directions.

Any chance on an Arduino forum discount on the LV-168, the Tamiya double gearbox, and a chassis? :wink:

All I can say is that there's definitely a very slim chance that we might have some sort of LV-168 sale sometime, maybe :stuck_out_tongue: There's also a quantity discount if you want to get 10 or more...

  • Ben

The description on your site of the L298N says the interface is the same as the L293N. Apart from possible pin spacing issues, would this work as a drop-in replacement for the L293N on an Arduino motor controller like Adafruit Motor/Stepper/Servo Shield for Arduino kit [v1.2] : ID 81 : $19.50 : Adafruit Industries, Unique & fun DIY electronics and kits?

Unfortunately no, you can't just swap the L293N for the L298N. The pin-outs of the two ICs are different, so you would need to remap your microcontroller connections to take advantage of the common interface.

I always find it surprising that something as tiny as the Tamiya motor takes so much current without burning up. Maybe I should look at better motors that will let me use the L293N-based shield, but I do like the simplicity of your chassis for the cheap motors.

The Tamiya motors draw a surprisingly large amount of current, which is partially why the recommended operating voltage is so low (3 V). You can run them at higher voltages, but then they actually do burn up.

They're a little more expensive, but have you looked at Solarbotics gearboxes or our custom-made versions?

  • Ben

Just to wrap up this thread, you can find the results of my work on this here:

The above app note explains how to program the Orangutan robot controllers using the Arduino IDE. It also provides pin-out tables in terms of Arduino pins, and it includes a set of libraries for controlling the onboard hardware (analog, buzzer, LCD, LEDs, motors, and pushbuttons).

I created a thread to specifically publicize this app note here:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1212192705

  • Ben