Go Down

Topic: Powering LEDs when using Vin w/battery (Arduino Nano) (Read 435 times) previous topic - next topic

waynewayne

Hi folks,

I've got an arduino nano (Elegoo brand) that I've connected to 5 LEDs. The goal is that 4 of these LEDs will flicker/fade, and the 5th LED is steadily on. I got this configuration working, with the USB cable plugged in.

For my project (space is limited), I need to run it off of a battery source, so I soldered two CR2032 battery holders in series together to get 6V, and connected it to Vin and a GND pin. In this configuration, the Nano board will power up (onboard LEDs light up when power is connected), but none of the 5 LEDs will light up. Just to narrow down, I disconnected the battery and reattached the USB cable, and LEDs light up as expected.

What's going on? Is there some sort of "power saving" where the board refuses to light up these LEDs when I connect a 6V battery to Vin? Google suggestions mention MOSFETs/relays. However, my LEDs flicker/fade by varying analog value of the pins, which rules out a relay-like solution.

What's the best workaround? I haven't wrapped my head around MOSFETS (limited space in my project) so I'd like to avoid additional hardware. Thoughts?

Thanks!
Wayne

juma_yetu

#1
Apr 11, 2018, 07:55 am Last Edit: Apr 11, 2018, 08:00 am by juma_yetu
If I recall correctly, power to Vin needs to be over 7V due to voltage drop in the internal regulator. So you're probably possibly not getting 5V on your pins. Have you measured?


PaulRB

The Nano will probably run on less than 5V, and the LEDs should still light, but a little dimmer than expected.

What I suspect is that the button batteries can't provide the current required.

I suggest you try 3xAA or 3xAAA, connected directly to the 5V pin, bypassing the Nano's regulator.

agrp87132

I think PaulRB is 100% correct. You must consider the current, not just the voltage.

INTP

Current matters. Same way you can't start a car with a bunch of AA's in series.
Button cells have high internal resistance, low output current availability, else they'd expend in no time flat for your project. So capacity (mAh) and current (mA) are the other traits you need to consider along with voltage.

waynewayne

Hmm, so based on the math found on this thread's best answer, I'm ballparking the Nano current draw to be approx 33.4mA.

And then also this thread's best answer, it appears that I can draw 100mA from a new CR2032 cell.

If I ran just the Nano and a single LED (a configuration I also tested), and estimated LED at 40mA (not super bright so likely less than 40), my current draw should be roughly 73.4mA in this configuration. I also have two CR2032's in series. In this configuration, the single LED did not light up either. Is this rough test/assessment valid?

Are there other ways to get around this, with using the CR2032? The advantage of the CR2032 is the small space/volume.

INTP

16 little 8oz cartons of milk will take up more space than a gallon jug.

You're completely missing the mark if you think there is a size advantage of the smaller when you need a gallon.

waynewayne

Even when I only need 6-7 oz of milk, as well as the size advantage of the little carton? Sometimes, hitting two requirements is feasible if they're both useful and potentially attainable.

It just seems like the numbers add up and should be sufficient. If it does, the question I'm asking is whether the issue is something simple that is easily resolved (e.g. a command, a setting/mode, etc.). If it doesn't, I'm just asking to learn how the math works.
 
If there's no solution, then there's no solution. But exploring the capabilities of arduinos and understanding how they work - isn't that the culture we want to project as a community?

PaulRB

Maybe the button cells can provide 100mA for short periods. But their voltage will drop because of their internal resistance. This may cause the Arduino to reset, or not provide enough voltage to light the leds at all.

If there is no space for 3xAAA, you could consider larger lithium batteries, Li-ion or li-po rechargeable batteries.

INTP

There is no setting for you to turn on that will make it work. Read that again. Read all of the responses again.
Do you have a multimeter? No? Get one.

waynewayne

No need for that attitude man. If you don't enjoy the discussion, you don't have to participate.


PaulRB, et al.,
Looks like you are correct. The output voltage seemed sufficient (measured to be approx. 6.01 volts, two in series), but I couldn't tell how much capacity it had at the time. I was tinkering and even though they were relatively new batteries, I swapped them out for another pair of new batteries, and it worked!

Also, I didn't think the estimated mAh accounted for voltage drop over time, so in the new set of batteries, I let it run. After 10-15 minutes, I noticed that the LEDs no longer lights up, and it would reset on its own (confirming exactly what you suspected). Turning it off for sometime, then back on seems revive it and allow LEDs to light up as expected again. Not sure how long I can cycle it for but I only need it to operate for <2 minutes for my project, so this is sufficient! Could be a good data point for other folks if they have similar needs.

Out of curiosity, could I, theoretically, delay the voltage drop by adding another battery in series? In other words, would a series of 3 batteries technically run longer before the arduino begins resetting? Or would the internal resistance add up, thereby negating the extra voltage gain? I don't actually have the volume for it, but if it helps, I would consider it in my next revision (or perhaps with lithium batteries!  ;) ).

PaulRB

Yes, a third button cell might extend the battery life a little because it would be longer before the voltage dropped to a critical level. But even more of the battery's power will be wasted to internal resistance and in the Arduino's regulator.

A better option would be to add a second pair of button cells in parallel with the first pair. This way, the internal resistance will be effectively halved, leading to less voltage drop.

For battery projects with maximum life, Nano is not a great choice because it has a usb-serial chip which is powered even when no serial communication is taking place, plus it has a power led which wastes power and a voltage regulator which is inefficient. A Pro-mini removes the usb-serial problem but not the other two. It's also a little smaller, allowing more space for batteries. Ideally you want something that will continue to run at a lower voltage as the battery fades, such as a Pro-mini 8MHz 3.3V, and avoid using its regulator by powering it directly with a battery that always provides a voltage within its allowed range.

waynewayne

Sorry for a delayed response! I agree with your thoughts and I will consider a second pair of batteries in parallel with the first (if space constraint is flexible) as well as the use of the pro-mini (which might actually be more fitting because it'll last much longer). Will tinker some more and see what comes out of it.

Anyways, I think we have been able to resolve this issue! I learned a lot in this process and am very grateful for your and everyone else's responses! Thanks everyone for your help and input!!! Consider this question resolved! :)

Go Up