I have my LEDs installed now and was testing it before completely sealing everything up and sure enough I came across a problem. I have one section of LEDs, section #7, that is flickering on certain light modes but not on others. I have 16 LED sections total, with a number the same so they're just labeled in the schematic. I had previously installed a capacitor on the latch earlier and did not really notice any flickering of any sections before mounting them in the housing. So to me it seems as if the problem has come about just now. Here's the schematic to reference.
It may or may not be of any consequence but I did have a 7.5A fuse on the positive wire coming from the 12v battery and while connecting all the wires to the PCB the + and - of the battery came together, sparked and blew the fuse. I went and got another fuse, 5A this time and everything seems to work fine...except the flickering of LED section #7. I've rechecked and reflowed the solder connections to section #7 in case it was a bad bad/broken solder job, they all look good now with the problem persisting. And I did swicth out the Atmega168 with another one I had lying around with my code in it to see if it had messed up the chip...same problem so it's not the chip I think.
Any idea of the next best place to look for the problem?
I had previously installed a capacitor on the latch earlier
Why is that capacitor there? I can't see it doing anything but give you trouble. It could be delaying the latch and causing you the flicker. It could be you fitted it to cure something that was actually a software fault.
Unless you have a problem with decoupling http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html, which you could have as there is none shown on the diagram and you do need some. Then it is almost certainly a software problem.
So why did you not see it until it was mounted in the box? Well electronics is like that, bugs hide and only come out when they think it is safe. It is a well known phenomena that things won't work when they are in a box. ;)
Thanks for the reply Mike.
Why is that capacitor there?
Well that capacitor is there because once I got the project off of the breadboard where I had 16 low power LEDs and hooked everything up through my PCB with the 16 sections of high power LEDs it produced a wicked flicker on many sections no matter the light mode. Then I remembered something about it in the ShiftOut() tutorial http://www.arduino.cc/en/Tutorial/ShiftOut, step #2 recommends a cap if you experience flickering. Once I modified the PCB with the cap the flickering went away.
And as far as de-coupling goes I’ve seen your page before, and it’s a great helper, I just saw it after I had everything etched. But a question though…for my circuit the RBBB already has caps, so it would have been nice to install some just for the 74HC595’s? And in the simpler one large cap with multiple smaller caps arrangement? I’m not sure if I really want to go and re-solder all those parts again, but I would like to learn from my previous projects to produce more effective ones in the future!
Once I modified the PCB with the cap the flickering went away.
Thought as much. You are just introducing a delay due to poor software that cap is a bad idea on logic lines and should be confined to the bin. The software should not clock the latch until all the data is in. I think they have it the wrong way round on that tutorial. That is defiantly the cause of the problem.
On the decoupling, if you have etched the board already then just solder some caps to the pins on the underside of the board. The simpler one is less effective but in many cases all you need.