Arduino Forum

Using Arduino => Avrdude, stk500, Bootloader issues => Topic started by: Parvizal on Mar 18, 2019, 08:48 pm

Title: Sketch upload problems with Arduino Pro Mini
Post by: Parvizal on Mar 18, 2019, 08:48 pm
I'm trying to build a useless box, where when a switch is flipped a lever turns it back off. The coding process is complete and I have uploaded code that works correctly. I soldered two 18650 LiPo 3.7V batteries in parallel and put them through a CN6009 voltage booster regulated to 7V. Whenever I connect the battery pack to the the arduino pro mini it seems to forget the code. I've put the positive voltage through the RAW pin which I believe has the voltage regulator and the negative through one of the grounds.

When I go to try to re-upload the code, I get this:

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Bartholomew\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf"

         Using Port                    : COM14
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0xe4
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0xe4

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

The board is correct, the port is the correct, and I've tried going through different programmers. When I measure the voltage of separate pins on the board I find that many of the pins don't have any volts except for pin 8, which I think that I've seen someone say was the error state for the arduino. If it is, how do I get it out of the error state.

In short, the arduinos function fine before being exposed to this parallel battery power source. After they are they stop functioning and I think enter an error state.

How can I get the arduinos functioning again if they're in an error state?
Why is the battery causing the arduinos to enter the error state?

Things I have tried:
Pressing the reset button and holding it through uploading
Pressing the reset button and letting go when it says uploading
pressing the reset button when it says uploading
Changing the programmer to Arduino at ISP
changing the programmer to AVRISP
Trying to upload the sketch through the programmer
Trying to burn the bootloader (got the same error)
Changing to arduino uno and trying to burn that bootloader
Uploading sketch with board as arduino uno
Uploading sketch with board as arduino nano
Changing the breakout board I'm using with another breakout board that's the same type of board
Trying to upload through a different computer

Thank you to anyone who can help in anyway
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: Parvizal on Mar 18, 2019, 09:09 pm
Update:

I went back though all pins and found on one that pin 8, TX0, RX1, and both RST pins have voltage running through them.

The other board all pins work except for the analog pins (A0-A5)
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: pert on Mar 19, 2019, 03:49 am
Please do this:
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: flagtrax on Mar 19, 2019, 04:15 am
Quote
I soldered two 18650 LiPo 3.7V batteries in parallel
If you put 2 batteries in parallel you get 3.7 volts. If you put 2 3.7v batteries in SERIES you get 7.4 volts.
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: Parvizal on Mar 19, 2019, 06:05 pm
Code: [Select]
Arduino: 1.8.6 (Windows 10), Board: "Arduino Pro or Pro Mini, ATmega328P (5V, 16 MHz)"

Sketch uses 4556 bytes (14%) of program storage space. Maximum is 30720 bytes.
Global variables use 74 bytes (3%) of dynamic memory, leaving 1974 bytes for local variables. Maximum is 2048 bytes.
C:\Users\Bartholomew\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/bin/avrdude -CC:\Users\Bartholomew\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf -v -patmega328p -carduino -PCOM14 -b57600 -D -Uflash:w:C:\Users\BARTHO~1\AppData\Local\Temp\arduino_build_486553/useless_box_behavior_module.ino.hex:i

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Bartholomew\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf"

         Using Port                    : COM14
         Using Programmer              : arduino
         Overriding Baud Rate          : 57600
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 1 of 10: not in sync: resp=0x6a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x6a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x6a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x6a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x6a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x6a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x6a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x6a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x6a
avrdude: stk500_recv(): programmer is not responding
avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x6a

avrdude done.  Thank you.

Problem uploading to board.  See http://www.arduino.cc/en/Guide/Troubleshooting#upload for suggestions.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


This is the error that I get whenever I try to upload a sketch directly from the FTDI Basic breakout board.

I was reading elsewhere and it looked like perhaps what the problem is is that I am missing the bootloader for the pro mini. I am using a Mega 2560 which has the ARduinoISP sketch uploaded to it  with Arduino as ISP as the programmer. I have added a 10 uF capacitor connecting ground and reset.
The pins that I connected are as follows:

Mega---------Promini
GND --------- GND
10    --------- RST
52    --------- 13
50    ---------  12
51    --------- 11
5V ---------- VCC

I then reconnect the Mega, change the board to "Arduino mini or Pro Mini", keep the COM the same, and select burn bootloader. This is the error I get:
Code: [Select]
Arduino: 1.8.6 (Windows 10), Board: "Arduino Pro or Pro Mini, ATmega328P (5V, 16 MHz)"

