Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

HELP with Save the program


#1

Good afternoon,

Somebody help me with this question?
My friend give me the 3PI´s him because he can´t save the program in the 3PI. When he was programming the 3PI, the batteries him losing power and, I believe, that he could be disable the 3PI.
What he´s doing??
There are something to do??

Thank you for attention!

Andre Luis


3PI refuses to program
#2

Are you using freshly charged batteries? Can you measure the battery voltage (for example by connecting multimeter to the charge port)?


#3

Hi Paul,

No, When my friend give me the 3PI, I put new batteries and nothing…
That really, the computer don´t identify the 3PI…
At display show me only blocks and the buttoms don´t answer.
If the batteries losing power the 3PI disable permanently?? It´s really??
What doing now??

Thank for the attetion…

Andre Luis


#4

The first step of programming is to erase the previous program, so if it lost power after that, it might not have a program on it. Or he could have programmed it with a non-working program.

I don’t understand what your problem is now. Have you actually tried programming it, and if so, how? Are you using the Pololu programmer? What do you mean exactly when you say “the computer don´t identify the 3PI”? If you could say exactly what you tried, and copy the exact error message or post a screenshot, that would be helpful.


#5

Hi Paul,
I think that I don´t explained correct for you.
I tried programm it, but the “Oragutan USB programmer” don´t respond and I can´t programm it.
My friend was recording it when the bateries losing power. So, he can´t do 3PI respond for the compilations and recording.
I tried use my “Orangutan USB programmer”, but I can´t programm it, too. And my “Orangutan USB programmer” is great.
So, I think that the 3pi recorder some half programm and after losing power.
There are something that I do for clean the memory to 3PI and after record the new programm?

Thank you for attention!

Andre Luis

Obs: Sorry, but my english is not very good :slight_smile:


#6

Hi Andre,

How do you know your programmer is working? Can you program another 3pi with it? Can you program another 3pi with your friend’s programmer?

What is the exact error message? Can you post a screenshot?

-Paul


#7

Hi Paul!

You´ll don´t believe! I can make working the programmer´s friend. Now, my computer can recognize it. But I don´t save the programs in the 3PI, yet.

I post the error massage when I tried program the 3PI´s friend.

Thank you for attention!

Andre Luis
Error_3PI.rar (53.2 KB)


#8

Hi Paul,
I don´t save programs in the 3PI yet. I don´t know that do for save programs it.
The error that I post show me every time that I go load program in the 3PI.
What to do?

Thanks for attention!
And sorry for my english…

Andre Luis


#9

Hi Andre,

It sounds like both programmers are working and the problem is with the 3pi. It is possible that one of the fuse bits on the AVR was changed when it was programmed with low batteries, causing the AVR to run at a lower frequency. Can you try lowering the programming frequency (in the Main) section to the lowest possible value to see if you can get it to program? Then, if that works, can you click on the Fuses tab and tell me what all of the fuse settings are? Another screenshot would be fine.

-Paul


#10

Hi Paul,

I make that you tell me but don´t work yet. I´m post again other tabs while I tried programm it.
I put the lowest possible value of frequency: 603Hz, but when I go save it said:

“ISP frequency must be 5kHz or above when programming EEPROM or FLASH!”

So I tried with 4kHz and nothing of work too. See the posts that I put.

Obs.: Sorry if the posts are bigger :slight_smile:

Thank you for attention!

Andre Luis
Error_page ADVANCED.rar (43.8 KB)
Error_page FUSES.rar (52.7 KB)
Error_with 4kHz.rar (47.8 KB)


#11

Dear Paul,

I have the same problem. I received yesterday my new Pololu 3pi and I tried to save some programs. The program test let me knew how much voltage had the batteries when I tried to save the program . The voltage was around 3.4 volts. First time I programmed the 3pi works fine but later the programming process was interrupted.

Now, when I switch on the 3pi the displays shows only black boxes and blue leds are on.

I readed the label in the box that said “Losing power during programming could permanently disable your 3pi”.

