-
General question about powering an arduino
Ok so for my setup in Tempest SXR I plan on having a separate adapter so the Arduino will be powered on when the computer is off (unless I can figure something else out - I'll get into that later). If I have the 5v socket hooked up and the USB (I'll need the USB hooked up for a bit once it's first installed to adjust the coding) will it automatically switch to the best power source or will it fry something?
Also, can I build a circuit that will take 5v from the PSU and store it in a capacitor so the arduino will have 4 or 5 seconds of power after the computer is off so I don't have to keep it plugged into a separate power source all the time? I need it to stay on after the computer shuts off so that it will close the louvers. If I just power it off the PSU, the same 5v line controls the loop in the code, so it'll power down before it has time to shut the louvers. But when I power it on it'll work just fine.
So after typing all this, I think I'd like to go the capacitor route and just supply 5v to the arduino for 5 seconds or so after the computer is off. Can anyone suggest how I might do this or point me in the right direction?
-
Re: General question about powering an arduino
Well, you could have the shutdown commands of Windows send teh command to teh arduino and have the louvers shut before the computer shuts off.
Check out Renderman's Motorized Madness mod to see this in action (not necessarily with an arduino)
I see I put teh instead of the. I'm in a teh mood apparently (none of them were typed on purpose except for this line)
-
Re: General question about powering an arduino
In the main ATX power to the motherboard, there is a 5v standby line, you might like to use that.
-
Re: General question about powering an arduino
Quote:
Originally Posted by
crenn
In the main ATX power to the motherboard, there is a 5v standby line, you might like to use that.
I would use this if it provides enough current. Maybe, have the main power for the arduino be this, and have one of the I/O pins be monitoring the power on a regular 5V line. When the regular 5V line no longer registers, then start shutting the louvers.
-
Re: General question about powering an arduino
Quote:
Originally Posted by
x88x
I would use this if it provides enough current. Maybe, have the main power for the arduino be this, and have one of the I/O pins be monitoring the power on a regular 5V line. When the regular 5V line no longer registers, then start shutting the louvers.
The code he has currently already does this. Maybe have a capacitor so that the servo has enough power without relying on the standy line. Ideally putting the arduino into sleep mode until the computer turns back on.
-
Re: General question about powering an arduino
exactly what I was thinking. the 5v from the psu stops @ the same time the computer shuts down, so the computer will shut off leaving the louvers open
-
Re: General question about powering an arduino
I'd like to make a circuit with a capacitor so like crenn said it will supply a few secodns worth of juice to the Arduino once the computer powers off just so it will shut the louvers. I can then hook it to the 5v psu power so while the computer is on it will charge the capacitor.
I'm also thinking of making a custom board to mount the ATMega chip frmo the arduino so I can continue to use the adruino in other projects, and maybe combine this capacitor circuit into the same board. Anyone have any ideas? :?
-
Re: General question about powering an arduino
-
Re: General question about powering an arduino
Quote:
Originally Posted by
SXRguyinMA
exactly what I was thinking. the 5v from the psu stops @ the same time the computer shuts down, so the computer will shut off leaving the louvers open
As long as you don't turn off the switch on the back of the PSU, the 5V standby line will stay on. That's kinda it's whole point. So, if you just use that line and just don't throw that switch until after the louvers are closed, you shouldn't have a problem.
Alternately, if you want to go with a cap, try experimenting with a few different high capacitance caps to find out what you need. As long as you're only feeding it a straight 5V charging line it'll only charge to 5V, so you shouldn't have to worry much about the voltage rating of the capacitor.
-
Re: General question about powering an arduino
well I never shut off the psu itself so I don't need to worry about that. you're talking about the green wire on the 24-pin connector right? will that have enough current to run the servo though?
optionally I can make one of these and just keep an eye on the battery. The thing is that the Arduino doesn't need power after the 3 or 4 seconds it needs to shut the louvers, so I wouldn't want it to sit and drain the 9v all night while the computer is off, hence the capacitor route.
As far as that goes, what if any special circuitry would I need for it? Or would I just hook a 5v line to the cap (presumably with a diode) and hook the cap right to the power and ground pins on the arduino? Or hook it to the arduino without the extra 5v line and let it charge from the 5v power on the arduino itself?
-
Re: General question about powering an arduino
-
Re: General question about powering an arduino
Quote:
Originally Posted by
SXRguyinMA
you're talking about the green wire on the 24-pin connector right?
No, no, no, I see the confusion now. There's a special 5V 'standby' line, I think usually blue. Basically it lets the MBB check that the PSU is actually functioning or something.
As for the capacitor, I think if you just put the cap in parallel with the arduino and put a diode between the PSU and the cap (so the cap doesn't discharge into the PSU), that should work. I would try it first on some other 5V device that doesn't matter if it gets burned out, just to make sure I'm not full of crap. :P
-
Re: General question about powering an arduino
lmao sounds good. also, The only caps I'm finding are 35v or 50v. If I only hook a 5v line to it will it only charge 5v up to its rated uf capacity? or shoudl I try to find a 5v cap?
-
Re: General question about powering an arduino
Correct. No matter what the voltage rating (as long as it's >=5V), any cap just hooked up to a straight 5V line will only charge to 5V. To get it higher than the source voltage you would need a DC-DC boost circuit like in my coilgun thread.
-
Re: General question about powering an arduino
-
Re: General question about powering an arduino
If you're looking for something a little cheaper, there's also this:
0.47F 5.5V : $1.49
http://www.goldmine-elec-products.co...?number=G16573
As opposed to the one crenn linked
10F 2.5V : $4.95
http://www.sparkfun.com/commerce/pro...roducts_id=746
You could combine two of the 10F ones in series to get a 5F 5V cap bank for $10, and that's definitely a great price for that, but idk if you need 5F of capacity. I'm also not sure how you would go about calculating that. With the smaller ones off Electronics Goldmine, you could run as many as you need in parallel, for any multiple of 0.47F. So if you only need, say, 2F of capacitance to run the arduino and servo for the time needed, you could hook up 5 of the 0.47F ones in parallel for $7.50. ...and, actually, now that I type that all out, I would just go with two of the one that crenn linked, but I'm not gonna delete all that because..yeah. :P
-
Re: General question about powering an arduino
lol I ended up getting the ones crenn linked only because sparkfun had a few other misc goodies (switces, RS232 to USB converter) that I wanted, so it was easier. Should hopefully see them in a week or so! then I can get cracking on this!
Even if the 5F ends up being too much that just means the Arduino will run longer than I need until the caps are drained right?
-
Re: General question about powering an arduino
Right. Think of a cap kinda like a bucket of water with a hole in the bottom. The capacitance rating determines the size of the bucket, the voltage determines the size of the hole. So, you fill up the 'bucket' with 5V, and when that input voltage goes away it puts out 5V until it's empty.
-
Re: General question about powering an arduino
cool thanks!
I'm pretty knowledgeable about some electrical stuff, but when it gets into trasistors and capacitors and the like I'm a little lost :?
-
Re: General question about powering an arduino
crenn, I had a guy over on the arduino furms say those caps you suggested probably won't work because they're too high resistance (40 ohms each). He suggested these ones, but then I'd need 10 of them (~$40) in parallel for 4.7F, and they are .5ohm each
http://search.digikey.com/scripts/Dk...me=283-3014-ND
any suggestions? I've already got the ones from sparkfun coming, so I'll give it a shot. he thinks it might be too much resistance (80 ohms total) to run the servo properly
here's the thread from arduino forums
http://www.arduino.cc/cgi-bin/yabb2/...m=1279813240/0
-
Re: General question about powering an arduino
I'm only guessing since it's been a while since I've done analog electronics, but my guess would be there is just enough current to move the servo to the correct position.
I could be completely wrong, so take this with a grain of salt (maybe half a grain). If you apply ohms law (V=IR) to it to get current, you get 5V with 80 Ohms which theoretically produces 625mA. But there are a lot of varibles to that. Especially since capacitors aren't ohmic.
It's probably safest to try his route (in terms of circuitry) and see what happens. Mean while... I think I'm going to find my textbook again to study.
-
Re: General question about powering an arduino
lol thanks again for all your help on this project crenn! Once I get them caps in I'll breadboard it up and test it. now, can I just hook it (with diode) to the 5v and gnd pins on the arduino?
-
Re: General question about powering an arduino
You need something like a super cap to store enough energy so the duino can power the servo long enough to close the louvers.
-
Re: General question about powering an arduino
even for the ~1 second it needs to move?
-
Re: General question about powering an arduino
Quote:
Originally Posted by
Oneslowz28
You need something like a super cap to store enough energy so the duino can power the servo long enough to close the louvers.
That's what the caps that he's using are for. Do you not think 5F would be enough? Actually, SXR, is there a power rating on the servo?
-
Re: General question about powering an arduino
Quote:
Originally Posted by
x88x
That's what the caps that he's using are for. Do you not think 5F would be enough? Actually, SXR, is there a power rating on the servo?
Servos current depends on the load. For a normal servo, it could be upto 1A but it is dependant on the individual servo. Also you need to remember that the more current you draw, the less time you have due to the capacitor's discharge cycle.
-
Re: General question about powering an arduino
this is the servo I'm using:
http://www3.towerhobbies.com/cgi-bin/wti0001p?&I=LXXF84
the specs they list:
Quote:
SPECS: Length: 1.6" (40.5mm)
Width: .8" (20.5mm)
Height: 1.43" (36mm)
Torq: 80 oz/in
Weight: 1.58oz (45g)
And there's hardly any load on this thing at all. The louvers have a little bit of weight and resistance, but if it will be closing them gravity will be working with the servo and not against it
-
Re: General question about powering an arduino
-
Re: General question about powering an arduino
not atm, but I'll be home from work in ~4.5 hours, what do you want me to check?
-
Re: General question about powering an arduino
The current to the servo!
-
Re: General question about powering an arduino
alright I go tmy caps in today, Is hould be able to get this breadboarded tonight. Now I know I can hook it to the 5v pin on the arduino to get power, but will this pin also pwoer the arduino or only the USB or jack?
-
Re: General question about powering an arduino
Wait a bit because I think we need a couple of extra components.
-
Re: General question about powering an arduino
-
Re: General question about powering an arduino
well I ended up breadboarding it up anyways and it works! I don't see the point in the resistor from the cap + to board + though, it seems to just make the caps take longer to charge. I let it run until both caps read about 2.5v, then unplugged the power supply. I cycled the servo back and forth several times and it worked fine
-
Re: General question about powering an arduino
The reason for the resistor is to reduce the current drawn from the PSU, the other thing I wanted to do was make sure when the system was off, that the current wouldn't leak back into the computer.
-
Re: General question about powering an arduino
this is now I've got it hooked up, but with the 2 10F caps instead of the .47F one
http://www.arduino.cc/cgi-bin/yabb2/...m=1279813240/0
-
Re: General question about powering an arduino
A 5v zener diode?
Also, how long does it take to charge the circuit?
-
Re: General question about powering an arduino
yes 5v, seems to take about 4 or 5 mins to fully charge both. I hooked my multimeter to them and watched it creep up ever so slowly, but one got to 2.497v and the other to 2.502 and seemed to stabilize there
-
Re: General question about powering an arduino
Got a model number for that zener? I'm guessing the capacitor at 2.497v was closer to ground?
I'm currently fiddling with the simulator.
-
Re: General question about powering an arduino
actually the lower voltage one was the one hooked to the diode, resistor adn 5v, the higher voltage one was on the ground side.
This is the diode I used:
http://www.radioshack.com/product/in...erValue=Diodes