Schematic/PCB Review

Hello All,

I'm hoping someone could review my schematic and PCB layout. I'm having an odd issue that I hope someone could shed some light on. I think the schematic is OK because i've layed it out on a breadboard and prototype board and the circuit works just fine, I then have a PCB manufactured through OSH Park but it isn't working correctly.

This is a small controller I'm using to drive a 12v LED strip with an ATTiny. I'm using PWM to fade the lights on and off. When I soldered up the PCB the lights randomly fritz in and out. I'm really not sure whats wrong. Any advise would be greatly appreciated. I've attached the Eagle Board and Schematic

Lights_V1_3.brd (70.8 KB)

Lights_V1_3.sch (254 KB)

Try soldering a .1uf from I/P to 0v on the 7805.
Edit also you should have decoupling on the ATTiny.

Hi, do the same on the output of the reg to 0V as well, and a 10uF 16V along with it.
And 0.1 directly to the supply pins of the ATTiny.
While you were in protoboard stage there was not enough stray capacitance around plus component spacing so that problems with digital circuits in small assemblies has not occurred.
Now you have compressed it, switching noise and such are now a problem, so adding these capacitors will help, if you look up the spec sheet for the regulator you will see that they recommend various caps around the reg, close to its pins.
http://www.ti.com.cn/cn/lit/ds/symlink/lm340-n.pdf

Tom...that should get it going, nice PCB by the way, just needed those extra components... :slight_smile:

Power and ground traces should be wide so they are low inductance, especially in
the sections between the logic chips and their decoupling capacitors. 0.04" if you can
route it. (If ground is all ground plane its only the supply rail this applies to of course).

Signal wires should be narrow and routed over ground-plane if at all possible.

People seem to think the trace thickness is to do with the resistance of the traces, but
not true unless the chip is taking big currents, stray inductance is big news with fast
logic chips.

Decoupling caps right next to the chips they decouple, generally ceramic 0.1uF for
all logic chips, whatever the datasheet recommends for the regulator.

Thank you for the explanation TomGeorgeand everyone for the quick responses. Adding a single 0.1uF cap to the regulator seemed to be good enough to do the trick.

I'm going to update the board to add decoupling for the attiny and the proper caps around the regulator as well. Did I make any other rookie mistakes on the PCB that I can fix at the same time? I did use a ground plane on the board. For the trace widths I used 26mil for the 12V lines and 16mil for the 5V. I'm guessing Mark is saying the 16mil ones are too big??

Power traces can never be too big. The more the merrier.