Will be possible to recover the Pololu 3pi replacing the ATMEL Mega 168 processor ?

Thanks in advance,

Jose Carpio.


#12

Hello.

If your battery voltage was 3.4V, it means your batteries were almost dead; you definitely should not be trying to program your 3pi with batteries this low.

Can you try setting your programmer to a lower ISP frequency and see if this lets you read the device signature?

- Ben


#13

[quote=“Andre Luis”]So I tried with 4kHz and nothing of work too. See the posts that I put.

Obs.: Sorry if the posts are bigger :slight_smile:

Thank you for attention!

Andre Luis[/quote]

Hello Andre,

I apologized for the delayed reply. It sounds like your 3pi has a corrupted microcontroller. The only thing I can suggest is that you send the 3pi back to us so that we can take a look at it. Please mail it to our address as listed here and include your name (Andre Luis), a reference to this thread and a return address to which you want the robot shipped.

- Ben


#14

Dear Ben,

I am teaching a Robotics AI subject at the University of Huelva in Spain. I need a way to solve this problem if I want to use the 3pi robots for teaching. I searched for a way to reset the Atmel Mega but I did’nt find a solution at this momment. My students have to program the robots several times for class and sometimes is not easy to know how lower is battery power. I think this problem will happend again.

Will be enough to change the Atmel Mega 168 processor or I need to make other changes?

Thanks in advance,

Jose Carpio.


#15

If attempting to program the unpowered microcontroller is what caused your problem, and it sounds like it is, replacing it will fix it (this is the only solution we know of once the chip becomes unprogrammable). Do you have the tools/experience to replace the ATmega168 yourself? If not, you can send it back to us to take a look at; just make sure we can identify who its from and where to return it. Before trying to replace it, I recommend seeing if you can talk to the 3pi at a lower ISP frequency. If so, you can fix the problem by resetting the fuses with a programmer running at this lower frequency.

It shouldn’t be too difficult to keep this from happening to your students. All of our sample programs display the battery voltage at start-up, and you should encourage your students to add this feature to their programs as well. You can obtain the battery voltage in millivolts by using the read_battery_millivolts_3pi() function from the Pololu AVR library, and you can display the value it returns on the LCD using the print_long() function. If the battery voltage falls below 4.5V for NiMH cells, we strongly recommend you replace them with freshly charged batteries before you program! You could even program the 3pis to emit an annoying string of beeps once the battery voltage is too low.

- Ben


#16

By the way, you might want to take a look at the following post by Jim Remington:

At the bottom of the opening post, you can see a plot of battery voltage versus time for an idle 3pi. Note how precipitously the voltage drops off once it falls below 4.5V.

- Ben


#17

Hi Ben,

Thank you for attention!
I go talking with my friend, because, like I said, it´s his 3PI with problem.

By the way, I am a little distant. I am from Brazil. So I think that will be late.

So thank you for dedication and attention! :smiley:

Andre Luis


#18

Hi Ben,

Thank you vey much for your answer.

I am waiting for the Atmel Mega 168 processors with the same package you used in Pololu 3pi. I would like to replace by myself in order to have a way to repair the robot in case that problem will happends again. Any case, if I decide to send you the 3pi I will write you before.

Yours sincerelly,

Jose Carpio.


#19

If you do replace it yourself, you will need to program the fuses so that it’s using the correct clock source. If you have a functional 3pi handy, you can read the fuse values off of it to see what they should be initialized to on your repaired robot. If not, please let me know and I’ll post what the fuse bytes should be. I also recommend you initially program the repaired 3pi with the 3pi demo program hex file:

libpololu-avr\examples\atmega168\hex_files\3pi-demo-program.hex

and use this to test whether the solder connections to between the PCB and your MCU are good.

- Ben


#20

Hi Ben,

Thank you very much again. That information is very usefull for me.

When I will receive the Atmel processor I will write to you in order to know the correct fuse values. Can you recommend me some company where I can buy exactly the same Atmel Mega 168 processor that is used in Pololu 3pi?

Yours sincerelly,

Jose Carpio.