How to program the orangutan?

I know you heard this question a milion times but I can’t find the answer in the forum…
I just got A new orangutan, I pluged my programmer in, turnd the Orangutan on and then the programmer’s led started flashing (I know its not a good sign) and when I tried to press the “program” bottun in the AVRStudio I got an error that sais that thr programmer is connected in the wrong way or that thr reset line is some thing (I con’t remember the exact words…). So, what am I doing wrong? beacuas there is only 1 possible way to connect the programmer.
Arbel

Programming your Orangutan should be just like programming your Baby-O (with the connector on the right way and the power on). The only big difference is that the Orangutans don’t ship with an external oscillator installed, so your board will be running on the AVR’s internal 8MHz oscillator. The AVR probably also has the default “Divide Clock by 8 Internally” fuse checked, so it’s really running at 1MHz. Your programmer frequency has to be set to less than 1/4 the AVR’s clock speed (equal to 1/4 works sometimes too) so you’ll need to set your programmer to less than 250KHz, at least until you uncheck the divide clock by 8 fuse. You can do this from the “Board” tab in the AVRStudio programmer window (make sure to click “write” to set the new speed after selecting it). This is something you’ll run in to, but it’s probably not your problem now, since it should show up when you try to program the Orangutan, not when you first turn on power with the programmer plugged in.

What kind of programmer are you using? With the flashing LED, it sounds like you have the AVRISP MKII. They can be quite finicky, but I’m guessing you’ve tried a bunch of times. I don’t pay much attention to the particular programmer error message AVRStudio comes up with, since it’s almost never the actual problem. Is the LED red with the Orangutan power off, then flashing orange when you turn power on? Can you still program your Baby-O with it? I’m trying to isolate the problem with either the Orangutan or your programmer.

Also, did you get the ATMega168 Orangutan, or the original ATMega8 Orangutan? You say there’s only one way to plug the programmer in, which makes me think that you have the ATMega168 version which has a polarized programming header. Apparently some Pololu distributors are still selling the Mega8 version Orangutans, which are incompatible with the newer AVRISP MKII programmer without a couple of resistor tweaks:

-Adam

Adam

I got the atmega168 and yes, when I connect the programmer to the orangutan when it’s off the led on the programmer turns red, and when I turn the orangutan on the led on the programmer start flashing orenge.

the orangutan came with a defult program, when I switch it on it beeps and then display on the screen “oranguta mega168!” after a second it display “push sw3” after I push sw3 I get “push sw4” and after I push sw4 I get “push sw5” and then I get “push swt” I don’t know what that means but when I short circuit the gnd and one of the ports it started to activate the motors displying on the screen the pot value and the direction of the motors.

when I connect thr programmer al the disply on the screen goes to heck and it displays nonssens.

I have waited for so long to get the orangutan and I am so frustreited!!!

I have no problem programming the baby O
thanks
Arbel

It’s a little suspicious that the LCD is going bonkers while you program, it shouldn’t be doing anything! So here’s a wild guess:

Flip the Orangutan on it’s back and look for the resistor circled in yellow:

Make sure that it’s making good contact with the pins on either side. If you measure the resistance with a multimeter (with the Orangutan turned off of course) you should see 4.7Kohm. I would try touching the pins from the front of the board to check good continuity. If the pins don’t seem to be connected well to the resistor, you might try reheating the solder on each side one at a time.

Like I said, this is just a wild guess though. I tried removing this resistor from my Orangutan but I couldn’t duplicate the problems you’re seeing. It may be an interaction between the stock code and the programmer. On a side note, did you turn down the programming frequency to below 250KHz?

-Adam

I did! I got to 100Hz and steal no good. I will check out the resistor at the back but I doubt that its the problem.
about the lcd going bonkes, there are tow ways to his bonkesnes, 1. happens when I connect the programmer and then turn the orangutan on. in that case, the first line shows peil squers. 2. I connect the programmer after I turn on the orangutan and then he writes some thing on the screen in english letters but it’s not an english word (not that I know…)

if the problem is not the resistor, any more ideas? I wrilly need the orangutan to work!!!

Is there a way to reset al the configurations in AVRStudio?

I am using the LCD-test project from orangutan lib 0.3, I thought that the configurations there will do the trick (I guess not…)

I am trying to give you all the information about what I did with the orangutan. the next thing I am going to try is to uninstall AVRStudio and then reinstall it hoping it will reset the defults and the flags to their up right possition…

Arbel

what dose that mean and can I solve it? and dose all new orangutan come with a defult program in them?
Arbel

It doesn’t sound like your problem has anything to do with AVR Studio, it sounds like the LCD is interfering with the programmer (the programmer gets upset even if AVRStudio isn’t running, right?). They share the programming lines, but that resistor between the LCD pins on the back should take care of everything, and even without it I’ve never heard of the programmer messing up characters on the LCD screen. I’m also confused about how whatever happened could have happened, since at some point your Orangutan was successfully programmed with the demo code.

