• Some users have recently had their accounts hijacked. It seems that the now defunct EVGA forums might have compromised your password there and seems many are using the same PW here. We would suggest you UPDATE YOUR PASSWORD and TURN ON 2FA for your account here to further secure it. None of the compromised accounts had 2FA turned on.
    Once you have enabled 2FA, your account will be updated soon to show a badge, letting other members know that you use 2FA to protect your account. This should be beneficial for everyone that uses FSFT.

Tri-Color LED Temperature Display

Gyrfalcon

Limp Gawd
Joined
Nov 2, 2004
Messages
322
I want to build a circuit to monitor the temperature inside my case and have a single LED change its color from green to yellow to red as the case warms up. The LED has 3 legs, one goes to the anode (+) of the red side another is the common cathode (-) and the third is the anode (+) of the green side. The yellow is achieved by having the green and red on at the same time. I would prefer not to have to program a microcontroller chip and want the circuit independent of my computer. I have looked all over the web but have so far had no luck in finding a circuit. :(
 
What you want is a "comparator" circuit. Actually, two to be specific. One for above/below the first temperature threshold, and one for above/below the second threshold. Pretty simple to make using op-amps.

First thing that comes to my head is that you would want the temperature sensor (probably a thermisistor) in conjunction with an op-amp to generate a signal voltage. Then each of the other two op amps would read that voltage, compare it with a fixed voltage and output the result to the LED. One of the outputs would have to be reversed to get the colors to function properly, but this isn't a big deal. If you want a rough schematic, PM me.

 
The comparator concept is nice because it's easy to find dual op-amp ICs, allowing you to accomplish everything with only one IC and a few resistors.
 
Yeah, I just did a rough circuit sketch. One dual op-amp used as a comparator, maybe 6 resistors and a thermisitor and a filter cap. Pretty simple. If you want it independent of the computer, you would probably need a wall wart or be prepared to change out batteries every few months.
 
A quick off the cuff estimation puts current draw in the 20-50 ma range due to the op amps and LED. While this isn't alot, batteries might not last that long, maybe only a few days depending on the size. A very small transformer (100 ma or so) might be just the thing. There might be other options if you just want it to stay on for a few minutes after the computer shuts down (large capacitor) or to run it off of standby power (not fully independent of the computer, but independent of on/off state).
 
I am probably going to hook it into the PSU 12V line with a voltage regulator, when I mentioned computer independance I was thinking more along the lines of some kind of Parallel/Serial control. I was looking for something solidstate that I can squeze onto the control board with the fan bus and CCFL controls.
 
Oh, no problem then. This should take maybe 1" square of real estate, plus if you can hook up the power to the fanbus you'll save some wire runs. You won't need a voltage regulator with this circuit - op amps will be just fine on 12v.
 
So the cicuit should enable all three colors, b/c both amps are on at the half way point? or will it just jump from green to red?
 
If you need any help with resistor values, LMK, I'll be glad to help. Plus this was an interesting mental challenge.
 
So I calculated values using spec sheets for the thermistor, but I am stuck on R1, R2, R3, R4 is there some guideline on what I should choose for those values, I will use a 12V supply, at the midpoint the thermistor is at 1310.4 ohms (1% tolerance) so I made R5 1300 ohms. According to design guidelines for the thermistor I need at least 500 ohms at the max temp so I used a 3K ohm thermistor. At 20C = 3747 ohm at 70C = 525.9 ohm I selected values of 120 ohm for R1 and R3. For R2 and R4 I selected 121 ohm (all at 1% tolerance). Are there better values for R1 – R4 or will these values work?
 
OK, to start you'll need to know the resistance of the thermisistor at two temperatures - where you want it to go from green to yellow and from yellow to red. You may need to interpolate from what's on the spec sheet. Then pick a value about halfway in between and use that for R5. At the halfway point of the yellow, this will give you a reference voltage of 6v. Now you need to make the other two reference voltages for the comparators. Find what voltage you need by putting the thermisistor resistance at the desired temperature into the formula. Use the formula

Vout = 12 (R1)/(R1+R2)

Then, once you know the voltages you need, put those in the formula and use fixed resistors to achieve that output.

Example:
Let's assume your thermisistor response is linear (probably not, but hopefully this will be close enough). We'll say you want to switch from green to yellow at 30 degrees and yellow to red at 40 degrees. If at 30 degrees your thermisisor reads 3100 ohms (you might want to measure and calibrate since I'm doing a linear interpolation and most likely the thermisistor isn't linear, you may be able to find a better curve) and at 40 degrees it's 2460 ohms. For R5 I would choose something about 2700 ohms (a common value). For my first switch point, the reference voltage would be

12*Rt/(Rt + R5) = 12 (3100)/(3100+2700) = 6.4 v

for the second point it would be

12 (2460)/(2460+2700) = 5.72 v

Now find common value resistors that will give you the same output voltages when used in the same formula for the R1/R2 and R3/R4 combos. (Remember, R1/R2 are for the LOWER temperature, R3/R4 are for the higher).

This page shows common resistor values:
http://www.mikroelektronika.co.yu/english/product/books/keu/01.htm

Personally, I would choose something of several thousand ohms in order to keep current draw low. Going with a standard 2700 ohm would for R2 and R4 might be a good idea, then you could make R1 and R3 from combos of smaller resistors. A better solution might be to make R1 from a 2200 ohm fixed resistor and a 1000 ohm variable resistor to give you the ability to "tweak" or dial-in the exact temperature point you want. R3 could be made from a 2700 ohm and a 1000 ohm resistor.

This was just an example, your actual values could be different.

If you need any more help, please ask. Also, I've got a bunch of stuff in my spare parts drawers (resistors, potentiometers) that might be of use if you want it.
 
Thanks for all your help, I also have a large collection of spare parts. For my thermistor I have very accurate data (1 deg resolution) so interpolation is quite accurate, I am having the thermistor range from 20C to 70C so the mid point temp is 45C. At the mid point I have a calculated value of 1310.4 ohms so I chose R5 to be 1300 ohms.

The transition from green to yellow occurs at 32.5C with a resistance of 2175 ohms I used a value of 3300 ohms for R4 and will be using a 4700 ohm resitor with a 1000 ohm potentiometer for adjustment on R3.

The transition from yellow to red occurs at 57.5C with a resistance of 817.5 ohms I used a 3300 ohm resistor again for R2 and will combine a 2200 ohm resistor with a 1000 ohm potentiometer for adjustment of R1.

Hopefully this will all work out, most parts will be in from Mouser on friday and the odds and ends I didn't order will be pulled from the spare parts bin or the local electronics store.
If you want to take a look at the tables I used they are from Vishay-Dale Technical Note 33011 page 24 (PDF files), the data ranges from neg60C to 150C http://www.vishay.com/thermistors/list/product-33003/
 
Looks good, those values should work out well and give you room to tweak it nicely. Be sure to post pictures of it when you're done! If you have any questions, let me know.

PS
I think I put a V- on the picutre, since this is single supply, ground = V-. Also, I would put a small capacitor (whatever you have laying around) across the power pins of the op-amp to increase its stability. Probably won't have any impact in this application, but I'm paranoid and have pounds of spares, so it wouldn't cost me anything for a bit of peace of mind.
 
So I breadboarded the entire circuit (always a good idea, for those reading along) and it works quite well, it doesn't transition from one color to the next but I suppose I would need some capacitors to smooth out the voltage jump... or maybe it is because I am using boiling water at 100C to make the transition :D


thanks for all your help, I hope to get pictures posted of the finished project when i finally mount it to a protoboard.
 
Does it go straight from red to green? If so, there may be no overlap in the temperature transition points. You might want to VOM the circuit or just use WARM water instead (or just add some ice cubes to the hot water and watch to see if it cycles through yellow on it's way down.)
 
It goes to yellow, its just not a smooth tansition. The LED jumps from green to yellow to red, but I suppose using op-amps makes it this way. I was looking for a slow transition but I have a feeling that b/c of the instant jumps in temp (heat capacity/thermal conductivity of water) and evaporation (lets not get into enthalpy) that it is a more rapid change with water. Hopefully I will come up with a more appropriate means of testing its range over the next week while I take a break from all this. Again thanks for all your help, it is what I was looking for and does the job well :D
 
Back
Top