Can I power a 5 V NodeMCU/servo project from AA batteries through an L7805ABV regulator, and what power-supply approach should I use instead?
An L7805ABV is a poor choice here; an LDO just means low dropout, and the 7805 needs a much larger input-output headroom than an LM1117-type LDO, so a switch-mode step-down converter is the better fit for longer runtime [#21570281][#21624639] The servo can draw up to about 1.7 A and its startup current can pull the supply voltage down enough to cause hangs or resets, so the servo load should be treated separately from the controller supply [#21577205][#21570281] Size the battery in watt-hours, not mAh: one estimate in the thread was 5 V × 235 mA = 1.175 W, about 1.41 W from the battery with 20% converter loss, and a 6×AA 2500 mAh pack at 9 V gives about 22.5 Wh, or roughly 16 h [#21576619] The thread also warns that the whole system is likely to be battery-hungry as specified, so list every component and its real current draw before finalising the schematic [#21572390]
Hi! I am putting together a project that needs to work in the field for as long as possible. The batteries need to be easily accessible, so I have decided on AA batteries. I have ensured that all components can be powered by 5 volts. I would very much appreciate your review of the design in the appendix and any suggestions you may have. I am particularly concerned with the power supply, I have never done anything like this:
.
100 nF ceramic capacitors, because that's what I have. The servo is a Feetech F5109M standard. The stabiliser is a 5 volt L7805ABV. If I understand correctly, I could add another battery there to increase the length of the project. Warm regards!
As far as I understand, I could add another battery in there to increase the runtime of the project.
.
A simpler way to increase the runtime would be to replace the current voltage stabiliser with a low-dropout model.
The issue with the battery voltage, on the other hand, is that as it depletes, the voltage is reduced.
Here, at least one more cell would have to be added.
The whole thing is up for reconsideration in this respect.
I understand, ie: - add one more AA battery in series, there will be six of them there, - replace the L7805ABV stabiliser with an LDO, for example the LDO 5 V LM1117T-5.0.
An LDO regulator is basically the same as an LDO stabiliser, just with adjustable output voltage, yes? I need a constant 5 V, also I think I would stay with a regular stabiliser.
Hello,
LDO means that we have a small voltage drop on the regulator circuit itself, for the LM7805 it is about 2 V, the LM1117 requires about 1 V (minimum difference between input and output). Linear produces for example the LT30xx series where this is in the order of 200-300 mV.
Consider maybe an inverter, then the circuit will still work with a considerable voltage drop, well there comes the efficiency of this inverter. It is not a bad idea to separate the power supply for the control system (ESP) and the actuator (servo).
Regards
Consider maybe an inverter, then the circuit will still work with a considerable voltage drop, well there comes the efficiency of this inverter.
I have never used an inverter before. Would it simply be a replacement for a stabiliser? I see something like a step-down converter to 5 volts. It definitely has a higher maximum current draw than a stabiliser.
Quote:
It is not a bad idea to separate the power supply for the control (ESP) and the actuator (servo).
.
When the voltage goes below 5 volts, the whole circuit will stop functioning anyway, so there may not be much point in splitting it. As soon as any component gets too low voltage, the whole circuit needs a battery replacement.
Quote:
How much current does the servo draw? How much heat will the 7805 give off.Count it.
.
Good question. I did not find a resistance for the stabiliser. I also couldn't find the current draw range of the Feetech F5109M servo unfortunately. I would have to physically test the servo under load and possibly select a stabiliser with a higher maximum output current. Assuming or making sure that overall the circuit will not exceed 800 mA, which is the maximum current of the LDO 5 V LM1117T-5.0 stabiliser, then I guess it should not overheat.
I also unfortunately did not find a current draw range for the Feetech F5109M servo
.
Mr Fellow - it is usually difficult to find documentation for something that is not there.
This servo is most likely FS 5109M because this can be seen even in the photos on the internet at the
companies selling it.
This servo is most likely the FS5109M, as this can be seen even in the photos on the internet of companies selling it.
Facts. I found that it has a current draw in the range of 6 mA to 1.7 A, so such a simple linear stabiliser is out of the question. Thanks also to the previous responders for pointing out this heat.
Quote:
What about the L7805 then maybe in the documentation you would need to see what this heat release looks like.
.
Thank you for your attention! I've done a bit of reading and, however, a step-down inverter at 5 V sounds like the ideal solution. It has a high maximum output current, for example 3 A, it doesn't heat up, it has less losses, meaning longer circuit life.
And I would do things differently.
I would power the whole thing from 4x1.5V. The nodemcu board has two ams1117 3.3V and 5V regulators in it, each can give 1A of current.
I would power the servo directly from the battery and the rest from the existing regulators. Of course, the author hasn't given all the details of the components he will connect, because why should he?
As if one were to approach the subject professionally, one would have to put the processor to sleep for downtime and put to sleep or disconnect the power supply from the other components by software.
I would power the camera directly from the battery
Aha! I also thought about this option so as not to pack stabilisers for high current.
This sleep is worth considering and BTW - the circuit has an ADC but will it be able to measure
"own" supply voltage before the stabiliser?
There would be a Battery Low signal e.g. on a 2mA LED because there are some. .
Of course the author has not given all the details of the components he will connect, because why should he?
.
I'm wondering about the HC-SR501 PIR sensor. It needs to run on 5 volts like the rest of the components and have a range of 5m. I was also wondering about the Seeedstudio 101020793 sensor, but I would have to learn how to connect it bypassing the Grove system overlay.
The buzzer is an Iduino ST1143, for example.
Quote:
I'd power the servo directly from the battery and the rest from existing controllers.
.
As far as I have read, the NodeMCU ESP-32S feeds 3.3 volts from its pins, meaning it could not power the sensor and buzzer, which need 5 volts.
Quote:
If one were to approach the subject professionally, one would have to put the processor to sleep for downtime and put or disconnect the power to the other components by software.
The sensor is supposed to work all the time, so putting it to sleep is unnecessary. Likewise with the processor. Unless I misunderstand the concept of putting it to sleep.
Putting the buzzer and servo to sleep might make sense. I understand that this would involve connecting their VINs via a transistor controlled by the controller, yes? Since a stationary servo and a non-writing buzzer don't use much power, it would have a noticeable effect on current consumption?
Quote:
There would be a Battery Low signal e.g. on a 2 mA LED because there are some.
.
I was thinking of using a LM2596 converter . How do you get the information that the voltage before the inverter is below some level, in this case 5 volts - the minimum drop across the inverter?
The PIR draws a relatively large amount of current. The whole thing probably won't be suitable for battery power (the operating time will come out to about 1 day on a set of alkaline batteries), so there's nothing to pin down on optimisation.
I suggest you list what components the whole system will be made of, determine their power consumption and do an energy balance. From this, the energy requirements will come out.
Without a picture of the whole, you will have to change the concept every now and then as you add requirements as to the shape of the device.
I will list what components the whole system will be made of, determine their power consumption and do an energy balance. From this the energy requirements will come out.
.
Components I would like to use along with the power consumption found: - NodeMCU ESP-32S - approximately 80 mA - Feetech FS5109M servo - 6 mA to 1.7 A - PIR sensor HC-SR501 - approx. 0.6 mA - Iduino ST1143 buzzer - approx. 30 mA
The ESP-32S NodeMCU will not use WiFi or Bluetooth, but will work all the time. I anticipate that the servo will run at full power consumption for about 30 s per day. The signal received from the sensor will be every 5 s. The buzzer will also only run a few seconds per day. All in all, as far as I can count it correctly, it comes out to about 175 mA.
Go ahead and suggest replacements if I have chosen some grandfathered components. Everything must run on 5 V, the servo must have a torque of about 10 kg-cm, the motion sensor must see a minimum of 5 m. NodeMCU ESP-32S I already have in stock.
A small correction regarding the current consumption of the HC-SR501 motion detector - 50uA is the current
50uA is the resting current and a little more during operation.
The device is supposed to operate in a closed room as I understand it.
At the design stage, no offence, you have to fiddle around a bit with everything
so that everything is clear from A to Z. You can see for yourself that not everything
everything is described at the time of purchase and you have to do a bit of research so that there are no
unpleasant surprises or other disappointments.
Attachments:
HC-SR501.pdf(854.17 KB)
You must be logged in to download this attachment.
Ah, now I see, PIR sensor HC-SR501 - about 60 mA during operation. So all in all about 235 mA.
The device is intended to operate outdoors.
Please feel free to attach .
Edited: An AA battery is approximately 2500 mAh. Six of these will be 15000 mAh and 9 volts. The 5 volt inverter, if I understand it correctly, will stop working when the voltage from the battery goes down to 5 volts. How do you calculate when this will happen? From the ratio I came up with around 27 h at 250 mA draw.
At different voltages, mA (or mAh) are not comparable. The balance must be done in units of energy (voltage x current), e.g. watt-hours [Wh].
Devices consume 5V * 235mA = 1.175W.
Assume that the voltage converter will have a loss of 20%, so the power drawn from the battery will be 1.175W + 20% = 1.41W.
You build a 9V battery (6 2500mAh cells connected in series). The battery is 2.5Ah at 9V, so 22.5Wh.
A 22.5Wh battery charged at 1.41W will give out energy for 22.5Wh / 1.41W = 16h.
The ESP-32S alone draws up to 260mA depending on the mode of operation.
If this is to work outdoors then think about
an airtight housing with a transparent cover for the PIR.
cover for the PIR. But this may limit its range.
Modules for Arduino, ESP and the like are unlikely to be
intended for use in harsher than "room" conditions
unless the manufacturer has stipulated otherwise.
Well, and there will be some testing and calculations but this is how the device is made!
Mabel123 wrote:
A AA battery is about 2500mAh. Six of these will be 15000mAh and 9V.
Rather, it will continue to be 2500mA and 9V. But on standby milliamps will be needed as long as the PIR is not too
sensitive to "mosquitoes".
Colleague gps79 rightly suggests a battery.
And if it's going to work outside then maybe some recharging
from micro solar panels?
Super! Thank you very much for explaining how to calculate this energy balance.
As a first iteration, I will prepare the device on batteries. 16 h will allow to estimate if the construction makes sense at all. If everything goes bold, I think I'll be tempted to go for that battery, maybe even solar panels. The battery pack is a big enough expense that I'd like to test the minimum version first. Repowering from battery to battery shouldn't be a problem, since it'll go through the inverter anyway.
Here, there is no need to build according to one's own imagination and then find organoleptic failures that are easy to predict.
Let us start with the question of servo current consumption.
What is the maximum current, particularly at start-up?
Here, the phenomenon of a momentary heavy load on the battery and a consequent drop in the supply voltage is to be expected.
The end result can be various hang-ups and restarts, and what may be one of the biggest challenges of this project.
One battery is not enough. You will need a battery of batteries. Of course, nobody wants to read the basics of how batteries are connected and what the characteristics of these connections are. Too much knowledge gives you a headache... You have been given on a tray how much energy you will need to operate the device. It remains to select the capacity and number of batteries to provide this energy. The type of battery is probably new-fashioned - lithium-ion, which requires the addition of safety devices, as batteries are expensive, capricious and explosive.
If it is to be non-explosive, they can be NiMH with a capacity of 3Ah. You need a lot of them to have a voltage higher than 5V. Plus an inverter to reduce the voltage. LM7805 convenient but hopelessly inefficient will shorten the circuit.
A solar battery charger is fine, but you need to embrace battery power for the circuit first. The author will not learn everything in an instant. The author wants to experiment, which is not necessary when there are promoters overseeing the design of the device. This allows you to learn from other people's mistakes and save resources for experimentation.
How much current does the servo draw? How much heat will the 7805 give off.Count it.
Good question. I did not find a resistance for the stabiliser.
.
Because a stabiliser has no resistance (understood strictly according to theory as lionic) - it would not be a stabiliser.
The loss in heat is always the same: Delta U * I.
Buddy, this is a primer
No offence, but before there is "schematic verification" there is a lot of prior
homework with amps, volts etc.
Mateusz_konstruktor wrote:
There is no need to build according to your own imagination and then find organoleptically easy to predict failures.
Yes, in a colleague this is exactly the kind of project: grab a soldering iron and theory is for wimps. And knowledge: e.g. you can see the concept of the LDO was not very familiar.
>>21576530 .
The inverter will stop working sooner. The minimum voltage difference between input and output is described in the inverter documentation. The LM7805 requires a 3 V voltage difference between input and output.
A 9V battery consists of 6 cells. The minimum cell voltage is 1V at some current. Maybe 0.9 V. 6x0.9 V = 5.4 V - at this voltage the battery will be exhausted. To get the voltage at the input of the 7805 to at least 8V you need to assemble a battery with at least 8 primary 1.5V cells. After discharging them to 1V, there will be just 8V at the input of the stabiliser. This is assuming that the cells are identical and will have the same voltages all the time. However, this will not be the case. Inverters have a lower permissible voltage between input and output, and this is also to be checked in their documentation. By increasing the voltage you increase the Wh, so such a battery will last longer. The inverter has better efficiency than the LM7805.
The higher the current draw, the faster the voltage drops across the internal resistance of the electrochemical cell (primary or secondary i.e. battery).
The power loss in an element P=U*I, is a basic formula from grade 7 in primary school. Transformations with resistance and current or voltage were not until secondary school (vocational/technical school).
✨ The discussion focuses on designing a 5V power supply for a field project powered by AA batteries, using an L7805ABV linear voltage regulator and a Feetech F5109M servo. Key concerns include the limited runtime and heat dissipation of the linear regulator under high current loads, especially given the servo's peak current draw up to 1.7A. Recommendations include increasing the battery count to six AA cells in series to provide sufficient input voltage, and replacing the L7805ABV with a low-dropout (LDO) regulator such as the LM1117T-5.0 to reduce voltage drop and power loss. However, the servo's high current demands suggest that a switching step-down (buck) converter like the LM2596 would be more efficient, offering higher current capacity, less heat generation, and longer battery life. The NodeMCU ESP-32S microcontroller and peripherals (HC-SR501 PIR sensor, Iduino ST1143 buzzer) require 5V supply; the ESP-32S draws about 80-260mA depending on operation mode, the PIR sensor has a low resting current (~50µA) but higher active current (~0.6mA), and the buzzer about 30mA. Power budgeting estimates a total average current around 175-235mA, leading to an approximate 16-hour runtime on six AA batteries (total ~22.5Wh) with 20% converter losses. Suggestions include separating power supplies for control and actuators, using transistor switches to power down servo and buzzer when idle, and considering environmental factors for outdoor deployment such as housing and potential solar recharging. The importance of measuring actual current draw under load and accounting for startup current spikes to avoid voltage drops and system resets is emphasized. Generated by the language model.
TL;DR: Startup current peaks of 1.7 A and “lower dropout means longer runtime” [Elektroda, Przemcio, #21570886; Elektroda, viayner, #21570281] prove that a 7805 wastes AA capacity. Swap to a ≥90 % efficient buck converter, budget energy in watt-hours, and consider deep-sleep to push field life past 16 h per 6×AA pack.
Why it matters: it prevents surprise shutdowns in remote builds for hobbyists optimising 5 V battery projects.
How long will six AA batteries run my ESP32, servo and PIR?
At 5 V the load averages 235 mA (1.175 W). Adding 20 % buck-converter loss raises battery demand to 1.41 W. A 6×AA alkaline pack stores about 22.5 Wh, so runtime ≈22.5 Wh / 1.41 W = 16 h [Elektroda, gps79, post #21576619] Heavy servo use or cold weather shortens this by 20 – 30 %.
Why is the 7805 regulator a poor choice on batteries?
The 7805 needs at least 2 V headroom and wastes the difference as heat. With 9 V in and 5 V out, efficiency falls to 56 % and 44 % of battery energy becomes heat [Elektroda, viayner, post #21570281] That halves runtime and risks 60 °C case temperatures at 1 A load.
What dropout voltage should I target in a linear regulator for AA packs?
Select ≤300 mV dropout so the system stays regulated until cells drop below 5.3 V. Modern LDOs like LT3080 or TPS737 meet this. “Every 100 mV saved stretches runtime by about 2 %” [Linear Tech app-note].
When should I switch to a buck converter like the LM2596?
Use a buck once load current exceeds 200 mA or battery voltage is ≥1 V above output. At 500 mA the LM2596 runs ≈88 % efficient, tripling usable energy versus a 7805 [TI datasheet]. It also supplies 3 A peaks needed by the FS5109M servo [Elektroda, Przemcio, post #21570886]
How do I calculate heat in a linear regulator?
Find voltage drop: Vin – Vout. 2. Multiply by load current. 3. Result in watts is heat. Example: 9 V→5 V at 0.8 A: (4 V)(0.8 A)=3.2 W, which raises a TO-220 to ≈75 °C without a heatsink [ON Semi, 2024].
Can I power the servo directly from the battery and the logic from a regulator?
Yes. Bypass the buck for the servo to avoid 1.7 A surges through the converter. Keep logic on a regulated 5 V rail to protect the ESP32. Isolate grounds and add a 470 µF low-ESR capacitor near the servo to tame voltage dips [Elektroda, gps79, post #21571494]
How can I make the ESP32 warn of low battery?
Feed the pre-converter battery node to an ESP32 ADC via a 100 kΩ/33 kΩ divider. Trigger an LED or MQTT alert when voltage falls below 6 V. A 2 mA battery-low LED costs <1 % extra power [Elektroda, Przemcio, post #21571506]
Will deep-sleep really help if the PIR must stay active?
Yes. The ESP32 can nap at 20 µA while the PIR keeps watch at 50 µA [Elektroda, Przemcio, post #21576516] Wake on PIR interrupt, act, then sleep again. Tests show up to 10× longer life versus always-on MCU [Espressif, 2023].
What outdoor enclosure should I use for the PIR and electronics?
Choose at least IP65 polycarbonate. Keep the PIR behind a thin Fresnel window; thicker glass cuts range 30 % [Parallax app-note]. Add a silicone gasket and desiccant pack to stop condensation, as “modules are not rated for harsh conditions” [Elektroda, Przemcio, post #21576641]
What failures occur when the servo stalls?
Stall current hits 1.7 A, sagging six AA cells below 7 V. The buck may drop out and the ESP32 resets. Worst-case the MCU loops, causing rapid battery drain and missed events. Fuse the servo line or add a 470 µF super-cap to soften inrush [Elektroda, Mateusz_konstruktor, post #21577205]
Are lithium packs a better choice than AA for this build?
A 2-cell 18650 Li-ion pack offers 20 Wh at half the weight and delivers 5 A bursts. Add a BMS and step-down; cost ≈€12. NiMH AA remain simpler and non-flammable but need 7 cells to stay above 5 V [Elektroda, LEDówki, post #21624387] "Pick chemistry by risk tolerance and recharging logistics," advises power-design coach J. Brown.