1
\$\begingroup\$

I am creating a wireless charger with a microcontroller on it.

I have assembled 3 boards. One of them has a microcontroller that works fine — burns bootloader and uploads code sketch fine. However, I have two other boards — the same components that do not work. The bootloader fails with the following messages:

First Board

System-wide configuration file is /home/bem22/tools/arduino-1.8.10/hardware/tools/avr/etc/avrdude.conf.
User configuration file is /home/bem22/.avrduderc.
User configuration file does not exist or is not a regular file, skipping.

     Using Port                    : /dev/ttyUSB0
     Using Programmer              : stk500v1
     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 : STK500
     Description     : Atmel STK500 Version 1.x firmware
     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.02s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.02s

avrdude: Device signature = 0x000000 (retrying)

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

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


avrdude done.  Thank you.

Second Board

         System wide configuration file is "/home/bem22/tools/arduino-1.8.10/hardware/tools/avr/etc/avrdude.conf"
         User configuration file is "/home/bem22/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/ttyUSB0
         Using Programmer              : stk500v1
         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 : STK500
         Description     : Atmel STK500 Version 1.x firmware
         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

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

avrdude: Device signature = 0xff007f
avrdude: Expected signature for ATmega328P is 1E 95 0F
         Double check chip, or use -F to override this check.

avrdude done.  Thank you.

For the later board I often gen device signature 0xffffff or 0xfff000 or 0x000fff or 0x00ff00 etc.

For board 1 and 2 I checked the connections manually (from QFN pin to Arduino ISP) using a multimeter. The voltages are ok too - the board gets normal 3v3.

The only fear to me is having burned the chips while soldering. I used 60/40 soldering wire and soldering station at 300 degrees. Is this too high? The contact time was relatively low (under 5 seconds).

Here are some pictures with my setup:

enter image description here enter image description here

And here is my schematic:

enter image description here

Any clues why?

\$\endgroup\$
13
  • 1
    \$\begingroup\$ Probably you have a soldering flaw not soldering damage. Inspect under 10x magnification. Also use your ISP programmer to "verify" that the bootloader is correctly flashed to the chip, and verify that the fuses are as intended and the same on all three. Your fuse readback through the bootloader is not meaningful, as the general failure indicates you aren't really in communication with any bootloader on the chip. \$\endgroup\$ Commented Aug 18, 2020 at 17:31
  • \$\begingroup\$ I am using the arduino bootloader flasher. Could you instruct me how to do these further checks? If you could respond in detail or link me to one relevant source I would highly appreciate. \$\endgroup\$
    – bem22
    Commented Aug 18, 2020 at 17:39
  • 1
    \$\begingroup\$ Sounds you should probably switch to loading the bootloader using the arduino as ISP sketch, and explicitly including a verify operation. This is something you can look up how to do on your own. \$\endgroup\$ Commented Aug 18, 2020 at 17:40
  • 2
    \$\begingroup\$ Ah, ok, your wording was unclear. It is not the bootloader that is failing, it is the process of flashing the bootloader. First thing to do is to inspect the soldering under magnification, also measure the current draw. Then make sure nothing is connected to DTR during the programming, then take out the resistor connecting that LED to D13 so there's no connection there at all. \$\endgroup\$ Commented Aug 18, 2020 at 18:15
  • 1
    \$\begingroup\$ Where did you get your ATmegas? If you're going to work with QFP chips (and in this day and age the course pitch QFP as ATmega uses is about the lowest tech package you should consider) then you should probably invest in a budget hot air tool (not a heat gun, a proper SMD one with temp and airflow control). Once you have one, it's a small job to do things like swap chips between your custom board and some Arduino Nano clone - if you move over a chip that was working and it stops, or you take a chip that wasn't working and it starts doing so on a different board. Also the clock source fuse \$\endgroup\$ Commented Aug 19, 2020 at 0:22

1 Answer 1

0
\$\begingroup\$

In the end, this was a soldering issue. I did not respect several precautions when designing the board.

For instance, I used vias in the already short pads and this would increase the superficial tension of the liquid solder, thus not allowing it to bind to copper.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.