ambient temperature problem

WBahn

Joined Mar 31, 2012
32,852
Would you mind explaining how this circuit temperature change is very little? I don't get it. I also don't get how this circuit work
Focus on just the following part:

1763574752119.png

Assume that the circuit is stable at some temperature. The Vbe of Q2 will be at some particular voltage that is consistent with this stable operation. Without the diode, that voltage is the voltage drop across R6, which is sized to provide that voltage at the desired current.

Now consider what happens if the temperature rises. Due to the temperature coefficient of the transistor, the Vbe drops at the same collector current or, equivalently, at the same Vbe, the collector current increases. This results in more of the current in R2 being shunted away from the bases of Q6 and Q7, which results in a drop in LED current and a corresponding drop in the voltage across R6. Things will stabilize at a new, lower current at the higher temperature.

Another way to look at this is that, in order to hold the LED current at the same value, the Vbe voltage on Q2 must go down. But, with it connected directly to R6, the only way for that to happen is for the LED current to go down, which means that the LED can't hold the same current and will go down with temperature.

But what if we put another temperature-sensitive device between R6 and Q2 such that as the needed Vbe of Q2 drops, so does the voltage across this other device. If the two changes are equal, then the same voltage across R6 (i.e., the same LED current) will result in a Vbe across the transistor that is just the right amount lower to compensate for the lowering Vbe of Q2 at the desired operating point. The Vf of a Schottky diode has a temperature coefficient that is very close to that of the Vbe of an NON transistor. It's not a perfect match -- plus, R6 also has its own temperature coefficient (which is probably not reflected in the simulation model, but I don't know that for sure). So there will still be some residual effect of temperature change on LED current.
 

MrAl

Joined Jun 17, 2014
13,707
I have a 3VDC 100mA LED landscape as a load. I am using two power supplies: one 12VDC power source from the outlet V2 in simulation, and another 9VDC battery labeled B1 in simulation. The 9VDC battery would be a backup when the 12VDC power source goes off, such as in a storm when lights go out. Below is my circuit. I have a linear voltage regulator that converts 12.5VDC or 9VDC to a constant output, which feeds the LED. I also have V1 and B2, which are essentially solar panel models; they provide a voltage and current source modeled after one of the landscape lights' solar panels and act as a signal to an on/off switch for daylight/nighttime in this circuit, controlling transistors Q1 and Q2.

At a temperature of 38C everything is fine. I get a voltage drop between points labeled VJ and VC2 to be 3VDC from both 12.5VDC and 9VDC. However, when I change the temperature to -15 °C (winter time here), then the voltage goes well above 3VDC and the current above 100mA, causing damage to the LED. The linear voltage regulator adds 0.1VDC during cold temperatures, causing this extra 0.1VDC. What can be done to get a stable 3VDC from a temperature of 38 °C to -15C discrete components only, no ICs, controllers, etc, etc? Also attached is my solar_light_linear_regulation_4.asc.

My circuit:
View attachment 358971


at Temp of 38C outlet:

View attachment 358973

at temp of 38C battery:
View attachment 358974

At temp of -15C outlet:
View attachment 358975

At temp -15C battery:

View attachment 358976
Hi,

Usually when an LED voltage is specified as 3v or 3.3v or something like that, it usually requires a constant current like yours 100ma.
There seems to be nothing definite about this on the web site though, but since 3v is so low it is unlikely there is a regulator built in.
The 12v model might have a built in regulator, but it is not specified either.
What you need is the LED iv curve (current/voltage curve). That will tell us for sure if it needs current or voltage.

As to your current design, without studying it, I can tell you the old way to do it is to temperature compensate it with a NTC thermistor.
You find a place in the circuit where when you vary the resistance in a certain way, you can keep the current (or voltage) constant, or nearly constant.

For example, if an LED was drawing 100ma at 20C with a 100 Ohm series resistor and was drawing 120ma at 0C, then you might have to add 20 Ohms when the temperature drops. This would mean an 100 Ohm NTC thermistor that was 100 Ohms at 20C and 120 Ohms at 0C.
That's the simplest example though, and is just very approximate. For your circuit the resistance could be very different like 1k at 20C or even 10k at 20C depending on where you place it in the circuit.
You can find the data on the thermistor before you buy it and see if it fits for what you find out while experimenting with varying some resistance while the temperature drops (or increases).
In most cases you end up using one or more fixed resistors with the NTC thermistor in order to get the correct 20C resistance and 0C resistance, at least to some approximate values.
You also have to make sure that the NTC thermistor senses only the ambient temperature, unless it has to be in the same box as the LED, and then you have to find a value that works as the ambient and the LED temperatures change if the LED heats up.

It was done that way for a long time, but most modern applications design for more accurate results using other components.
 

Thread Starter

hhsting

Joined Apr 25, 2024
395
Hi,

Usually when an LED voltage is specified as 3v or 3.3v or something like that, it usually requires a constant current like yours 100ma.
There seems to be nothing definite about this on the web site though, but since 3v is so low it is unlikely there is a regulator built in.
The 12v model might have a built in regulator, but it is not specified either.
What you need is the LED iv curve (current/voltage curve). That will tell us for sure if it needs current or voltage.

As to your current design, without studying it, I can tell you the old way to do it is to temperature compensate it with a NTC thermistor.
You find a place in the circuit where when you vary the resistance in a certain way, you can keep the current (or voltage) constant, or nearly constant.

For example, if an LED was drawing 100ma at 20C with a 100 Ohm series resistor and was drawing 120ma at 0C, then you might have to add 20 Ohms when the temperature drops. This would mean an 100 Ohm NTC thermistor that was 100 Ohms at 20C and 120 Ohms at 0C.
That's the simplest example though, and is just very approximate. For your circuit the resistance could be very different like 1k at 20C or even 10k at 20C depending on where you place it in the circuit.
You can find the data on the thermistor before you buy it and see if it fits for what you find out while experimenting with varying some resistance while the temperature drops (or increases).
In most cases you end up using one or more fixed resistors with the NTC thermistor in order to get the correct 20C resistance and 0C resistance, at least to some approximate values.
You also have to make sure that the NTC thermistor senses only the ambient temperature, unless it has to be in the same box as the LED, and then you have to find a value that works as the ambient and the LED temperatures change if the LED heats up.

It was done that way for a long time, but most modern applications design for more accurate results using other components.
I looked into NTC or PTC before I posted. Which such small drop in my circuit their is no NTC or PTC in the market. All beta is 2000K to 3000K but i require beta to be 125K. None exists that low so it doesnt work
 

MrAl

Joined Jun 17, 2014
13,707
I looked into NTC or PTC before I posted. Which such small drop in my circuit their is no NTC or PTC in the market. All beta is 2000K to 3000K but i require beta to be 125K. None exists that low so it doesnt work
Hello again,

From my previous post:
" In most cases you end up using one or more fixed resistors with the NTC thermistor in order to get the correct 20C resistance and 0C resistance, at least to some approximate values. "

Well in the past this almost always came up. The solution was to combine with fixed resistors to get to a close enough spread in resistance that fit the application. If you already determined that B=125 would work, then we are already halfway there I think.

For the following discussion, R0=resistance at T=0C, R100=resistance at T=100C ...

If we start with B=125 and calculate the R0 and R100 we will get two resistances R0a and R100a. The difference we can define:
dR125=R0a-R100a, which is the spread in resistance for B=125.

Next, we use B=2000 (or whatever) and calculate the resistance with an unknown parallel resistance Rp, forming an expression that is the difference R0b-R100b we can call dR2000. We then set dR2000=dR125 and solve for Rp. That gives us a parallel resistance value to place in parallel to a thermistor that has B=2000. Now both solutions have the same differential resistance from T=0 to T=100C.

Next, we find the difference between the two solutions at T=0C, call that dR0 which is Rs. This is the resistance that gets added in series to the above with the parallel resistance Rp.

Thus, we end up using a thermistor with B=2000 to mimic a thermistor with B=125 by placing one resistor in parallel to the thermistor, then another different resistor in series with that. Both thermistors would have the same R25 resistance.

If we do this, we end up with:
R=10k at 25C (by choice, a different value could be used instead and recalculate everything)
Rp=3.02k
Rs=7.80k

Notes:
1. This assumes that B=125 and R=10k at 25C really would work for your solution. If this is not really the case then we'd have to go over that first.
2. The values work out to an approximate curve that is close to the B=125 curve. It should be good enough though (say within 2 percent at the midpoint T=50C).
3. The values found were using the "Beta" approximation to the NTC thermistor. Another approximation technique could also be used.
4. The Rx and Rs numerical values are right if I calculated the two correctly :)
5. There could be even better solutions using TWO thermistors, but the calculations would be more complicated.

You can also try this with a thermistor with B=4000 and see if it is even closer, or even less accurate near the midpoint T=50C. It is probably always possible to get the two endpoints T=0 and T=100 to be exact or very close, or even if the lower temperature is lower like -20C or something.

In the past it would be rare to find a thermistor that worked in a given existing application right out of the box. An example would be for an analog meter calibration over a range of temperatures. You buy the meter, you find out it is not accurate at the temperature rises or falls, you then attempt to calibrate it using a thermistor and resistor(s). It's always approximate, but it usually works out to be good enough. If you need high accuracy, you may have to go to a microcontroller with a lookup table or formula.
 
Last edited:

Ian0

