Pages: [1]   Go Down
Author Topic: Powering Arduino makes a difference?  (Read 568 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 524
Posts: 26422
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

USB is limited to 500mA. Perhaps you are drawing more than that.
Logged

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.

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Global Moderator
Boston area, metrowest
Online Online
Brattain Member
*****
Karma: 524
Posts: 26422
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

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.

0
Offline Offline
Shannon Member
****
Karma: 200
Posts: 11690
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?]
Logged

[ I won't respond to messages, use the forum please ]

0
Offline Offline
Newbie
*
Karma: 0
Posts: 24
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Manchester (England England)
Offline Offline
Brattain Member
*****
Karma: 602
Posts: 33362
Solder is electric glue
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Offline Offline
God Member
*****
Karma: 7
Posts: 647
"In this house, we obey the Laws of Thermodynamics" Homer J. Simpson
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: