Go Down

Topic: Powering Arduino makes a difference? (Read 650 times) previous topic - next topic

kclv1988

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 (http://www.sparkfun.com/tutorials/57), 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.


Thank you.

CrossRoads

USB is limited to 500mA. Perhaps you are drawing more than that.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

kclv1988

Strange, at max I would be drawing 240mA.

See it gets stranger if I try to light 6 out of 8 leds, it works fine.

But if i do 2 out of 8, I start to have issues.

CrossRoads

Can you post a schematic of what you have wired up? I didn't wade thru the pages of instructables so I don't which example you are using.
Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

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?]
[ I won't respond to messages, use the forum please ]

kclv1988


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 :/

Grumpy_Mike

Read:-
http://www.thebox.myzen.co.uk/Tutorial/De-coupling.html

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.

radman

I noticed that LEDs attached to pins flashed when I uploaded sketches http://arduino.cc/forum/index.php/topic,72454.0.html.
People put this down to a board design fault.

Perhaps you are getting pulses, when you upload, that are messing up your shifting?
Maybe that is why resetting gets things going - just a thought.

Go Up