Please help with my custom ATMega328 PCB

Hi! I created a PCB for my newest Arduino project and its driving me mad by now. I am through several PCB variations and tried connecting to it (via FTDI first - then) via ISP but I fail every time and in each revision.

Tested all the pads/pins for a short - everything seems ok. On each board I soldered only the barebone components (2x 22pF, 1x100nF caps, 10k resistor, XTAL) to test it. I can often see tiny sparks between the pins when I trying to flash the chip - but I cant find any shots.

I am trying connecting my PCB through ISP with another arduino (ISP sketch on it / + #define old wiring).

I am pretty sure that C2 is not needed - but it also does not work without it.

I am very open to any ideas how to get this done because it is getting very expensive :). Build about 10 different boards now and can’t find the issue.

Uploaded the latest schematic and some PCB pics.

R3-R6 are too low, try 220 Ω

Sparks, this is very bad!
??? “I can often see tiny sparks between the pins when I trying to flash the chip ” ???

Why are you using D5?
Assume you did a DRC check on the board.

C6 C7 are to small, use 1 µf.

Each 5 volt pin on the controller should have a .1 µf decoupling capacitor.

Is RAW DC or pulsating DC?

Thanks, DRC check was fine.

R3-R6, D5 has nothing to do with the problem.
C6/C7 (my fault) has a wrong value in the shematic - but it also has nothing to do with the problem.
I have only the xtal/caps/resistor soldered that belong to the ATMEGA barebone schematic

Each 5 volt pin on the controller should have a .1 µf decoupling capacitor.

Is RAW, DC or pulsating DC?

Why are you using D5?

Each 5 volt pin on the controller should have a .1 µf decoupling capacitor.

Hm, never saw that in any sample schematic for a custom arduino pcb and they seem to work

Is RAW DC or pulsating DC?

DC (battery)

Why are you using D5?

D5 ist there to protect the voltage regulator while connecting through FTDI/ISP

I suggest you replace D5 with a removable jumper.

If you never need to power this board from the the IDSP and FTDI cut off their pins.
In the next version, add removable jumpers on their 5V pins.

Confirm C3 & C4 are indeed 22pf.

You need C2 installed to get the DTR working with FTDI cabling.

See J1 and J2 for typical FTDI and ICSP headers.

Confirm C3 & C4 are indeed 22pf.

Yes they are - even tried 18pf mentioned in the XTAL datasheet - no luck

You need C2 installed to get the FTDI to function.

yes, but not for ISCP, right? - ISCP is how I am trying to connect

Still don't get where the tiny sparks are coming from - everything looks fine to me

DTR not needed with ISCP.
I am not familiar with the type of connector you are using.

See header pin out:

Sparks implies a possible problem with common ground to or not connected @ AC mains.
This ‘absolutely’ has to be traced down before proceeding.

You may have blown your TQFP :frowning:

You may have blown your TQFP :frowning:

yes burned about 8 TQFPs till now - can't isolate the issue

With a DVM, measure for AC voltage from PCB GND to the ICSP pins (when the programmer is plugged into the connector).

If you see any AC voltage on these pins, there is a mains problem.

BTW, show us a complete wiring image with all cables attached and where they are originating from.

OP’s images so far:
IMG_20181205_190003.jpg

square Rev2_bottom.png

square Rev2_top.png

Bildschirmfoto 2018-12-05 um 21.19.55.png

Green wire bottom < GND > GND on “Arduino as ISP” device
Blue wire bottom < 17/SCK > D13 on “Arduino as ISP” device
White wire bottom < 5V > 5V on “Arduino as ISP” device
Yellow wire bottom < 15/MOSI > D11 on “Arduino as ISP” device
Black wire bottom < 16/MISO > D12 on “Arduino as ISP device”
Red wire bottom > NC (would be normally connected to reset through C2)

The blue wire on the top < 29/RESET > D10 on “Arduino as ISP” device

“Green wire bottom > NC (would be normally connected to reset through C2)”
Red? 10 on ISP Arduino to Reset on target, with no capacitor.

Check that all wires are properly crimped and make good connections to the PCB.

Were there any AC voltages on these pins?

larryd:
“Green wire bottom > NC (would be normally connected to reset through C2)”
Red? 10 on ISP Arduino to Reset on target, with no capacitor.

Yes, corrected that above

Check that all wires are properly crimped and make good connections to the PCB.

Were there any AC voltages on these pins?

will check tomorrow

Here the EAGLE file, maybe that helps isolate the problem

Board.zip (71.3 KB)

Sparks on the chip leads? Sounds like a soldering paste issue.

Please explain your process attaching the atMega328. Solder paste and a stencil? Hot air reflow? Soldering iron? Please explain in detail. Is board being cleaned post reflow? How?

WattsThat:
Sparks on the chip leads? Sounds like a soldering paste issue.

Please explain your process attaching the atMega328. Solder paste and a stencil? Hot air reflow? Soldering iron? Please explain in detail. Is board being cleaned post reflow? How?

I am soldering with a soldering iron and with flux liquid. The liquid disappearing while soldering. Not doing anything after that. Just checking for a short between VCC und GND and visual inspection.

EDIT: the tiny sparks I am seeing are at the top, just before the plastic housing begins

No bridging, everything looking fine

Okay! I started fresh today. New PCB, new ATmega AND a new USBtinyISP adapter. Cleaned everything after soldering and checked for shorts. Viola -flashing was no problem!!! Well, not quite - it only works if I solder the RESET wire from the USBAdapter directly on the 10k resistor - not through the JST-SH pin header (C2 bridged). But I am pretty happy right now :slight_smile: It is the first board of about 6 (failed) that is finally working.

The sparks on the previous PCB still needs to be looked in to.

After solder the connections, always clean with IPA on a Q tip.