# regulate 5v circuit from 4*AA batteries

Discussion in 'Microcontrollers, Programming and IoT' started by cc85, Oct 11, 2014.

1. ### cc85

16
1
Apr 25, 2013
Hi, I need to power a 5v ht1621 LCD from 4*AA batteries. This works directly from the ~6 battery supply but the circuit also has a l293dd driven stepper motor which when turned on, dimms the lcd. This is all controlled by a pic16f1847 which uses a 3.33v 1117 LDO regulator.

The PIC can work from 5v so I thought I would replace the 3.3v LOD with a 5v one.

However

From what I understand, a 5v output LDO requires an input of 5v + dropout voltage. This fits within 6v from the batteries but what about when the batteries are a bit drained, say outputting 4v. will it still work?

Also if you look at this one from Farnell, it specs a min input voltage of 2.6v. So will it output 5v if it's input voltage is say 3v? http://uk.farnell.com/texas-instruments/lm1117mp-5-0/ldo-0-8a-5v-sot-223/dp/9778209

Are there alternatives?

Thanks in advance, I have found this forum so very useful in the past year!

2. ### davennModerator

13,650
1,885
Sep 5, 2009
no it wont ... cuz you lost the dropout amount ( you need more than 6V

again ... no it wont ... you need 6.2 or more to get 5V out

cheers
Dave

3. ### cc85

16
1
Apr 25, 2013
thanks, for the fast reply! I understand, I thought that would be the case. Why specify min input 2.6v then? I must be missing something.
So are there biasing options so that the stepper doesn't dim the LCD?

4. ### davennModerator

13,650
1,885
Sep 5, 2009
cuz if you add appropriate resistors you can adj the output or have a fully adjustable output
The minimum output voltage is 1.25V so the minimum input voltage needed to achieve that is 1.25 out + 1.2 Vdrop as an absolute minimum.

D

16
1
Apr 25, 2013
6. ### KrisBlueNZSadly passed away in 2015

8,393
1,270
Nov 28, 2011
A buck switching regulator can't produce more output voltage than its input voltage, and they also have a dropout voltage. Some buck regulators that are designed to generate low-voltage supplies for processor cores have pretty low dropout voltages though.

I guess it's the backlight on your LCD that is dimming noticeably, right? What is the backlight voltage? What is the LCD controller's supply voltage? Could you power both of them, and the PIC, from the same 3.3V supply?

You could supply the stepper motor driver from unregulated 6V, and it would dip when the motor is operating, but supply everything else from an LDO at 3.3V. If the LDO has a dropout voltage of, say, 0.5V with that amount of load on it, then the battery could dip as low as 3.8V before anything else would be affected.

7. ### (*steve*)¡sǝpodᴉʇuɐ ǝɥʇ ɹɐǝɥdModerator

25,412
2,779
Jan 21, 2010
Look for a "low dropout" regulator.

Depending on your current requirements, they can have a minimum dropout voltage of 0.2V or even less.

These can be a little unstable so you need to VERY CAREFULLY read the specifications regarding input and output capacitance.

Another issue is that as the 1.5V batteries discharge their terminal voltage will fall. At some point it will fall enough that the regulator will cease to be able to supply 5V.

8. ### cc85

16
1
Apr 25, 2013
Thanks Kris and Steve, The pic is running from a 3.3v LDO (low drop out regulator) and the stepper is coming directly from the batteries. The LCD backlight runs of 3.3v fine, its actually the LCD vdd and contrast pin that requires 5v. 3.3v makes it too dim to see except at extreme angles. I will be trying a 5v LDO to replace the 3.3v one. Though I am concerned about battery life this way.

So in the mean time I am looking for alternatives.

9. ### Colin Mitchell

1,417
312
Aug 31, 2014
Because your 6v to 5v is so difficult, I am going to suggest an amazing thing:
Buy a 6v to 3v3 for \$2.00 post free and a step-up to 5v for a few dollars, and you're set.

AMS1117 DC-DC Step-Down Power Supply Voltage Regulator Adapter \$2.00 post free
Input: DC 4.5V--7V (input voltage must be greater than the output voltage high above 1V.)
Output: 3.3V, 800mA

Mini PFM Control DC-DC USB 0.9V-5V to 5V dc Boost Step-up Power Supply Module \$1.10 post free.

Last edited by a moderator: Oct 13, 2014
10. ### cc85

16
1
Apr 25, 2013
I have found that if I reduce the current that the stepper draws, the less of a dimming effect on the LCD when the stepper is turned on. This solves a vibration issue and still provides enough torque for its application.

I have reduced the current using two ways:
1) A10ohm resistor between the L293DD (stepper driver) motor + supply and the battery 6v +.
2) Two diodes that provide the voltage drop to in turn reduce current into the stepper.

Now the resistor gets very how so I would need a higher power rating which gets expensive for SMD.

The diodes don't get so hot and look like the better option.

Does anybody have advice on which to use or any other/better ways to reduce current into the stepper?

Please bare in mind that this is all surface mounted and cost should be minimum.

11. ### KrisBlueNZSadly passed away in 2015

8,393
1,270
Nov 28, 2011
It's not a good idea to interrupt the supply to the IC. Better to connect the resistors in series with the stepper motor. If that means more than one resistor, each one will dissipate less power than the original single one, so you may be able to use smaller resistors.

If not, you can still connect two or more resistors in series or parallel to increase the power handling capability without needing larger resistors.

A better option would be to use a stepper motor with higher winding resistance, i.e. one rated for slightly higher voltage and/or slightly lower power.

12. ### cc85

16
1
Apr 25, 2013
Thanks! I now have 500mW 10ohm resistors in series with the stepper coils and everything works great. The resistors dont get hot, the LCD doesn't dim when the motor is turned on (unless the batteries are running low). And the motor runs at the correct torque.

KrisBlueNZ likes this.