Go Down

Topic: Arduino Micro External Power (Read 24895 times) previous topic - next topic

alexval1323

I could probibly find this online, but after 5 min of googling i gave up...i prefer human interaction anyway.

well i have a project that would require my arduino micro to have an external power source. ex a 9v battery. what would be the best way to hook this up?

lar3ry


I could probibly find this online, but after 5 min of googling i gave up...i prefer human interaction anyway.

well i have a project that would require my arduino micro to have an external power source. ex a 9v battery. what would be the best way to hook this up?

Depends entirely on which Arduino you have. If it happens to be an Uno, it's hard to miss the big honkin' black power connector.

spynappels

If you are referring to the Arduino Pro Micro, you could connect the +ve lead from the battery snap to the RAW pin and the -ve lead to a GND pin.

This should put the 9v into the on board regulator.

You would probably get longer runtime from 4 x 1.5v AA or C batteries than from a 9v block battery, with less voltage "wasted" as you will be stepping from 6v to 5v rather than from 9v to 5v.

UnoDueTre

Four fresh AA batteries will give out  6V (or slightly higher) which will be border line for the 5V regulator (not 100% sure what the minimum input voltage of that regulator is, but suspect 1.2V more than the output)
The voltage from the batteries will also start dropping and there will not be enough differential voltage for adequate regulation.

alexval1323

@ lar3ry....no its not an uno itsa micro, there is no power port, only a micro usb port

@spynappels....im looking at the micro pro, but idk the exact size of it (Width) because i have a very small space that i can work with, so i know that the micro will work but idk about the micro pro...if you know how to do this with the micro it would be really nice, and it would save me 10$ from having to buy the micro pro

MichaelMeissner

#5
Jan 09, 2014, 11:16 pm Last Edit: Jan 10, 2014, 12:05 am by MichaelMeissner Reason: 1
It runs on 5v with a micro USB plug.  The simplest would be to get a USB battery meant to charge cell phones.  You can get these in various capacities and sizes.  Here is the first one I found on ebay, looking for buy-it-now, and US seller, and sorting by price: http://www.ebay.com/itm/New-Mini-Power-Bank-Emergency-Battery-Charger-USB-2600mAh-For-Mobile-Phone-lot-/171173469580?pt=US_Cell_Phone_PDA_Batteries&var=&hash=item27dabbdd8c

Alternatively, get a Minty Boost kit from Adafruit, and it will run on 2 AA batteries (preferably rechargeables), boosting the power up to 5v: http://www.adafruit.com/products/14

You probably do not want to use a 9v battery meant for smoke alarms, as those batteries are not rechargeable and don't have that much capacity (unless of course you like buying and throwing away batteries).

Alternatively get this voltage regulator from Pololu.com.  It will work with any voltage from 2.5v to 18v.  You will need to wire it to the ground and VIN pins.  Two AA/AAA rechargeable batteries is just under the limit (2.4v), but 3 (3.6v) would work, as would the 3.7v lipo batteries that you can get.  Even the 9v battery will work, if that's what you have: http://www.pololu.com/product/2121

If you are always going from a lower voltage (1-3 AA/AAA batteries, lipo, etc.) you would want this, as it will work with much lower voltages, and is more efficient: http://www.pololu.com/product/2562

You can also get step-up converters that have USB female plugs that you could plug in the USB cable.

Note, with any voltage converter, you should monitor whether it is getting too hot.  With some converters, the bigger the difference in source/target voltage, the bigger the heat generated is.

lar3ry


@ lar3ry....no its not an uno itsa micro, there is no power port, only a micro usb port

Yes. I took "Arduino micro" to mean something generic, like "microprocessor", or "microcomputer". If you'd said "Arduino Pro Micro" I would have know immediately what you were speaking of.

alexval1323

@MichaelMeissner...I didnt think about the usb batter bank and i really  like that idea and ill definitely  keep that in mind, but....the space that i have to fit this in is a .7'' pipe...so AA batteries and battery banks are just too big. i think that im going have to redo my design so that the arudino is outside the pipe, im open to any ideas you have, and mindyou its underwater, the arudino is completely underwater, so some power options are not possible. 

lar3ry


@MichaelMeissner...I didnt think about the usb batter bank and i really  like that idea and ill definitely  keep that in mind, but....the space that i have to fit this in is a .7'' pipe...so AA batteries and battery banks are just too big. i think that im going have to redo my design so that the arudino is outside the pipe, im open to any ideas you have, and mindyou its underwater, the arudino is completely underwater, so some power options are not possible. 


Tell us more about the project. What all has to be in the .7" pipe? It doesn't sound like the micro will fit if it has to be waterproofed, unless the pipe is completely closed.

Is the pipe open at one or both ends?

If the Arduino can be outside the pipe, then perhaps the batteries can be outside, and the Arduino inside.

MichaelMeissner

#9
Jan 10, 2014, 07:37 am Last Edit: Jan 10, 2014, 01:14 pm by MichaelMeissner Reason: 1
How long does this need to run for?  How long is the the pipe?  How complex is your setup (i.e. how many pins, etc. do you need)?

I could imagine downsizing to use a raw chip and minimal components.  An ATtiny85 which has 5 pins available is roughly 0.3" x 0.4", and a 328P is perhaps 0.3" x 1.4".  A minimal lipo 100maH battery is  0.5" x 1.5", and would probably give you a few hours of run time, more if you optimize it is for low power.  Or you can use AAA batteries wired in series to the voltage converter.

Assuming the pipe is tethered to the master base, you could just run a long power line.  You would lose energy but that may be one way to handle it.

Using a water sealed enclosure that holds the Arduino and battery and you just run the sensors in the pipe might be another, depending on the conditions.

Here is the battery I mentioned: http://www.adafruit.com/products/1570#Technical_Details.

I bought some ATtiny85-20PU's from this seller in Hawaii to make a Christmas ornament (which I unfortunately ran out of time for this Christmas), and set up my Uno to act as a programmer (you can also get standalone programmers): http://www.ebay.com/itm/190981804527.

Here is a guide for programming a raw ATtiny85 with an Uno: http://www.ernstc.dk/arduino/attiny85.html

Here is the datasheet for the ATtiny85: http://www.atmel.com/Images/Atmel-2586-AVR-8-bit-Microcontroller-ATtiny25-ATtiny45-ATtiny85_Datasheet-Summary.pdf.  You can run it at 1-8Mhz directly from a 3.7v lipo battery.

I would suggest using a DIP socket like this, that way you can remove the chip to program it, and solder the wires directly to the socket pins. http://www.ebay.com/itm/10pcs-8-Pin-DIP-IC-Socket-Solder-Prototype-Circuit-Adaptor-PCB-Attiny85-Attiny13-/181243826036?pt=LH_DefaultDomain_0&hash=item2a32f94f74

You could use a method called dead bug style of wiring: http://makezine.com/2012/10/08/a-fine-example-of-dead-bug-style-circuit-wiring/

<edit>
Something like this would allow for easier re-programming, but it does add 0.2" extra width, which you might not be able to afford: https://www.tindie.com/products/bot_thoughts/eezee-tiny-breakout-programming-board-kit/?pt=directsearch.

You do probably want to put capacitors in with an ATtiny85 between the power supply and raw chip to filter out spikes.

alexval1323

Quote
Tell us more about the project. What all has to be in the .7" pipe? It doesn't sound like the micro will fit if it has to be waterproofed, unless the pipe is completely closed.


@lar3y...well im trying to make one of these... http://www.dhgate.com/product/led-shower-head-lights-bathroom-accessories/130738463.html ... its a shower head the puts out water in different colors due to LEDs in the head, i have the RGB LEDs and the correct temperature censer, http://www.adafruit.com/products/374?gclid=CPaHttXE9LsCFa10Qgod50UAEg but the one im going to make is real time depending on the temp    the programming for this is easy and i have already done a prototype on the arduino, uno, but i had wires running through my shower and it didnt look good, (it wasnt really suppose to) i now want to  integrate everything to the inside of my shower pipe, and i could, but the only problem im having now is size, the Lithium Ion Polymer Battery that MichaelMeissner suggested is just about exactly what i want but doesn't produce enough voltage, so ya that is the general scope of my project.....and waterproofing adds 0 material to the overall size, im using a more industrial version of http://www.rustoleum.com/product-catalog/consumer-brands/neverwet/neverwet-kit/ i have access to it though my dad (he is an electrical engineer)