C:\Users\Bartholomew\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/bin/avrdude -CC:\Users\Bartholomew\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf -v -patmega328p -carduino -PCOM19 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF:m

avrdude: Version 6.3-20171130
         Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
         Copyright (c) 2007-2014 Joerg Wunsch

         System wide configuration file is "C:\Users\Bartholomew\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino14/etc/avrdude.conf"

         Using Port                    : COM19
         Using Programmer              : arduino
         Overriding Baud Rate          : 19200
         AVR Part                      : ATmega328P
         Chip Erase delay              : 9000 us
         PAGEL                         : PD7
         BS2                           : PC2
         RESET disposition             : dedicated
         RETRY pulse                   : SCK
         serial program mode           : yes
         parallel program mode         : yes
         Timeout                       : 200
         StabDelay                     : 100
         CmdexeDelay                   : 25
         SyncLoops                     : 32
         ByteDelay                     : 0
         PollIndex                     : 3
         PollValue                     : 0x53
         Memory Detail                 :

                                  Block Poll               Page                       Polled
           Memory Type Mode Delay Size  Indx Paged  Size   Size #Pages MinW  MaxW   ReadBack
           ----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
           eeprom        65    20     4    0 no       1024    4      0  3600  3600 0xff 0xff
           flash         65     6   128    0 yes     32768  128    256  4500  4500 0xff 0xff
           lfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           hfuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           efuse          0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           lock           0     0     0    0 no          1    0      0  4500  4500 0x00 0x00
           calibration    0     0     0    0 no          1    0      0     0     0 0x00 0x00
           signature      0     0     0    0 no          3    0      0     0     0 0x00 0x00

         Programmer Type : Arduino
         Description     : Arduino
         Hardware Version: 2
         Firmware Version: 1.18
         Topcard         : Unknown
         Vtarget         : 0.0 V
         Varef           : 0.0 V
         Oscillator      : Off
         SCK period      : 0.1 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0xffffff (probably .avr8x_mega) (retrying)

Error while burning bootloader.
Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0xffffff (probably .avr8x_mega)
avrdude: Yikes!  Invalid device signature.
         Double check connections and try again, or use -F to override
         this check.


avrdude done.  Thank you.

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.


Also to note, the pro mini gets very hot when it is plugged in.
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: Parvizal on Mar 19, 2019, 06:11 pm
If you put 2 batteries in parallel you get 3.7 volts. If you put 2 3.7v batteries in SERIES you get 7.4 volts.
I understand that, I was trying to get more maH while still keeping the project small, hence the boost converter. I have actually tried this project with the batteries in series and it worked fine but I wouldn't be able to charge the batteries with a TP4056 charging module as easily, which is why I had the batteries in parallel.
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: flagtrax on Mar 19, 2019, 08:46 pm

Quote
Arduino: 1.8.6 (Windows 10), Board: "Arduino Pro or Pro Mini, ATmega328P (5V, 16 MHz)"
From this I take it you are using a 5V version pro-mini, and you're powering it with 3.7V?
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: Parvizal on Mar 19, 2019, 09:18 pm
From this I take it you are using a 5V version pro-mini, and you're powering it with 3.7V?
Yes, but I have put it through a voltage boost converter that boost the voltage to 5V.
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: flagtrax on Mar 19, 2019, 09:25 pm
Ah, if you mentioned that I missed it. I'm think of Ohm's Law (P=IE) and wondering if you're loosing current capabilities in the boosting process. (I don't know much about the operation of the boost converters out there. If you're sure your 5V input is stable then I'll mention that I've always had frustration programming pro-mini's. With an FTDI I have to "catch" a point to manually reset to start an upload.
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: Parvizal on Mar 19, 2019, 10:40 pm
Yes but they were working completely fine before I connected them to the battery, I never needed to deal with the manual reset button timing.
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: flagtrax on Mar 20, 2019, 02:57 am
Just for clarification, the pro-mini's I'm currently using (both 3.3v and 5v) are clones. The pinout is somewhat different than the official pro-mini's and perhaps the reason I have to do the reset manually. I never pursued it much once I figured out how to upload with minimal hassle. I have had issues trying to upload some sketches relating to a tft w/spi interface which won't load and give compiler errors, while the same sketches will load fine on an Uno and Nano. I haven't had time to pursue that yet.
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: BJHenry on Mar 20, 2019, 03:14 am
Also to note, the pro mini gets very hot when it is plugged in.
Does the Pro Mini get very hot if you only have GND and VCC connected to the Mega?
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: Parvizal on Mar 20, 2019, 05:19 pm
Does the Pro Mini get very hot if you only have GND and VCC connected to the Mega?
The pro mini gets hot on the ATMEGA chip, but not as hot as it was yesterday with the other wires attached. When I hooked them to the FTDI Basic then the ATMEGA chip gets very hot, along with one of the boxes labeled AA7. The LED next to the reset button is always on, and pressing the reset button doesn't cause it to flicker or blink. Does this mean that the pro mini is fried or is there still hope?