All Orangutans come with stock code on them, and it really, really shouldn’t be a problem, but since we haven’t identified the actual problem it’s hard to say. Thinking more about it, it sounds like maybe the programmer is pulling the programming lines around while the code is trying to update the LCD. The only way the code could be running while the programmer is trying to work is if your Orangutan isn’t being reset properly. I can think of two possible reasons for this:

  1. Bad contact on the reset pull-up resistor:
    While you’re checking resistors, check the resistance between these two pins:

    With your multimeter’s common probe (black) on the brown-circled pin and your multimeter’s resistance probe (red) on the red circled pin you should read 10Kohm (other electronics on the board will mess up your reading if you have the probes the other way).

  2. The Reset Disable fuse was somehow programmed on your Orangutan:
    If this is the case you’ll probably need to send it back to Pololu.

-Adam

O.K I checked the resisters in both pleases. both of them were as you said they should be. 10K and 4.7K so what now??? how do I contact pololu to send them back the orangutan?
Arbel

You can e-mail or call using the information from the Contact Page to get an RMA number. Before you drop it in the mail though, you should describe your problem to whoever at Pololu you talk to, and maybe point them to this forum in case they have any other ideas.

Good luck, and sorry you’re having so much trouble!

-Adam

Hello,

I’m sorry to hear about your trouble, too. We do the programming of all units after they are fully assembled, and it sounds like that test program is running correctly, so I don’t have any good ideas beyond what nexisnet has suggested. The one last hope I have is that perhaps you modified your programming cable (e.g. to match a Baby Orangutan if you have the programming pins in it from the wrong side) and forgot about that. If you’re sure you have the programming pins matching up correctly with the programmer, you can send the unit back with RMA #38761.

- Jan

So how do I send it back, what should I write in the letter and what is the address and will I get a new one?
Arbel

You can send it to our address (on the contact page and on your invoice), and make sure you include your contact info and the RMA number. We’ll try to reproduce your problem and repair the unit or replace it.

- Jan

O.K.
I got 2 more questions,

  1. where do I find my contact info? is it the mail I got from you when you sent me the orangutan?

  2. I live in Israel, so sending the unit back will cost me about 18$, and it will take some time for the unit to get to you. Is there any way to get a compensation for the mailing cost?
    Arbel

when I think about it, you said that the orangutas are programmed after they are assembled, so why can’t I program mine? are you sure there is no other way???
Arbel

Your contact information is how we contact you: email address, phone number, shipping address, and so on.

We program (and otherwise test) everything we make as the very last step of production so that we can be confident that we ship fully functional units. Therefore, our position is that you probably broke your unit (or aren’t using it correctly–a large majority of the few items we’ve had returned had nothing wrong with them) and that we are meeting you more than half way by repairing it for free and sending it back to you for free, which we generally would not do if there were some indication of obvious misuse (e.g. “I applied 24 V to it” or “I accidentally backed over it with my car”).

If you want to try some more troubleshooting yourself, you could measure the voltages on all of the 6 programming pins and compare that to what you are getting on the Baby Orangutan. The difference between the two that is causing the programmer to reject the Orangutan should be measurable. You might try with the programmer disconnected and connected to get as many data points as possible.

- Jan

Jan and Adam

I am so stupid and stupid!!! the orangutan is just fine! I am surry, you were right and I was dumb!!! I am ashamed to say that the programmer’s cable was indeed in the wrong way!!! I diden’t try to invert it beacause: a. I’m stupid, b. I used it with the baby O as I got it from digikey and never changed the cable’s direction, so I never thought that it’s connected in the wrong way. sorry sorry sorry and thank you so much for your help and passiont.
Arbel :blush:

That’s great to hear! Although, it is strange that the cable didn’t work as you got it from Digi-Key. Can you show us a picture of your setup (including the programmer and cable plugged into the Baby Orangutan)?

- Jan

Glad you got it working, and you shouldn’t be so hard on yourself! It’s totally not your fault, especially if it came hooked up backwards.

Yet another reason I’m disappointed with the AVRISP mkII (the first one being that it didn’t work with my ATMega8 Orangutan):

For future reference, the correct header orientation is the same for both programmers, with the key down and pin1 on the bottom left (from the picture perspective). USB is fast and convenient, but I bet they could have squeezed a polarized header in there. Anyway, at least they set it up so that plugging it in backwards won’t damage the programmer or the target device.

I guess you can never assume something is assembled correctly, even when you get it straight from a large manufacturer. A few months ago my lab ordered a bunch of banana-plug to Electrifly battery connector adapters to charge lithium polymer batteries, and the wires in one of them had been inserted into the wrong sides of the polarized female connector!

It’s just not the sort of problem that jumps out at you. Fortunately we were using a smart charger with reverse polarity protection (and a nice shrill buzzer) as mistreated LiPo packs are known for being explosive!

-Adam