Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Voltage regulator 230722

Status
Not open for further replies.
Hello ETO forum,

Have been working for many months
on a circuit that employs a PIR (passive infrared sensor)
HC-SR501 and a microcontroller
to turn on some bright 12v automobile back up LED lights
to illuminate small spaces in closets
or under cabinets.
Closet_ATtiny85_schematic_230720.jpg

Because the PIR and the LEDs run
on 12 volts the voltage to the
ATtiny microcontroller is knocked down to
5 volts using a linear voltage
regulator 7805.

The problem is the 7805 is overheating.
When I pulled the ATtiny85 out of
the socket the 7805 does not get
hot. But with the ATtiny MC in the
circuit the 7805 heats up quickly.
So the surmise is that
the MC is pulling more current
than the 7805 can handle.

Does this look like the issue to you?
If so do you think a 10k resistor between
the 7805 5v output and the ATtiny
and the voltage input to Attiny, pin
8, solve the problem?

The strange thing is the circuit
was run on a breadboard for several
days before designing the PCB.
The breadboard does not heat up
but the PCB does.

Last time I went to Mouser Electronics to buy some 7805 ICs
there was a notice 'This product is scheduled for obsolescence and soon will
no longer be manufactured.'
So a search has been done for linear voltage regulators , switching voltage regulators
which has brought up circuits called buck converters. And I remember long ago
and far away taking a class in DC circuits where a device called a voltage splitter
was a 12 v supply that has two resistors placed in series, 1500 ohms and 1100 ohms and
the voltage between the two resistor would be 5 volts.

If the 7805 is going into the rear view mirror, what is the best way to get from 12
to 5 volts. Efficiency is not paramount because we are not talking a large number
of amps but size and space are considerations.
Thanks.

Allen Pitts
 
Absolutely NOT the issue, the ATtiny will be taking VERY little current - and a 78L05 (100mA) regulator would be plenty more than enough for it, never mind your 1A regulator.

Can you post a picture of your construction?, linear voltage regulators require capacitors on the input and output to ensure stability, fitted close to the chip - if these are missing or too far away, then it could be oscillating, which could cause it to get hot.

Is there any reason you're not powering the HC-SR501 from the 5V rail?, which is recommended for it.
 
The thru-hole version may become obsolete, but the surface mount version continues.
This is not unique to the 7805, but many older, yet still useful devices, are evolving into SMT-only versions.
 
Hello Nigel Goodwin , schmitt trigger and the ETO forum,
Here are some photo and diagrams of the bread board and the PCB.
Closet_tiny_breadboard_photo.jpg

Closet_tiny_breadboard_photo_close.jpg

Closet_tiny_PCB_photo.jpg

Closet_tiny_PCB_photo_close.jpg

Careful comparisons of the breadboard circuit and the PCB have been conducted several times but no big differences can be found.
Closet_ATtiny_bread_board_230714.jpg


Closet_ATtiny_PCB_230720.jpg

There is a defect in this thread in that I have made the mistake addressing two issues in one thread.
Item 1. The 7805 regulator that overheats in the PCB. I have taken Nigel's recommendation to put caps on the input and output of the 7805. (I think there is one, C3, on the output. Am ordering more PCBs
so will update the PCB design w a cap on the input.)
Also a second PCB has been loaded since the first post and it's 7805
does not heat up. So I've got two circuits that operate at room temperature and one that overheats so I guess it is just a defect in the PCB or other component. The solution is to quit wasting my time on the bad PCB so I can build more closet fixtures.

To answer Nigel's question about power to the PIR: When the data sheet on the PIR was perused
it said that the operating voltage for the PR was 4.5 to 20 volts. So I figured 12 volts was closer to the median value ((20-4.5)/2)+4.5 than 5 volts. But perhaps it would be more efficient to use the lower voltage.

Item 2. On Schmitt' excellent reply about thru-hole going away: I guess I am just old school because so far I have resisted using the SMD form. I think I will have to use tweezers to hold the component in place while the teeny component is soldered onto the board.

But I still wondering if there is not a better way to skin the 12 volt to 5 volt cat. 12 volt is everywhere because of cars and trucks and 5 volt is popular in transistor and TTL systems.
So is there a better way of transitioning from 12 to 5 volts? Are there other components that will provide this function? What is the down side of using a simple voltage divider?

