Author Topic: Getting stable voltage from dodgy battery  (Read 4711 times)

0 Members and 1 Guest are viewing this topic.

Offline sean87Topic starter

  • Regular Contributor
  • *
  • Posts: 150
  • Country: nl
  • EE WannaBee
    • EMBEDONIX
Getting stable voltage from dodgy battery
« on: December 11, 2012, 08:24:46 pm »
I am doing some progress on my roomba project. Roomba has a 20 volt battery that is a bit dodgy. When it motors turns on/off there is slight voltage drop.

I want to power a pic microcontroller using this battery so I need or atleast I want a stable voltage source for it. I came accross this idea:



Now my question is, does the 1N4007 and 470uA/25V cap do any good toward what I am trying to do? If not, should I remove them? Should I replace with another components?

If I am totaly wrong, can you please tell me how can I get a stable voltage? What I mean is just for learning porpuses I want to filter the voltage before the LM7805...I know that LM7805 will take care of voltage drop to some degrees.
EMBEDONIX - Embedded Systems, Linux and good stuff!
 

Offline PA0PBZ

  • Super Contributor
  • ***
  • Posts: 5121
  • Country: nl
Re: Getting stable voltage from dodgy battery
« Reply #1 on: December 11, 2012, 08:50:08 pm »
Why do you think a diode would do anything to stabilize the voltage?
What voltage drop are we talking about when the motor turns on?
Keyboard error: Press F1 to continue.
 

Offline sean87Topic starter

  • Regular Contributor
  • *
  • Posts: 150
  • Country: nl
  • EE WannaBee
    • EMBEDONIX
Re: Getting stable voltage from dodgy battery
« Reply #2 on: December 11, 2012, 08:58:08 pm »
I though to put the diode there to prevent damage to the battery if something went wrong in my microcontroller board. just in case! Does it hurt? or I can safely remove it?

Voltage drop is 3 to 4 volts and happens a lot because the motors turn on/of when roomba moves left right or changes direction or while it turns on its cleaning motors.
EMBEDONIX - Embedded Systems, Linux and good stuff!
 

Online Mechatrommer

  • Super Contributor
  • ***
  • Posts: 11541
  • Country: my
  • reassessing directives...
Re: Getting stable voltage from dodgy battery
« Reply #3 on: December 11, 2012, 09:10:35 pm »
I though to put the diode there to prevent damage to the battery if something went wrong in my microcontroller board. just in case! Does it hurt? or I can safely remove it?
your 1n4007 will prevent damage to the 7805 in case you connect the battery polarity wrong, leave it there you circuit looks ok to me. its unlikely the mcu board will damage your 20V battery ;)
Nature: Evolution and the Illusion of Randomness (Stephen L. Talbott): Its now indisputable that... organisms “expertise” contextualizes its genome, and its nonsense to say that these powers are under the control of the genome being contextualized - Barbara McClintock
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 4984
  • Country: ro
  • .
Re: Getting stable voltage from dodgy battery
« Reply #4 on: December 11, 2012, 09:26:11 pm »
The diode would just protect the circuit in case you connect the battery the other way around.
Without it, if you connect the battery the other way around, you'd pop the capacitor due to reverse polarity.

The diode has a voltage drop of about 0.6-0.8v , so your battery becomes a 19.4v battery

An 100-220uF 25-35v should be enough in front of the linear regulator, and I would add a 100-220uF 10-16v capacitor after the regulator, dropping the 0.1uF ... you'd have one 0.1uF capacitor by the microcontroller.

The 7805 needs about 2.5-3v above the 5v to function properly and output 5v, so the battery in the worst case would have to give 8v . As you say there's a drop in voltage of about 3-4v, the battery would then have to be at least 12 volts.

If the battery goes that low during regular use, you may consider going for a better low voltage drop regulator, there are some that only need about 0.5v above 5v to work right. For example LM2931  springs to mind, it's just as simple to use as that 7805
 

Offline sean87Topic starter

  • Regular Contributor
  • *
  • Posts: 150
  • Country: nl
  • EE WannaBee
    • EMBEDONIX
Re: Getting stable voltage from dodgy battery
« Reply #5 on: December 11, 2012, 09:51:17 pm »
The diode would just protect the circuit in case you connect the battery the other way around.
Without it, if you connect the battery the other way around, you'd pop the capacitor due to reverse polarity.

The diode has a voltage drop of about 0.6-0.8v , so your battery becomes a 19.4v battery

An 100-220uF 25-35v should be enough in front of the linear regulator, and I would add a 100-220uF 10-16v capacitor after the regulator, dropping the 0.1uF ... you'd have one 0.1uF capacitor by the microcontroller.

The 7805 needs about 2.5-3v above the 5v to function properly and output 5v, so the battery in the worst case would have to give 8v . As you say there's a drop in voltage of about 3-4v, the battery would then have to be at least 12 volts.

