Battery Powered Arduino Issues

Hello everyone,

I'm having trouble deciding how to power an Arduino Pro Mini via batteries.

CURRENT SITUATION

Before getting into the issue, I'm going to describe the situation.

I have access to a locker -which is not on my property- and I would like to automate it, I have permission to do it, using a RFID reader, specifically the famous RC522 which, once triggered, would make an Arduino move a servo attached to it in order to open the lock mechanism.

The opening/closing process would take place 2 times a day. One in the morning and one in the afternoon. And normally it would take approximately 1 min each, so 2 min in total/day. After the process ended, the Arduino would enter a Deep Sleep mode, waiting to be woken up by a push button which acts as an interrupt. So, in a nutshell, 23hr 59min in Deep Sleep mode and 1 min of work per day, 24/7 365.

THE PROBLEM

Now it the problem comes. I'll explain myself.

In order for this contraption to function properly, the Arduino needs to handle both 5v and 3.3v voltages since the RC522 works at a voltage of 3.3v with a maximum input of 3.6v whilst the servo works at 5v. (I know that there are 3.3v servos but after buying one and testing it, I've come to the conclusion that this kind of low-power servos don't have enough torque to even move a normal door latch). Furthermore, I need the design to be compact, so I thought about using an Arduino Pro Mini for the job since it offers both 5v and 3.3v versions.

I DO NOT have access to a power outlet, which means that the device has to be battery operated, so that adds to the list of problems to solve.

So, now the problem is to use both 5v and 3.3v voltage values in the same board while maintaining a low power draw from the battery.

If we take a look at this image regarding powering the Arduino on batteries for a long period of time we can see that removing the voltage regulator saves a lot of energy, so I was planning on doing that, but if the regulator is removed, the pins will output the same voltage that it's being given on the input, if I'm not mistaken, which means that, if I use an 18650 battery as the power supply, the RC522 will burn when the battery is fully charged at 4.2v.

So I thought about using three AA batteries in series, with a voltage of 4.5v to power up a 5v Arduino and so the servo (That has a working voltage of 4.8v -good enough-) without the voltage regulator and also using a step-down module to get the voltage to 3.3v for the RFID chip.
Obviously, in order to save power while the system is asleep, I'd use a couple of 2n2222 transistors to cut the power to both the RFID chip and the servo while they're not being used.

PROBLEMS TO SOLVE

  • Deciding the type of battery that should be used. (I have access to a lot of 18650s batteries, but I've heard that they're not the best in terms of continuous work for long periods of time since they tend to self-discharge)
  • Determining whether it's better to get a 5v Pro Mini or a 3.3v one.
  • Knowing how much battery life I can expect, preferably more than a year.

I would appreciate your help and ideas. All ideas are welcomed. Feel free to recommend different types of batteries, etc...

Thanks a lot in advance,
Alex

If you're going to have a button, might as well make it a power switch and save yourself a lot of hassle. There are numerous cheap rfid solenoid systems out there as well for this job. I don't see the point of an Arduino and less so the idea of using a servo as you never know what position it will be in upon powering on or off.

I can't modify the existing locker, as I said it's not mine. I have a running system. The code was written some time ago and it only needs some tweaking.

As per knowing the position of the servo. Whenever the Arduino boots up it goes to 0º, which means closed. So whenever it gets woken up it moves the servo back to 0º, which in fact does nothing because the last time that the door was closed, it was already sent to 0º before going into deep sleep.

As I said in the post, an Arduino in deep sleep mode draws almost no power, some uA, which is way less than what a rf relay, for instance, would draw just by having its rf antenna/mcu enabled.

Thanks for your reply,
Alex

INTP:
If you're going to have a button, might as well make it a power switch and save yourself a lot of hassle. There are numerous cheap rfid solenoid systems out there as well for this job. I don't see the point of an Arduino and less so the idea of using a servo as you never know what position it will be in upon powering on or off.

I cannot make it a power switch because the locker is located in a very busy place where people rest against it on a daily basis. It would always be on. That's why I coded a timer in the code which goes back to sleep if no card is detected after 20s.

You said there would be a wake button, which somehow doesn't pose the same problem as an identical power button or switch?
You missed the point about knowing where the servo is. Will you be constantly giving it power 24/7 to keep it in position? Obviously not, so how are you planning on controlling power to the servo?
Have you considered how strong a servo needs to be to operate the latch?