I have another unresponsive pro mini as well that isn't getting hot and the reset button led blinks once when the button is released.
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: flagtrax on Mar 20, 2019, 05:55 pm
I can say that I've never seen the chip on a pro-mini get hot. Somewhat warm yes, hot no. Please keep in mind that there are many variations of the pro-mini out there. Each could have differing pin outs. Could the chip be fried? Possibly yes; if improperly wired. Insofar as led's are concerned, they can be as varied as the pro-mini's themselves. some only have a "power on" led, while others have "on-board"(pin13) leds which may or may not blink when uploading. All that depends on the pro-mini you're using. Shamefully (or not) I must admit I've only used cheap clones of pro-minis, and do see differences. The point being If you've verified your wiring, and are properly wiring the module, it shouldn't get hot. Remember too if you are using an FTDI for sketch transfer, (I'm unclear as to how you are set up) it too will power the module. Mine for example has a jumper that allows either 5v, 3.3v. or by leaving it off 0v.
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: Parvizal on Mar 20, 2019, 07:11 pm
I can say that I've never seen the chip on a pro-mini get hot. Somewhat warm yes, hot no. Please keep in mind that there are many variations of the pro-mini out there. Each could have differing pin outs. Could the chip be fried? Possibly yes; if improperly wired. Insofar as led's are concerned, they can be as varied as the pro-mini's themselves. some only have a "power on" led, while others have "on-board"(pin13) leds which may or may not blink when uploading. All that depends on the pro-mini you're using. Shamefully (or not) I must admit I've only used cheap clones of pro-minis, and do see differences. The point being If you've verified your wiring, and are properly wiring the module, it shouldn't get hot. Remember too if you are using an FTDI for sketch transfer, (I'm unclear as to how you are set up) it too will power the module. Mine for example has a jumper that allows either 5v, 3.3v. or by leaving it off 0v.

This is my setup: the pro mini is attached to a sparkfun FTDI Basic breakout board that I've modified to supply 5V of power. I am unsure if this is a clone or a deviation of the pro mini, but the other mini's I have which are from the same supplier do not have both lights on constantly, especially at the brightness these LEDs are at, I would say the reset LED is twice as bright as what it would be on a normal board.
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: flagtrax on Mar 20, 2019, 08:36 pm
I don't have a "official" pro-mini as I said, but I have a pinout drawing, and yours is different. In addition to that , your FTDI connections (as I see it in the photo) don't seem to be as they should be.


                                         FTDI       PRO-MINI
                                         
It looks to me like you have DTR TO   TX0         DTR should go to DTR
                                         RXI         RXI         RXI should go to TX0
                                         TX0         VCC       Here you're putting Vcc on the transmit lead
                                     Vcc(3.3v)     GRD       This would be a short
                                          CTS        GRD

I May be mistaken by the angle of your photo, but that's what it looks like. if it is angle view I'd look at those connections carefully. If you look at the photo I attached, you should see:

                                       FTDI             PRO-MINI

                                       DTR              DTR
                                       RX                TX0
                                       TX0               RX
                                       VCC               VCC
                                       CTS                GRD
                                       GRD               GRD

I'll attach a photo of the Official Pro mini pinout.
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: BJHenry on Mar 21, 2019, 01:54 am
That pin alignment looks fine. Given the symptoms you've described I think your board is cactus- the simple fact of the matter is that with nothing else plugged in the microcontroller itself shouldn't get hot.
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: Parvizal on Mar 22, 2019, 04:27 pm
Okay, that's a shame I was hoping that I could get it back. Thanks for everyone's help though!
Title: Re: Sketch upload problems with Arduino Pro Mini
Post by: BJHenry on Mar 23, 2019, 12:40 am
You're welcome. At least they're not too expensive!