If the battery goes that low during regular use, you may consider going for a better low voltage drop regulator, there are some that only need about 0.5v above 5v to work right. For example LM2931  springs to mind, it's just as simple to use as that 7805

Thanks for reply.

So you mean 470uF is big?  And by "Front of the linear regulator" I assume you mean between output and ground of regulator?
EMBEDONIX - Embedded Systems, Linux and good stuff!
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 4984
  • Country: ro
  • .
Re: Getting stable voltage from dodgy battery
« Reply #6 on: December 11, 2012, 10:03:05 pm »
I meant front as in how it's drawn on the picture ... front  is left side, everything before the input pin...  after is the the right side , everything connected at the output pin of the chip and so on.

470uF is a bit much, especially if the microcontroller only uses a few mA to operate. It's not bad to use it, just kind of pointless, too much  for your needs.
 
 

Offline MartinX

  • Regular Contributor
  • *
  • Posts: 111
  • Country: se
Re: Getting stable voltage from dodgy battery
« Reply #7 on: December 11, 2012, 10:44:24 pm »
And the diode will also prevent the motor current that causes the voltage drop to discharge the 470µF capacitor, keeping the voltage to the 7805 more stable, increasing the capacitance will only improve the ability of the 5V supply to sustain its voltage in the presence of dips in the battery voltage. I am not sure how the diode will prevent damage to the battery if something went wrong in the microcontroller board. Put a fuse in there or a polyfuse, batteries can deliver a lot of current that can set fire to things.
« Last Edit: December 11, 2012, 10:53:39 pm by MartinX »
 

Offline IanB

  • Super Contributor
  • ***
  • Posts: 11793
  • Country: us
Re: Getting stable voltage from dodgy battery
« Reply #8 on: December 12, 2012, 01:04:32 am »
I would add a 100-220uF 10-16v capacitor after the regulator, dropping the 0.1uF

The data sheet does not say to do this. It is not helpful and may even be harmful. Put 0.1 uF on the output of the regulator as advised. Generally speaking, big capacitors go on the input side of regulators, not the output side.
 

Offline ivan747

  • Super Contributor
  • ***
  • Posts: 2045
  • Country: us
Getting stable voltage from dodgy battery
« Reply #9 on: December 12, 2012, 01:38:37 am »
I don't think there's a need for a fuse. The 7805 has over-current protection on its output. He just has to be careful not to short the + and - before the regulator (left side).
 

Offline mariush

  • Super Contributor
  • ***
  • Posts: 4984
  • Country: ro
  • .
Re: Getting stable voltage from dodgy battery
« Reply #10 on: December 12, 2012, 03:58:31 am »
I would add a 100-220uF 10-16v capacitor after the regulator, dropping the 0.1uF

The data sheet does not say to do this. It is not helpful and may even be harmful. Put 0.1 uF on the output of the regulator as advised. Generally speaking, big capacitors go on the input side of regulators, not the output side.

If we're going strictly by the datasheet, the 7805 does not require ANY capacitors on the output side. Most datasheets only say that if the device powered by the 7805 is a few cm away from it, then you should use a 0.1uF capacitor or something close to that value.

However, other linear regulators do require a capacitor on the output side, usually 1uF or 10uF being the recommended values (or a capacitor having esr below 1 ohm), and since having one doesn't really hurt that much, I found it a good habit to use one.

For example, just browsing through some digikey low voltage drop regulators page ...

lm317 recommends 1uF for improved transient response (http://www.ti.com/lit/ds/symlink/lm317l.pdf),
LP295x requires 1uF or better for stability (http://www.ti.com/lit/ds/symlink/lp2950-n.pdf),
LM2941 requires a capacitor " with a minimum capacitance value of 22 ?F, and ESR in the range of 0.01? to 5?, is required at the output pin for loop stability. It must be located less than 1 cm from the device. There is no limitation on any additional capacitance. " (http://www.ti.com/lit/ds/symlink/lm2941.pdf)
lm138/lm338 : " A 1 ?F solid tantalum (or 25 ?F aluminum electrolytic) on the output swamps this effect and insures stability " (http://www.ti.com/lit/ds/symlink/lm138.pdf)
lt1121 : " designed to be stable with a wide range of output capacitors. The minimum recommended value 1µF with an ESR of 3? or less." (http://cds.linear.com/docs/Datasheet/1121fg.pdf)

enough... and like I said, this is just random regulators from the first two pages of digikey's low drop regulators section.

I'm using (and therefore said) 100-220uF because in general, good capacitors of that value and 10-16v rating, have esr below 1ohm but still big enough not to cause instability or other problems (for example LM2941/MIC2941 can be unstable if the capacitor has <0.2 ohm esr and you pull less than 1-200 mA of current)


 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf