I ran into a small problem, and was wondering if my assumption was correct and if my solution was right too.
When it comes to electronics I am pretty green, so please forgive me.
Today I was reading an instructable dealing with Shift Register (http://www.instructables.com/id/The-74HC164-Shift-Register-and-your-Arduino/?ALLSTEPS ), and came upon a problem. I had problems shifting out different patterns of LEDs. At first I though I had a defective chip. After changing the chip the problem persisted. Next I noticed that if I reset the Arduino a couple of times I would get a correct pattern displayed. I tought that maybe it might be something to do with my power source. I was running my Arduino from the USB. I tried connecting Arduino via my 5v power supply (Beginning Embedded Electronics - 1 - SparkFun Electronics), and everything started to run smoothly.
So the question is. Is the USB power not clean? and that is why I wasnt able to displayed a correct patter or was it something else?
Would it be possible to solve this with some other method?
Any links on the subject matter would be greatly appreciated.
I think current limit could be in effect - the 500mA USB specification is not the default current limit, its the maximum limit a USB host is expected to supply.
USB is supposed to negotiate current requirement via a request packet of some sort - I have no idea if the Arduino does the right thing to make this happen (I suspect most USB hosts just supply 500mA anyway from the start).
[Usually pattern sensitivity with switching lots of LEDs is a supply or decoupling issue - you have adequate decoupling for the shift register?]
MarkT:
I think current limit could be in effect - the 500mA USB specification is not the default current limit, its the maximum limit a USB host is expected to supply.
USB is supposed to negotiate current requirement via a request packet of some sort - I have no idea if the Arduino does the right thing to make this happen (I suspect most USB hosts just supply 500mA anyway from the start).
[Usually pattern sensitivity with switching lots of LEDs is a supply or decoupling issue - you have adequate decoupling for the shift register?]
By decoupling, do you mean placing a small capacitor between Vcc and GND (just looked it up). I didnt do that, Would a 1uF work? That is the lowest I have
1uF is much better than nothing so use that, but most likely they won't be ceramic capacitors.
It is likely that the external supply had enough decoupling for your chips but you should always add your own. For best high frequency response they should be ceramic capacitors between 0.1uF and 10nF.