Thanks.

Allen Pitts
 
The reason to run the PIR from the 5 V is that the voltage is regulated, and automotive 12 V systems are very noisy. However the PIR that you linked to is an entire PIR sensor and detector, and it has it's own internal 3.3 V regulator and there's therefore no advantage of either arrangement.

Even if the 7805 regulator is no longer made in future, there will be plenty of other 5 V regulators that will work on 12 V systems. The 7805 has been around for about 50 years and there are better regulators nowadays, and few designers would use a through-hole regulator.

The ATtiny85 should consume very little current. It is driving one LED at about 1 mA and the gate of a MOSFET. The ATtiny85 itself should consume less than 10 mA. I'm not sure exactly but the data sheet will say. With so little current being taken from the 7805, it shouldn't even get warm.

Can you measure the current that the ATtiny85 is consuming?

I'm not actually understanding why you have the ATtiny85 in there at all. The HC-SR501 puts out 3.3 V, which isn't really enough to operate the MOSFET there are other MOSFETs that would work with the lower gate voltage.
 
A voltage divider CAN NOT be used to supply significant current. It won't work.

Consider the classic voltage divider circuit, R1 at the top connected to the input voltage. R2 at the bottom, connected between R1 and ground. The divided voltage is measured between the R1/R2 junction and ground.

What determines the divided voltage? It's simple Ohm's law.

Assuming no load is connected, the current through R1 and R2 WILL BE equal.

I = V / (R1 + R2)

Voltage at the midpoint to ground:

V = I × R2

If we connect some sort of load to the center point of the voltage divider, what happens? The current through R1 and R2 will no longer be equal. If the load is tiny compared to the current through R1 and R2, like a reference voltage for an op amp, the difference in current between R1 and R2 will be virtually unchanged, so the divider voltage will be almost unchanged.

What happens with a bigger load? Let's say, for easy calculations (I'm lazy), the input voltage is 12 volts, and R1 = R2 = 1k. With no load applied, the current through the resistors is the same (I = V / (R1 + R2) = 12/2000 =6mA).

So let's say we want a modest 25mA at 6 volts for the output. That's equivalent to a 240 ohm resistor in parallel with R2. The equivalent resistance: 1/Rt = 1/R2a + 1/R2b = 193 ohms.

The current through R1 and R2a||R2b is equal.

I = V / (R1 + R2a||R2b) = 12 / (1000 + 193) = 10mA.

What's the output voltage? V = I × R2t = 10mA × 193 ohms = 1.93 volts!


So ok, yes you can greatly reduce R1 and R2 so the output current becomes a small fraction of the current through the voltage divider resistors, but this wastes a lot of energy. But more importantly, the output voltage varies with load. Say you want to flash an LED with a micro. If you calculate the voltage divider based on the comparatively large LED current, when you turn the LED off and the only current draw is the micro, the voltage will increase and *pop* goes the magic smoke.
 
Hello Nigel Goodwin , schmitt trigger and the ETO forum,
Here are some photo and diagrams of the bread board and the PCB.View attachment 142179
View attachment 142180
View attachment 142181
View attachment 142182
Careful comparisons of the breadboard circuit and the PCB have been conducted several times but no big differences can be found.
View attachment 142185

View attachment 142186
There is a defect in this thread in that I have made the mistake addressing two issues in one thread.
Item 1. The 7805 regulator that overheats in the PCB. I have taken Nigel's recommendation to put caps on the input and output of the 7805. (I think there is one, C3, on the output. Am ordering more PCBs
so will update the PCB design w a cap on the input.)

Solder a 1uF multilayer ceramic capacitor across the input and ground pins of the 7805 on the bottom of the PCB, this will most likely cure your problems.

Also a second PCB has been loaded since the first post and it's 7805
does not heat up. So I've got two circuits that operate at room temperature and one that overheats so I guess it is just a defect in the PCB or other component. The solution is to quit wasting my time on the bad PCB so I can build more closet fixtures.

