Atmega328p Burning Bootloader

Hi there,

I am trying to make a small handheld project that runs off a coin cell. The project has a Atmega328p TQFP chip and a few LEDs. My prototype ran on a DIP micro controller and that worked fine, I then made this into a PCB with a TQFP chip and could burn the bootloader but I couldn’t upload a sketch. I had some help from this forum so I made a few changes, better placed capacitors etc and then also stripped out some of the components that weren’t required, like switches for example.

That brings me to what I have now, a small PCB with a 328p. I tried to mirror the Arduino pro-mini schematic to achieve success. Unfortunately I am unable to even burn the bootloader now and when I try I get the following error message.

Arduino: 1.8.10 (Mac OS X), Board: "ATmega328, Yes (UART0), 328P / 328PA, BOD 1.8V, LTO disabled, 8 MHz external"

/private/var/folders/94/f3hz7ssd1z57fv4jg6cnhy480000gn/T/AppTranslocation/0163EAFF-00C6-4CEB-AB72-2F159EAEFCE8/d/Arduino-2.app/Contents/Java/hardware/tools/avr/bin/avrdude -C/Users/jamesX/Library/Arduino15/packages/MiniCore/hardware/avr/2.0.3/avrdude.conf -v -patmega328p -cstk500v1 -P/dev/cu.wchusbserialfa140 -b19200 -e -Ulock:w:0x3f:m -Uefuse:w:0b11111110:m -Uhfuse:w:0xd6:m -Ulfuse:w:0b11110111:m 

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

         System wide configuration file is "/Users/jamesX/Library/Arduino15/packages/MiniCore/hardware/avr/2.0.3/avrdude.conf"
         User configuration file is "/Users/jamesX/.avrduderc"
         User configuration file does not exist or is not a regular file, skipping

         Using Port                    : /dev/cu.wchusbserialfa140
         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.08s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.08s

avrdude: Device signature = 0x000000 (retrying)

Reading | ################################################## | 100% 0.08s

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.

Error while burning bootloader.

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

Im burning the bootloader with an Arduino Nano with a capacitor over the reset pin. I can successfully burn the bootloader to my old PCB so I am confident the method works.

I have read the advice from here, I tried powering the board from 3.3v (this worked fine for the last PCB) and 4.6v and neither are successful.

Because my last PCB could burn a bootloader but this one can’t I am fairly sure the issue lies within the changes I made to the board. I have also attached the last schematic of the original PCB. This one could accept a bootloader but wouldn’t upload the sketch, so it was not perfect obviously.

Circuit diagram attached, I don’t think the LEDs connected to PBW3/4/5 are causing an issue because in my last PCB I had the same layout and that was able to have the bootloader burned.

Also attached is a photo of the PCB for reference.

I started testing things like common ground and if the headers were connected to the right pins using a very simple LED open circuit and 2 wires and couldn’t find anything strange. I did notice that it seems Vcc is short-circuited to Gnd but my DIP behaves the same way.

Any help would be greatly appreciated.

Schematic_Audible Alti V2 Stripped Down_Sheet_1 Stripped down_20191121164930.pdf (50.7 KB)

Schematic_Audible AltiNew XTAL V2_Sheet_1 copy copy_20191028213332.pdf (81.6 KB)

Please don't post your schematic as a PDF. It makes it less easy to access. Here is a good guide to putting images into your post.
You're missing the 100nF decoupling capacitor on each of the VCC/AVCC pins.
I don't see any connectors on the PCB itself, how are you connecting your programmer? Have you double-checked the connections? Assuming that the board is powered correctly, getting a device signature of 0 is usually caused by incorrect programmers connections or problems with the clock source.

Thanks for the reply, the decoupling capacitor is on the schematic. I only added 1 as only one of the Vcc pins will be used at a time. Would it still need 2 in that case and is it important that they are located close to the actual header?

On the reverse side are breakout pads for all the connections. Currently I have some female headers soldered on for testing.

jaddion82052:
Thanks for the reply, the decoupling capacitor is on the schematic. I only added 1 as only one of the Vcc pins will be used at a time. Would it still need 2 in that case and is it important that they are located close to the actual header?

It is important to connect all of the VCC/AVCC pins, don't leave any of them disconnected. The decoupling capacitors would be find on the other side of the PCB as long as they are electrically close to the micro, ie the tracks between the capacitor and the power pin aren't too long.

Just something to try.

Your Reset lead for SPI programming should go directly to pin 29 of the 328P and NOT through the C6 100nF capacitor like your schematic shows.