PDA

View Full Version : voltage regulator or resistor for a pic?



xnihilo
- 18th August 2008, 15:41
Hello,

I have a silly question:

Why should I use a 5V voltage regulator with a 9V battery while I could use a current limiting resistor?

Thank you

Jumper
- 18th August 2008, 16:00
Let's say you have a battery (9V) and a circuit that more or less have the same current consumption over time (i.e 100 mA)

In this case you would need to burn away 4V using a resistor.... but after a while you only have 7V in your battery and then you would need a different resistor value .....

Or your circuit sometimes uses 2 mA (then you need one value) and then suddenly you shoot your IR LED and draw 200 mA .... then you would need a new value...

So.. by having a voltage regulator you would always have the correct output voltage no matter what, as long as you stay inside the datasheet for the component.

Look at a LM7805, it will require from 20V to 7V as the battery voltage to provide 5V out at 1A loads.

xnihilo
- 18th August 2008, 16:14
Let's say you have a battery (9V) and a circuit that more or less have the same current consumption over time (i.e 100 mA)

In this case you would need to burn away 4V using a resistor.... but after a while you only have 7V in your battery and then you would need a different resistor value .....

Or your circuit sometimes uses 2 mA (then you need one value) and then suddenly you shoot your IR LED and draw 200 mA .... then you would need a new value...

So.. by having a voltage regulator you would always have the correct output voltage no matter what, as long as you stay inside the datasheet for the component.

Look at a LM7805, it will require from 20V to 7V as the battery voltage to provide 5V out at 1A loads.

Right, thank you for your answer.
In fact I am already using a L7805 voltage regulator, a TO-220 with its nice huge heatsink for my PCB but yesterday when I tried to insert all components on the board I noticed this TO-220 is a little bigger than I first estimated when I drawed the PCB, so to fit on my PCB I have to skew the leads of the two neighboring resistors, this is not very professional. I thought of replacing it by the smaller TO-92 (LM75L05) but this component gives 'only' 0.1A while the L7805 gives 1A.
I quickly checked the current needed for the components on the board. Everything is fine except when I turn of the LCD backlight (7*10mA) then 100mA won't be enough. That's why I wanted to use a LM78L05 for everything on the board but for the LCD backlight supply and use a current limiter between 9V battery and the LCD backlight anode.
But when the battery is weakening, I might have a problem. Is it a real problem? The LCD light up very shortly from time to time. You see?

skimask
- 18th August 2008, 17:02
Right, thank you for your answer.
In fact I am already using a L7805 voltage regulator, a TO-220 with its nice huge heatsink for my PCB but yesterday when I tried to insert all components on the board I noticed this TO-220 is a little bigger than I first estimated when I drawed the PCB, so to fit on my PCB I have to skew the leads of the two neighboring resistors, this is not very professional. I thought of replacing it by the smaller TO-92 (LM75L05) but this component gives 'only' 0.1A while the L7805 gives 1A.
I quickly checked the current needed for the components on the board. Everything is fine except when I turn of the LCD backlight (7*10mA) then 100mA won't be enough. That's why I wanted to use a LM78L05 for everything on the board but for the LCD backlight supply and use a current limiter between 9V battery and the LCD backlight anode.
But when the battery is weakening, I might have a problem. Is it a real problem? The LCD light up very shortly from time to time. You see?

Put the resistors on the opposite side of the PCB?
Replace the TO-220 w/ TO-92? Try it. Worst that'll happen is it overheats and shutsdown.
LCD backlight - why not dedicate a pin and a transistor to PWM'ing the backlight. Probably won't use all of that 100mA. And that is a big backlight. Most of mine don't draw much over 20mA. Is it bright? Like really bright? Maybe you need to increase your backlight current limiting resistor.

xnihilo
- 18th August 2008, 23:06
No available PWM enabled pin, that's my usual problem (I might use a LM555).
I can reduce the current to the LCD backlight leds, right.
Thank you.

Archangel
- 18th August 2008, 23:51
No limit to the number of 5v regulators you can use, use a TO92 reg for each PIC and LCD backlight. Put them anywhere on the board you want to.

xnihilo
- 19th August 2008, 08:41
No limit to the number of 5v regulators you can use, use a TO92 reg for each PIC and LCD backlight. Put them anywhere on the board you want to.

Yes, I didn't think about that. Good idea :) Thanks

skimask
- 19th August 2008, 15:15
No limit to the number of 5v regulators you can use, use a TO92 reg for each PIC and LCD backlight. Put them anywhere on the board you want to.

There ya go. They're small enough, you could 'deadbug' them all over the place.

As far as driving the backlight, yes, you should be able to increase the current limiting resistor value to decrease the backlight down to a more manageable level.