Quote
How long does this need to run for?  How long is the the pipe?  How complex is your setup (i.e. how many pins, etc. do you need)?


@MichaelMeissner...well it needs to run while im in the shower, i have already immigrated an on/off toggle into my shower wall, so the arudino will be completely separated from all power while not in use, i hope to get 100 or so hours out of one battery, i mean im not in the shower for over 15 min anyway, so 100 hours should last for a good year.  And as long as the battery is cheap i would have no problem with having to buy a new one every 10-20 hours
the pipe is long enough, i cant see much of it because its in my wall, but i can stick up to 3 feet of measuring tape in to it and still have room to move it.
the set up isnt to bad, i need 4 analog pins and a ground and a 3v vcc pin...im using RGB LEDs and i calculated the correct amount or current and am using 7 LEDs set in series so i dont blow out the LEDs too quickly. so ill look for some raw chips and see if i can find anything that would work.

if you have any ideas i am more then willing to listen.

Thank you,
Alex Valente
Dos Pueblos High School
Engineering Academy class of 2015

MichaelMeissner

Note, a year may be too much to hope for, since batteries lose charge over time.  NiMH batteries in particular might lose their charge within a month or so (there are now long lasting NiMHs that are a little more expensive that don't lose their charge as fast, but they don't have as much raw capacity as the NiMHs that aren't long lasting).  I don't recall whether LiPo batteries lose their charge quickly or not.

For a shower, I would think just put the Arduino and power outside of the shower head, and just run wires for the sensor and LEDs in the actual shower head.  Adafruit has waterproof temp. sensor, as well as cable glands that you can use:


alexval1323

@MichaelMeissner...well the temperature sensor you sent me is the same one i have, just bigger and less accurate due to the metal tubing...sooo i dont need that, the power cable will only be used if i have to put the arduino/cpu outside the shower and then in that case nothing but the LED and sensors need to be water proof and then all of this is a waist and i start back at block one, but ive been looking some at the raw chips, and im using an ATmega328P-PU for proto typing and i really like the idea because it costs less and take up less room, now as for the power, i could still use a NiMH battery, but i was looking online at how the store LED shower heads work, and they have a mini water powered generator that in inside them...and i think that may be exactly what i need....i was looking at some options and there are ones on the web that with average household water pressure can generate up to 5v this one is the one that i am considering http://www.ebay.com/itm/Hydroelectric-power-Micro-hydro-Piped-water-generator-Portable-water-charger-/181130063356?_trksid=p2054897.l4275   what do you think about it?

lar3ry

One of the things I would test thoroughly is water flow when you have all these bits inside the pipe. I would think you would lose a good 40% of the cross-section even with AAA batteries.  Thee would also be considrable turbulence and drag as water flows over the various bumpy thing. It's worth looking at.

It is a fascinating project though, and well worth persuing.

If I was doing it, I'd probably think about getting a larger shower head and putting the unit inside that.  You could probably figure out a way to have the water pressure activate a switch to turn it on, and it would be easy enough to remove the shower head for battery replacement.

Another way, though it would require access to the pipe downstream from the faucet, would be to provide a a watertight access for wires. You would run the wiring through the access, up the pipe, and into the shower head, The LEDs and temperature sensor would be in the shower head, and the arduino and batteries would be outside the pipe.

The little hydroelectric generators are interesting indeed!

If you are successful, I hope you'll come back and let us know.

alexval1323

@lar3ry...i have though of that, and i only tested it using AA and AAA batteries and there is just no way that will work, the AA battery take up about 80% of the pipe and the AAA about 50%...so if i want to you an internal power source then i would need to use a lithium or nickle hydrate battery that is thin but long....and if the arduino/just-the-microchip is in the shower head isnt big and shouldn't be that big of an issue....

but while looking i think my best bet for an cpu would not be the arudino, but the ic that the arduino uno runs on, the ATmega328P-PU.... the best way to program it is to plug it in the the arduino uno, upload the program, and then take it out and it still contains the program u had on it before, but....i dont know how to power it, when i look online i found this http://www.instructables.com/id/Standalone-Atmega328-for/step2/Hooking-it-all-up/ and i was really pleased because i can do this in very little space and i could use a step up converter to step up the voltage from the water powered generator, but would that present a problem? i would i loose current? and if you know how to power it a better/easier way please do tell me.

thank you

Go Up