Custom test PCB nightmare

So i wanted to use arduino uno in a custom pcb (well two of them combined but running separately) to match the space i have for pcb installation so at first i decided to do just 1 arduino uno like pcb to see how it goes and changed the chip from atmega328p-pu to -AU version to save some space.

i sent the board for printing and assembly, received it and i could not burn bootloader! i followed every single tutorial on youtube, this forum and etc. until finally it went in. now i connect usb to the pcb and i have no communication and cannot upload sketches so i thought i would share my basic schematic and maybe someone can tell me what i did wrong.

I think that you're missing about every decoupling capacitor around the 328P. From the schematic, there is one (C6) and it might not even be close to the 328P.

Is your board recognised? If yes, have you tried the loopback test. If that succeeded, what is the error message when you try to upload via USB.

Your topic has been moved to a more suitable location on the forum. Installation and Troubleshooting is not for problems with (nor for advice on) your project :wink: See About the Installation & Troubleshooting category.

I did the loopback test and looks like its fine as the text i entered came back into serial monitor so thats a plus i guess :slight_smile:

However still not able to upload any sketchs to this chip and im hoping someone can help me find a way.
About decoupling capacitors you mentioned could you explain where and what size i need to add ? (or if you can be kind and mark the places in mspaint it would be awesome help)

Board info comes back with these details also:

BN: Unknown board
VID: 0403
PID: 6001
SN: Upload any sketch to obtain it

Arduino: 1.8.19 (Windows 10), Board: "Arduino Nano, ATmega328P"

Sketch uses 860 bytes (2%) of program storage space. Maximum is 30720 bytes.

Global variables use 15 bytes (0%) of dynamic memory, leaving 2033 bytes for local variables. Maximum is 2048 bytes.

C:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM23 -b115200 -D -Uflash:w:C:\Users\CASSY~1\AppData\Local\Temp\arduino_build_998008/BlinkWithoutDelay.ino.hex:i 



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 "C:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"



         Using Port                    : COM23

         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=0x81

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 2 of 10: not in sync: resp=0x81

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 3 of 10: not in sync: resp=0x81

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 4 of 10: not in sync: resp=0x81

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 5 of 10: not in sync: resp=0x81

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 6 of 10: not in sync: resp=0x81

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 7 of 10: not in sync: resp=0x81

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 8 of 10: not in sync: resp=0x81

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 9 of 10: not in sync: resp=0x81

avrdude: stk500_recv(): programmer is not responding

avrdude: stk500_getsync() attempt 10 of 10: not in sync: resp=0x81



avrdude done.  Thank you.



Problem uploading to board.  See https://support.arduino.cc/hc/en-us/sections/360003198300 for suggestions.



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

Usually 100n, and between every VCC pin and GND.

It won't help in the schematic. It's about placement of them on the physical PCB. They should be as close to the VCC and GND pins as possible.

Maybe upload your board layout?

between every single vcc and gnd pin ? wow there will be many if i combine two boards into one pcb :face_with_peeking_eye:

i tried to be as close to an arduino uno as possible in terms of parts but didnt pay attention to placement that much (well just enough so everything can be connected and no short circuits)

Placing the crystal that far from the controller is a big no no !

It should be physically next to the controller’s crystal pins with no traces between the crystal leads.


Placing a GND on the reset pin is a Huge NO NO ! !

HUGE ! ! !

:scream:

The is no way your board will work when the controller is being constantly held in the reset state with the GND permanently on the reset pin !


The weaving of your traces top to bottom is not acceptable in PCB design !


There could well be quite a few. With the AU package of the 328P, you would place a decoupling capacitor close to pins 3 & 4, and another close to pins 5 & 6. Also one close to pins 20 & 21.

Check the datasheet for the FT232 to see if both VCC & VCCIO should have decoupling capacitors. Your schematic appears to show C7 as a decoupling capacitor but your board layout shows it some distance from U4 (your USB-Serial device).

Your crystal (X1) and the 2 associated capacitors (C1 & C2) should be close to pins 7 & 8 of your 328P.

All your PCB tracks seem to be the same width. The VCC signal is usually routed with a thicker track. You may also want to look up a ground plane and use that for your GND signal.

Not even close .

Have you ever looked at a motherboard? Or your Arduino? Usually one per chip, or one per power-pin. When an op-amp has plus & minus supplies there is one for the plus and one for the minus. They are small (especially with a surface mount board) and cheap. So no big deal as long as you don't forget to included them in your PCB design. :wink: In reality you usually don't need all of them. It's more like "insurance". I've seen perfectly-working boards with a missing bypass cap.

I assume you've burned a bootloader before and you're sure your setup is OK?

If the bypass caps don't fix it, check all of the connections point-to-point and check for shorts with your Ohmmeter to make sure the board matches the schematic. It helps if your meter has a continuity beeper. It also helps if you have someone helping you. One person with the meter on the board and the other calling-out the schematic connections and highlighting them as they are confirmed.

Shorts are a little trickier but the beeper helps because you can hold one probe and "scan" the other one around the board.

Bad vias or microscopic breaks in traces are not that uncommon. There could be a defect in the fabrication or in the layout, or in the circuit design.

I assume you have extra boards so it might be a good idea to build one with just the Arduino parts to see if you can program it.

...I'm not a PCB designer but I've worked in electronics for a long time and I don't remember ever seeing a board come-out perfect the 1st try. I've got a board in front of me right now and it's at Rev 2. (1) That's at-least the 3rd version because the prototype starts-out at Rev X0 and sometimes there is more than one "X" version before it goes into production at Rev 1. (I think we have some X1 boards in production because there were no more changes needed.)

A million years ago when I was in college I made some boards from hand-made artwork. I don't remember if they were "perfect" but they were usable.

Just recently, I did my 1st computer-designed board (with Desigh Spark). It's a very-simple simple little solid state relay board but unfortunately it had a couple of mistakes and I had to go through a revision cycle. I tried to check it carefully and I was thinking and hoping it would be perfect but from what I'd seen at work over the years I was mentally and emotionally prepared for the disappointment and the wasted time & money. The 2nd version is OK.

(1) Sometimes the design isn't bad, but there is a design improvement or the board has to be changed because a part is no longer available, etc. And this particular board has been in production for many years. (The firmware is at Rev 12.)

P.S.
Did you build more than one board? There is a possibility of a bad chip, or maybe it was damaged by ESD. That's unlikely if more than one board are acting the same. Or maybe you over-voltaged it. (I assume you' checked the 5V.)

There is a great possibility the board is being held in the reset state with the permanent GND on the controller’s reset pin :face_with_spiral_eyes:

1 Like

Cut the red trace going upward from Pin 29.

1 Like

thank you all for your inputs, to be fair this is my first ever attempt in designing and playing around with pcb design so im very new but want to learn, learning from you guys who have experience is great and i will learn from my mistakes every step :slight_smile:

I will start by finding a way to remove that GND track that was mentioned by @LarryD
try again and then see if i can desolder capacitors and move them closer to the chip (spaghetti design) if that didnt work then perhaps back to designing board and start from scratch and dont make the mistakes that i made

PCB Design Rules

Design rule number #1.

  • Always add mounting holes to your PCB.

See reply #13.

1 Like

Thank you @LarryD & @johnwasser for pointing out the reset pin issue.

By cutting that trace i was able to successfully burn bootloader and upload a sketch, however "Get Board Info" option still comes back with the same result although i did upload a sketch thats working fine.

BN: Unknown board
VID: 0403
PID: 6001
SN: Upload any sketch to obtain it

and another weird thing (which may not be weird and its just correct is the Oscillator value in the log that shows 28.800 kHz ?!, i have a 16mhz osi installed)

Log of bootloader:

C:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM13 -b19200 -e -Ulock:w:0x3F:m -Uefuse:w:0xFD:m -Uhfuse:w:0xDA:m -Ulfuse:w:0xFF: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 "C:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM13
         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 = 0x1e950f (probably m328p)
avrdude: erasing chip
avrdude: reading input file "0x3F"
avrdude: writing lock (1 bytes):

C:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -cstk500v1 -PCOM13 -b19200 -Uflash:w:C:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5/bootloaders/optiboot/optiboot_atmega328.hex:i -Ulock:w:0x0F:m 
Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3F:
avrdude: load data lock data from input file 0x3F:
avrdude: input file 0x3F contains 1 bytes
avrdude: reading on-chip lock data:

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

avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0xFD"
avrdude: writing efuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0xFD:
avrdude: load data efuse data from input file 0xFD:
avrdude: input file 0xFD contains 1 bytes
avrdude: reading on-chip efuse data:

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

avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: reading input file "0xDA"
avrdude: writing hfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xDA:
avrdude: load data hfuse data from input file 0xDA:
avrdude: input file 0xDA contains 1 bytes
avrdude: reading on-chip hfuse data:

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

avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xFF"
avrdude: writing lfuse (1 bytes):

Writing | ################################################## | 100% 0.01s

avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xFF:
avrdude: load data lfuse data from input file 0xFF:
avrdude: input file 0xFF contains 1 bytes
avrdude: reading on-chip lfuse data:

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

avrdude: verifying ...
avrdude: 1 bytes of lfuse verified

avrdude done.  Thank you.


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 "C:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM13
         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 = 0x1e950f (probably m328p)
avrdude: NOTE: "flash" memory has been specified, an erase cycle will be performed
         To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file "C:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5/bootloaders/optiboot/optiboot_atmega328.hex"
avrdude: writing flash (32768 bytes):

Writing | ################################################## | 100% -0.00s

avrdude: 32768 bytes of flash written
avrdude: verifying flash memory against C:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5/bootloaders/optiboot/optiboot_atmega328.hex:
avrdude: load data flash data from input file C:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5/bootloaders/optiboot/optiboot_atmega328.hex:
avrdude: input file C:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.8.5/bootloaders/optiboot/optiboot_atmega328.hex contains 32768 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% -0.00s

avrdude: verifying ...
avrdude: 32768 bytes of flash verified
avrdude: reading input file "0x0F"
avrdude: writing lock (1 bytes):

Writing | ################################################## | 100% 0.02s

avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x0F:
avrdude: load data lock data from input file 0x0F:
avrdude: input file 0x0F contains 1 bytes
avrdude: reading on-chip lock data:

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

avrdude: verifying ...
avrdude: 1 bytes of lock verified

avrdude done.  Thank you.

Log of first upload:

Sketch uses 860 bytes (2%) of program storage space. Maximum is 30720 bytes.
Global variables use 15 bytes (0%) of dynamic memory, leaving 2033 bytes for local variables. Maximum is 2048 bytes.
C:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/bin/avrdude -CC:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf -v -patmega328p -carduino -PCOM23 -b115200 -D -Uflash:w:C:\Users\CASSY~1\AppData\Local\Temp\arduino_build_500717/BlinkWithoutDelay.ino.hex:i 

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 "C:\Users\Caster09\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino17/etc/avrdude.conf"

         Using Port                    : COM23
         Using Programmer              : arduino
         Overriding Baud Rate          : 115200
         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: 3
         Firmware Version: 4.4
         Vtarget         : 0.3 V
         Varef           : 0.3 V
         Oscillator      : 28.800 kHz
         SCK period      : 3.3 us

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.00s

avrdude: Device signature = 0x1e950f (probably m328p)
avrdude: reading input file "C:\Users\CASSY~1\AppData\Local\Temp\arduino_build_500717/BlinkWithoutDelay.ino.hex"
avrdude: writing flash (860 bytes):

Writing | ################################################## | 100% 0.34s

avrdude: 860 bytes of flash written
avrdude: verifying flash memory against C:\Users\CASSY~1\AppData\Local\Temp\arduino_build_500717/BlinkWithoutDelay.ino.hex:
avrdude: load data flash data from input file C:\Users\CASSY~1\AppData\Local\Temp\arduino_build_500717/BlinkWithoutDelay.ino.hex:
avrdude: input file C:\Users\CASSY~1\AppData\Local\Temp\arduino_build_500717/BlinkWithoutDelay.ino.hex contains 860 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 0.30s

avrdude: verifying ...
avrdude: 860 bytes of flash verified

avrdude done.  Thank you.

In your opening post you stated that you eventually managed to get the boot loader into the chip (with the reset connected to GND) :smiley:

That's normal for boards that don't use a microcontroller for the TTL-to-USB conversion. E.g. classic Nanos will only give VID and PID and not a board name; same for e.g. clone Uno/Mega with CH340.

When using the ICSP header for burning a bootloader, part of the process is to hold the Reset signal LOW.

@sterretje at first i directly tried to upload a sketch and it gave me an error i guess something was wrong with the way bootloader was burned ? i had to do the connections again burn bootloader again and then i was able to upload a sketch.

im using FT232RL-REEL chip, is there a way we can name this device ? or that will be all complicated stuff ?