Powering 5v 1.1A solenoid from batteries

Disclaimers: I admit I do not understand power supply and consumption as well as I should, hence asking questions. I have done a lot of searching, reading, etc., but can’t seem to put it together, hence asking questions. Most of the results to my searching seem to be about larger solenoids, different needs.

Question: how do I best power my device using the smallest, lightest, and cheapest battery source possible?

Project: I need to power an Arduino Mega Pro (a Mega clone that is small, and with a micro-USB port) with a small display (currently a 128x64 OLED, but could be something else), and, most critically, a solenoid.

(I think I need a Mega because my code - possibly bloated, but that is another learning opportunity for me - seems to be too big for other Arduino boards.)

I will learn about general power consumption later. Optimizing, sleep mode, various display options, etc. For now my question is about powering the solenoid from hopefully small lightweight batteries.

== Solenoid ==

-I think the small 5V 1.1A solenoid is strong enough for my needs. In general it only needs to fire for a moment - basically as fast as possible, and doesn’t need to hold - but more on that in usage 2 below.

Usage 1) Depending on the answers to this question, it could only need to fire for a fraction of a second, and with at least a pause of 1 second between firing. It would only fire twice in any given use, then there would be time - probably minutes - before it fires again.

In other words, it either fires once, as fast as possible, and releases, or perhaps fires once, waits at least 1 second (possibly many many seconds) and fires again. Then there would be a much longer (user-defined) delay before the next use.

Usage 2) If possible, in some scenarios, I’d like to be able to hold the solenoid for many seconds, but I realize this may require a different solenoid (“latching” or some relay or something) as what I have requires a lot of current, gets hot, etc. Suggestions for a small solution for this are welcome, if that’s the route I should be taking.

I am currently using a circuit (for the solenoid, only) similar to the solenoid portion of this one:

(TIP120, diode, etc.)

I can get it to work if I power everything from a variable-voltage wall brick set to 9V. I want to use my device miles and miles away from any power outlets, so I need to figure out batteries, capacitors, whatever.

Ideally we’re talking about a few AA / AAA, maybe a rechargeable lithium-ion or something?

I realize this next thing gets into overall power consumption, but just to give an idea, I’d like for this device to be able to be on (the display) for many hours, and for the solenoid to be able to fire…I dunno, 50 times? in that time period. Basically I want to be able to use this device all day without having to change batteries.

Solenoid: Mini Push-Pull Solenoid - 5V : ID 2776 : $4.95 : Adafruit Industries, Unique & fun DIY electronics and kits

"Ideally we're talking about a few AA / AAA, maybe a rechargeable lithium-ion or something?"

Power is what it is. You probably need to build your project and then start testing batteries to find some that meet your requirements. Rechargeable is probably better than single use.

I have built my project. I have tested with various power supplies, including batteries up to 4 AA, a 9V (which I have read since is useless) and various other combinations - before asking the question.

At this point, based on what I have tested and researched, it seemed wise to ask rather than to keep randomly sticking voltage into my system, since I don't have a good grasp of various batteries and their abilities, and no real understanding of capacitors, which is where, from my research, it seems I should be looking.

I thought I provided enough info to elicit some response like "4x 2000mAh AA batteries in series with a XYZ uF capacitor" should do the trick, or whatever.

"since I don't have a good grasp of various batteries and their abilities,"

Then that is something you should get up to speed on for you to develop your project. How much current does your setup draw, especially the solenoid? You should match your batteries to the current draw of your project. Rechargeable RC type batteries might be an option.

Ah yes, the "you should know the answer before you ask the question" response.

What do you think I am attempting to do with my original question?

I spent days researching and testing before deciding it was worth the risk of exactly this response.

I couldn't figure it out. And I'm working with Arduinos and such because I do not have a degree in electrical engineering - thought that was kind of the idea.

There are a lot of factors, variables, and equations. If one doesn't know exactly where to start, "getting up to speed" and "how much current does your setup draw" are not trivial questions, and are, precisely, the point of my original post.

I try very hard to avoid asking questions on forums because I seem to spend more time writing this sort of thing than actually discussing my questions.

What test equipment did you use in your testing and what current measurements did you get?

Paul

"I will learn about general power consumption later. "

Guess the forum better give you the answers now! :wink:

Apart from the fact that most of round here are engineering types so we normally like numbers and prefer measuring stuff rather than guessing...I would guess that 4 x NiMH rechargeable AA batteries would be a reasonable place to start (something like Eneloops or similar). Note that I'm definitely NOT talking standard AA alkalines. NiMH cells are much better at providing short high current bursts.

50 short firings of the solenoid should be o.k. but I have no real idea what the current consumption of a Mega Pro or "a 128x64 OLED, but could be something else" are going to be. Holding the solenoid for "many seconds" is likely to be a problem depending on what "many" means to you (I told you we prefer numbers to guesswork).

But give it a try and see how long they last in the real world. If the AAs aren't good enough there are always larger RC NiMH packs available.

BTW if you ditch the TIP120 and replace it with a logic level MOSFET (IRL520 or one of many others) that will improve the efficiency of the system a little. The TIP wastes a fair amount of power just getting warm.

Steve

I did not expect the forum to give me a full education. Yes, I said I'd get into optimizing my devices and code and all that later. I just needed to put the final piece in place for how to even get the solenoid to work from a non-wall-plug solution, that's all I was asking.

Simple question: how to trigger 5V 1.1A solenoid from smallest battery possible.

That's it. Do you need all the other info to answer that simple question? Do you need to be smartasses about it?

(slipstick, thanks for an actual start of an answer. I did try 4x eneloops and it didn't work. I have heard of the MOSFET you mentioned in some similar circuits, so I will try that.)

I'll be back in four years after I get an engineering degree. Thanks for the help.

mark_dawson:
(slipstick, thanks for an actual start of an answer. I did try 4x eneloops and it didn't work.

If you still have the TIP120 in circuit then it's probably dropping too much voltage. You could always try 5 x NiMH cells. Or you might have connected the 4 cells incorrectly. Who knows?

Steve

Simple question: how to trigger 5V 1.1A solenoid from smallest battery possible.

Different battery chemistries have different power densities and different energy densities. LiPo is about the highest for energy and power so it sounds like that's what you might need.

"we normally like numbers and prefer measuring stuff rather than guessing"

Honestly, I thought that's what I gave you, hence why I'm (somewhat) surprised at the responses.

I assumed (perhaps wrongly!) that there was an actual equation to answer for X:

5V 1.1A solenoid needs X amount of power, all at once, to trigger.

Then to get that power from something:

power needed to trigger = [desire for small portable battery] + [capacitor or whatever]

Then:

[number of triggers (50)] * power to trigger = size of battery needed

I’ll try 5x NiMH AAs, since that’s all I have until I can order a IRL520 MOSFET. I have an IRF520, for some reason, but at the risk of getting flamed again, I don’t know what these differences are. Datasheets, much like this forum, aren't ways easy to understand if you don't thoroughly know the vocabulary first...

I might see what other batteries my various devices have had, but the only LiPos I know I have are 3.7V from some Adafruit kit or something, and while I still don’t have a start for understanding power densities and output (i.e. why 9V wall wart works but 9V battery doesn’t) I’m guessing that 3.7V isn’t going to do much.

"I'll be back in four years after I get an engineering degree. "

So you are a high school senior or a collage freshman?

Indeed you do have a few numbers but then you mess that up with lots of waffle terms like "many seconds" (5 or 5000?), "fraction of a second" (1/1000th or 9/10th?).

The other thing is that we don't know how you're connecting everything and that makes a difference. E.g. when you're using 4 x NiMH batteries to power everything you need to connect to the Mega 5V pin NOT to Vin where you probably connect the 9V wall wart (and yes I did forget to tell you that, it's not easy knowing what knowledge you can assume).

And when you say things like "it didn't work" that's not very helpful. What exactly didn't work? Were the Mega and the display working but just not the solenoid or was there not even anything lighting up on the Mega and display etc.? You can see what you have and what's happening, we can't.

Steve

slipstick:
Indeed you do have a few numbers but then you mess that up with lots of waffle terms like "many seconds" (5 or 5000?), "fraction of a second" (1/1000th or 9/10th?).

From my research so far I see a lot of people asking - and being ridiculed for asking - things about solenoids, so I was trying to indicate, in several different areas of my original post, that I understood and was trying to explain what I needed:

  • Solenoids take a lot of juice to trigger. How do i do this from a battery? I've read a lot of posts regarding this, but they talk about large solenoids and large batteries, capacitors, etc.
  • People expect to trigger and hold the solenoid for longer periods. I was indicating that it only needs to fire for a "fraction of a second". I'm sorry I don't know precisely how many milliseconds or microseconds it takes for the solenoid to go out and back in, but that's what I mean.
  • It seems it takes time for capacitors (or whatever, I still don't have any idea) to recharge, so I thought, by saying at least a second or more between firings, that that would be enough info to say "well, 4x AA will recharge capacitor X in 500ms, so you're good" or whatever.

I could envision these kinds of responses:

  • Ah, you want to power a 5V 1.1A solenoid from portable batteries. I think X number of AA and a XYZuF capacitor will do the trick.
  • I think I see where you're going, but let me make sure I understand what you mean by fractions of a second. Do you mean a specified length of time in mS or uS, or just "engage and disengage the solenoid, but the duration doesn't matter"?
  • Whatever this mess has become.

slipstick:
And when you say things like "it didn't work" that's not very helpful. What exactly didn't work? Were the Mega and the display working but just not the solenoid or was there not even anything lighting up on the Mega and display etc.? You can see what you have and what's happening, we can't.

Man, I am sorry. I am talking about the solenoid, and when I say "I did X and it worked and I tried Y and it didn't" I meant that with X the solenoid engaged, and with Y the solenoid didn't move.

Everything else works fine. I know to put other voltages in through the VIN. I also know not to do this underwater. What else do I need to explain, or not explain, to make everyone happy?

"So you are a high school senior or a collage freshman?"

No, fortunately I'm an old fart who just gets pissed off with attitude like this. I was just being snarky and expressing my frustration that it seems one has to already be an engineer and already know everything before one can ask a question.

How do you think an actual young person - a high school student or even younger - would feel coming in here and asking questions and being met with these responses?

Paul: “What test equipment did you use in your testing and what current measurements did you get?”

I was responding to: “You probably need to build your project and then start testing batteries”, and I was explaining that I had done what he so helpfully suggested.

I do not know how to measure or answer your question, and aside from some cheap little USB LED voltmeter thing I doubt I have the tools to answer that. I used the device I made and I tested with various power sources I have.

And, if it really needs to be said, I’m sorry. If having that knowledge - proper test equipment and all that - is a requirement for participating in this forum, then count me out. I thought, though, that Arduino was geared toward non-experts, and that we could learn things from various sources, including asking what I thought was a reasonable question here in the forum.

You know what? The original Arduino welcome kit didn’t include testing and measuring equipment, and yet it seemed welcoming and helpful.

I didn’t think I needed to know everything before asking questions, and believe me, I’ve spent days and days figuring out stuff on my own before asking this one question here.

zoomkat: “Guess the forum better give you the answers now!”

Well, yes, that is somewhat the idea of asking a question on the forum, to get the answer, and to get it more quickly than the hours and hours over days that I’ve already attempted.

But to be clear, I meant something more like “I realize there are other factors, like optimizing code and components and such that will also impact battery life BUT THAT ISN’T RELEVANT TO MY QUESTION” and so you don’t need to waste your time on that sort of thing. I was trying to be considerate with your time, modest, and complete.

I could also say “I need to research enclosures”, because that will be impacted by the power source. I need to learn about ergonomics of the hand-held device. I need to think about removable batteries vs leaving them in to charge. But the first thing I need to know is: what kind of battery do I even need?

How much do you need to know before helping me figure out how to power a 5V 1.1A solenoid from a battery? My Arduino mega is black, the PCB I am using is green - plated through hole double sided! I used 60/40 solder on the pins (maybe that is relevant, what do I know? Maybe different solder wastes more energy! You engineer types like details, I hear.) I used some red jumper wire, some black, some green, and some yellow. Solid core!

There are a lot of things I need to learn about, and I’m not asking for all the answers here. Just a simple: how to power a 5V 1.1A solenoid from a battery.

What is a valid question that won’t draw the scorn of you experts and engineers? “I’m trying to reconcile Einstein’s relativity with quantum theory, discuss?”

You wrote: "The original Arduino welcome kit didn't include testing and measuring equipment, and yet it seemed welcoming and helpful.".

This is true, but you are trying to move beyond that, aren't you?

Paul

mark_dawson:
There are a lot of things I need to learn about, and I’m not asking for all the answers here. Just a simple: how to power a 5V 1.1A solenoid from a battery.

That's easy. 4 x AA will definitely do it.

Oh you didn't just mean to power the solenoid? You want to power an Arduino and a display too. And you want to control the solenoid from the Arduino via the wrong sort of transistor? It seems the question is getting more complicated by the minute.

And you also want the power to be small, light, cheap and last for an indeterminate long time too? Getting trickier but you could always try a 2S 7.4V lipo. That's small and light though maybe not so cheap because you need a proper Lipo charger to recharge it.

It's amazing how many people turn up here wanting answers to questions they're absolutely convinced are really simple. I always wonder if they know so much that they can tell that the answer is really simple why they haven't already answered it themselves.

Steve

Paul_KD7HB:
This is true, but you are trying to move beyond that, aren't you?

Yes, but apparently asking questions isn't the correct way. As I've said before, I'll just leave and come back when I get an engineering degree. (i.e., never)

You are right, and I get your point. However, there are many things I need to learn that I don't know, and I simply cannot do them all at once. I can't possibly learn everything before I ask a question. Asking questions is one way to move beyond what I already know.

Sure, test equipment might be a good basic thing to have, maybe even a reasonable next step for me to take. But what test equipment? As my original post indicated, I do not know the factors involved in order to ask the question, whether it be from this forum or from a test machine of some kind.

So I need to learn all of that stuff first, before I can buy a test machine, before I can ask questions, right?

In the past 2-3 weeks I have learned, for various projects I'm working on (and without insulting the forums by asking - learned all by myself!) at least a little bit about the following, about which I generally knew nothing before:

  • GPS NMEA sentences
  • Coordinate formats, degrees, decimals, etc.
  • JSON, parsing
  • GPS satellite positioning, impact of buildings, clouds, time of day
  • UNIX time, Timezone and daylight savings time conversions, time calculation, ctime, strftime
  • fprint
  • Writing to, reading from EEPROM
  • NodeMCU, getting it to work with the Arduino IDE, figuring out the GPIO chaos
  • Particle build IDE, web hooks, IFTTT
  • Custom libraries
  • Analyzing existing libraries and fixing bugs, adding missing functionality
  • Twitter parsing, hashtag usage analytics
  • Representing data effectively in a GUI
  • Representing data creatively
  • OpenWeatherMap API calls
  • More parsing
  • SPI and all of the mess its various pin names have
  • MOSFETs (at least the basic "gate, collector, emitter" idea)
  • Using 5110, OLED, TFT displays, accelerometers, DS-something temperature probes, BMP180/280 sensors, addressable RGB LEDs
  • Soldering irons, temperatures for various solder types
  • PCB boards, plating types

I've learned a lot on my own, and I can figure stuff out most of the time. And maybe by this point I should have invested time in some testing equipment instead of working on actual projects. Mea culpa.

But I have been fairly successful, and happy, with my progress so far. It's just that in this instance, despite trying to figure it out, I couldn't get how to power my solenoid from a portable battery, and since I am dealing with more electricity than normal in an Arduino project, I thought I'd rather ask than electrocute myself or burn up my devices.

slipstick:
That's easy. 4 x AA will definitely do it.

Except it doesn't.

slipstick:
Oh you didn't just mean to power the solenoid? You want to power an Arduino and a display too.

Nope, I can reduce my circuit to only the solenoid portion and 4x AA and it will not trigger.

slipstick:
And you want to control the solenoid from the Arduino via the wrong sort of transistor?

Well take that up with the folks at Adafruit that wrote the demo project that specifies that transistor.

slipstick:
And you also want the power to be small, light, cheap and last for an indeterminate long time too?

I went into quite a bit of effort to specify exactly how much time, so "indefinite" is a bit off. And yes, I want it to be as small, light, and cheap as possible, which is what I said. I am not asking for miracles, and I'm not stupid. Maybe the answer is "you need a car battery or a generator" I don't know, that's why I asked.

slipstick:
It's amazing how many people turn up here wanting answers to questions they're absolutely convinced are really simple. I always wonder if they know so much that they can tell that the answer is really simple why they haven't already answered it themselves.

Yes, I'm an idiot. I thought asking "how do I trigger a 5V 1.1A solenoid, using this circuit I found from the experts on Adafruit, with a battery" was pretty simple. Sorry I was so stupid.

slipstick:
Getting trickier but you could always try a 2S 7.4V lipo.

Thanks.

Guys, I'm out. I really will try to figure this out from data sheets, googling, a book from the library, etc. Sorry I bothered you.

Have fun helping others.