Joined Aug 7, 2020
13,132
What is the part-to-part light output variation for the LED to be used?
I can’t imagine that it is better than ±10%, in which case what are we bothered about?
 

MrAl

Joined Jun 17, 2014
13,707
Hello again,

Just for reference here is a plot of a NTC thermistor with Beta=125 compared to an NTC with Beta=2000 and added parallel and series resistors.
After solving for Rp I found that the second NTC was consistently a little higher than the first NTC so I reduced the parallel resistor value by about 5 percent. The original value for the series resistor was kept.

The two plots show that they are similar although not exact.
The max error occurs around T=40C and is slightly less than 1 percent.
The average error over the full range of T=0 to T=100C is about 1/2 percent.
 

Attachments

Last edited:

Thread Starter

hhsting

Joined Apr 25, 2024
395
Hello again,

Just for reference here is a plot of a NTC thermistor with Beta=125 compared to an NTC with Beta=2000 and added parallel and series resistors.
After solving for Rp I found that the second NTC was consistently a little higher than the first NTC so I reduced the parallel resistor value by about 5 percent. The original value for the series resistor was kept.

The two plots show that they are similar although not exact.
The max error occurs around T=40C and is slightly less than 1 percent.
The average error over the full range of T=0 to T=100C is about 1/2 percent.
I forgot to mention I dont have enough money to buy outside parts such as IC, NTC, PTC with this project. However I am curious though how can I configure NTC or PTC with other resistor like you say with following:

-15C has to have 0 ohms resistance

38C has to have 1500K ohms resistance??
 

Ian0

Joined Aug 7, 2020
13,132
I forgot to mention I dont have enough money to buy outside parts such as IC, NTC, PTC with this project. However I am curious though how can I configure NTC or PTC with other resistor like you say with following:

-15C has to have 0 ohms resistance

38C has to have 1500K ohms resistance??
You can't configure anything to have 0Ω resistance.
 

Thread Starter

hhsting

Joined Apr 25, 2024
395
Instead of all those sophisticated circuits I would use
2-pin constant current driver AL5809
in series with LED.
Temperature independents, 90 mA
(for long life of 100 mA rated LED).

Price $0,08
View attachment 359125
Thanks buddy keep it in mind next project. I like to have ICs where I can use in almost all projects buy them in bulk. I don't like it when its for specific project and then bulk just sits around for nothing in next projects.
 

Thread Starter

hhsting

Joined Apr 25, 2024
395
Most PTC thermistors are PTAT devices (resistance is Proportional to Absolute Temperature) so from 258K (-15°C) to 308K (35°C) you can expect about a 20% change in resistance.
Ok I explain that to MrAI from start right but MrAI say maybe possible in combination with other resistances etc. So lets see
 

Thread Starter

hhsting

Joined Apr 25, 2024
395
1763766308348.png

with circuit above lets say sensor turns on Q1 so then base of Q6 and Q7 is at zero turning off Q6 and Q7 so the led is off. Now that in turn would cause collectors of Q6 and Q7 to have 13V. As a result of collector Q6 and Q7 is at 13V would case base of Q2 to have 13V which will turn on Q2 which then further puts base of Q6 and Q7 to zero since now Q1 and Q2 both are on.

Now next lets say sensor turns off Q1. So now instead of Q1 and Q2 both pulling to zero only Q2 is pulling to zero. However Q2 is still on pulling at base of Q6 and Q7 to zero. How does the led turn back on?Yet the simulation shows it turns back on I dont get it?
 

MrAl

Joined Jun 17, 2014
13,707
I forgot to mention I dont have enough money to buy outside parts such as IC, NTC, PTC with this project. However I am curious though how can I configure NTC or PTC with other resistor like you say with following:

-15C has to have 0 ohms resistance

38C has to have 1500K ohms resistance??
Hi,

Oh sorry to hear that. Are you in the USA or no?

The first thing that comes to mind since the range of resistance is so large, is to couple an LDR with an LED, making the LED light temperature sensitive with a sensor. You can get a wide variation in resistance with an LDR (Light Dependent Resistor) so the main chore would be to get the LED light output to vary with temperature enough to drive the LDR in the intended fashion. Perhaps using a thermistor or temperature sensor with analog output to drive the LED perhaps with an added op amp.
They make LDR/LED packages all in one package for use with audio, but I have read their repeatability isn't very good. This means it would be best to design that part yourself also.
You might note again that when you go to a microcontroller a lot of avenues become available for a variety of methods that can be calibrated to very good accuracy using tables and/or formulas programmed into the uC itself. Of course that's not always an option, even though the cost could be very minimal as some uC's are just $2 USD or even less each and provide a lot of capabilities in one chip.

Did you really mean 1500k Ohms or did you mean 1.5k (1500 Ohms). 1500k Ohms is really the same as 1.5 Megohms which is quite high.
 
Top