Instability is highly dependent on layout, your working version 'just happens' to manage to work, the breadboard layout is terrible, and the PCB version not that much better, with no capacitor on the input. Try looking at the 7805 datasheet to see what the manufacturer recommends.

To answer Nigel's question about power to the PIR: When the data sheet on the PIR was perused
it said that the operating voltage for the PR was 4.5 to 20 volts. So I figured 12 volts was closer to the median value ((20-4.5)/2)+4.5 than 5 volts. But perhaps it would be more efficient to use the lower voltage.

The datasheet (that I looked at) recommends using 5V, and the possibility of using from 4.5V to 12V. But there's no reason not to use 5V when it's already available.

Item 2. On Schmitt' excellent reply about thru-hole going away: I guess I am just old school because so far I have resisted using the SMD form. I think I will have to use tweezers to hold the component in place while the teeny component is soldered onto the board.

But I still wondering if there is not a better way to skin the 12 volt to 5 volt cat. 12 volt is everywhere because of cars and trucks and 5 volt is popular in transistor and TTL systems.
So is there a better way of transitioning from 12 to 5 volts? Are there other components that will provide this function? What is the down side of using a simple voltage divider?

The down side is that it doesn't work, it can be made to 'work' - but only VERY poorly, and VERY inefficiently - there's nothing wrong with the 7805, it's an excellent linear regulator, hence it's use for MANY decades. For such a low current requirement though, I'd just use the 100mA version, the 78L05 - I use both in projects at work, one of which uses a 7805 simply because it's using a 12V input, so needs the extra dissipation of the 7805.
 
linear voltage regulators require capacitors on the input and output to ensure stability

Not exactly.

7805 Capacitor recommendations, one is not needed on output for
stability.

1690063548403.png


Note there are LDO regulators that have min ESR requirements on output to insure they are stable.

Good datasheets delineate these requirements.



Regards, Dana.
 
Last edited:
Last time I went to Mouser Electronics to buy some 7805 ICs
there was a notice 'This product is scheduled for obsolescence and soon will
no longer be manufactured.'


Manufacturers change numbers as processes and designs change; it does not always mean a part is discontinued, just a new or updated part number.

Looking on Mouser, they list 50 !! variations of 7805 / LM340 etc., just in the TO-220 style case.

17 of those are either obsolete or not recommended for new designs. The same manufacturers are still making 7805s in TO-220, just with different suffixes in the part numbers, and there are four "new products" in the overall list.


eg. Texas Instruments have discontinued or are discontinuing ten variants - but there are another ten active.

The cheapest Texas one is now an improved 7805, TL780-05, which is 1% output voltage tolerance and 1.5A rating. vs. the 7805 4 -5% tolerance.

Or if you want a traditional 7805, the UA7805CKCS is still active, data sheet dated 1976.
The CKCT version from the same data sheet is now "End of life", but according to the data sheet that looked to be a lower grade one.


Basically, don't get hung up on a single order code, look for items with the generic "core" number or work through the specifications tables to find equivalents.

There are also now drop-in switch-mode alternatives, 5V output three pin modules with higher efficiency and wider input voltage range:

 
Hello Diver, For the Popcorn, Nigel Goodwin, Danadak, rjenkinsgb and the ETO forum,

This thread was begun last Saturday with two issues addressed in the post:
1. The overheating 7805.
2. The obsolesce of the 7805.

The first issue, the overheating has been solved. Thanks to Nigel Goodwin and Danadak for
recommending the capacitor on the regulator input. It looks that issue has been solved.

On the second issue, the 7805 and voltage regulators in general, a lot has been assimilated. Apparently the search at Mouser was too limited because, as rjenkinsgb pointed out while the 7805 that has been purchased in the past (L78S05CV) is going away there are plenty of voltage regulators including regulators of the 7805 type that are still around especially if my stubborn insistence on using thru-hole is attentuated.
It is now realized from From the Popcorn's input that a simple voltage
divider won't work because the output voltage will vary with the load.
Also was introduced, by Danadak, to new concepts, low drop off regulators and equivalent series resistance.

Have also found a lot of information about linear and switching voltage
regulator and the differences between the two.

Should be better able to choose a regulator in the future.

Thanks.

Allen Pitts
 
Status
Not open for further replies.

Latest threads

Back
Top