INTP:
You said there would be a wake button, which somehow doesn't pose the same problem as an identical power button or switch?
You missed the point about knowing where the servo is. Will you be constantly giving it power 24/7 to keep it in position? Obviously not, so how are you planning on controlling power to the servo?
Have you considered how strong a servo needs to be to operate the latch?

It's a wake-up button to get the Arduino out of sleep mode when it's only drawing a few uA.

I've tried using a button to power the Arduino up and then have it sustain its own power until it finishes opening/closing the servo and kills itself, but just the boot process took like 10-15 secs until the MCU could auto-maintain itself. That's a lot of time wasted. I want the system to be quicker than having to open it with a key, and if I do what I think you mean it takes forever just to be able to process the card. If I have it sleeping 23hr 59min it draws little to no power at all, just look at the chart above. It's 0.0045mA vs the 10-15mA that it requires to do the boot up. If the power draw is so small during deep sleep, I don't care to have it on 24/7 if it wakes up instantly vs. having to wait for a good 10-15s.

About powering up the servo:

I said it in my first message, I'm using a 2n2222 transistor to isolate the servo from the power rails whenever it's not in use. One thing about the deep sleep is that, as I said, it reboots the Arduino each time to wake it up, so in each reboot it goes back to 0º, the closed position, which shouldn't do anything because it latched the last time the door was closed so it shouldn't have moved from 0º.

A cheap tower pro 9g has enough torque to move a normal latch without a problem since it's not a tight fit, it just has to slide it in.

very off the wall suggestion. How big is the locker? can you use a motorcycle Batt?

Guess you got lucky and got a cheap servo that doesn't twitch on powering up or down. Or you don't have one yet and still don't understand.
I'm guessing since you said "each reboot it goes back to 0º, the closed position, which shouldn't do anything because it latched the last time the door was closed so it shouldn't have moved from 0º." that you still don't get it.
Try it and see.

LandonW:
very off the wall suggestion. How big is the locker? can you use a motorcycle Batt?

The locker is standart sized. Like this one

No, I cannot use a motorcyle battery. Plus, it needs to be small. I can't have wires stuck to the walls...

INTP:
Guess you got lucky and got a cheap servo that doesn't twitch on powering up or down. Or you don't have one yet and still don't understand.
I'm guessing since you said "each reboot it goes back to 0º, the closed position, which shouldn't do anything because it latched the last time the door was closed so it shouldn't have moved from 0º." that you still don't get it.
Try it and see.

I've run a couple of tests without a problem, I have ever run the servo under its operating voltage (from a 3.3v source) and even though it didn't have that much torque it worked pretty fine. With that being said, it's true that when I ran some tests having the arduino take control of its own power, whenever the servo wanted to move, the whole thing turned off by itself. Maybe because of the amount of transistors needed to do it. That's why I prefer the Deep Sleep.

What happens when your device fails? How would you get into the locker?
Do you even know what a motorcycle battery looks like? There is literally no reason other than ignorance that you would say you can't use it. What battery solution are you using, then? SLA like the motorcycle battery is a pretty good option for sitting around keeping charge.

Just use 2 18650 in series. I don't think the Arduino takes 10-15s to boot. Which means it's the RFID that makes the trouble

Jabberwock:
Just use 2 18650 in series. I don't think the Arduino takes 10-15s to boot. Which means it's the RFID that makes the trouble

If I use 2 18650 in series that gives me around 8.4v when fully charged, which in case of removing the voltage regulator (which reduces the power draw by ten), would burn both the servo and the rfid chip.

INTP:
What happens when your device fails? How would you get into the locker?
Do you even know what a motorcycle battery looks like? There is literally no reason other than ignorance that you would say you can't use it. What battery solution are you using, then? SLA like the motorcycle battery is a pretty good option for sitting around keeping charge.

I'm taking into account the fact that the device could fail, but that's a designing problem. A CAD problem if you will, because I have the original key still working (I cannot alter the structure, so I'm going to design it to rest on the lock itself, so that when the fail moment comes, it will be opened with the key)

Don't worry about that. It was already solved.

Now about the motorcycle battery:
I myself own a motorcycle so yeah, I know how they look like. But in terms of a project which while sleeping draws 0.0050 mA at 3.3v or 5v, I find stupid having a 12v 4A battery hooked up to the system. It's not efficient nor elegant, and certainly it's not the best option.

If I didn't have the issue of having to use both 5v and 3.3v, with a SINGLE 18650 the device could run for more than a year, taking into account the wake ups and servo movements.

So I'm looking for a compact solution. Using small batteries, not a huge one.