12
\$\begingroup\$

I'd like to combine an analog temperature sensor with an RGB LED so that I get a range of colors based on temperature. Low temperature blue, high temperature red, with color fade between them as the temperature changes. For sensors, perhaps something like http://adafruit.com/products/165 for the temperature sensor, and http://www.sparkfun.com/products/105 for the LED.

It would be trivial to do this with an Arduino, but I'm trying to think of how to do this with some basic, low cost electronics - some way that I could make dozens of these and run them off something like a coin cell. I'd like to spread them around in an environment and get a "light map" of temperatures when viewed in the dark.

I imagine doing something like this...

Analog temperature sensor output from 0.0v - 1.0v translates into the blue channel input going from 3.0v to 0.0v (bright blue to dark), no output on temperature voltage > 1.0v

Analog temperature sensor output from 0.75v - 1.75v translates into red channel from 0.0v to 3.0v (dark to bright red), no output on temperature voltage < 0.75v.

The effect would be a bright blue light at the coldest temperature, that would eventually change to a bright red light at warmest.

Any thoughts on how this could be done in a low-cost/simple way?

\$\endgroup\$
  • \$\begingroup\$ Instead of driving your LED with a voltage, consider driving it with a current. This will give you much better visual linearity. Or use PWM, but then you're quickly moving to microcontrollers or Arduino and you mentioned not wanting that. \$\endgroup\$ – jippie Jul 17 '12 at 22:16
  • 1
    \$\begingroup\$ This is a really cool idea! I'm imagining some 10mm (or bigger!) LEDs for this. Hope it works out for you. \$\endgroup\$ – dext0rb Jul 18 '12 at 1:29
8
\$\begingroup\$

The simplest analog circuit I can come up with is this:

Temperature controlled RGB LED

V1 represents the temperature sensor output value.

The values of R1 and R3 may need to be adjusted specially if you use other transistors (you can use variable resistors to find out the correct values then replace them with fixed value resistors).

You may also need a voltage divider on the base terminal of Q1.

This is the output signal analysis.

enter image description here

This assumes you are using a common anode RGB LED.

\$\endgroup\$
  • \$\begingroup\$ Bruno, phenomenally nice! Just the kind of basic circuit I was looking for! \$\endgroup\$ – Tim Holt Jul 17 '12 at 23:02
  • \$\begingroup\$ Can you give a link to the schematic so others can edit it and run the simulation? \$\endgroup\$ – compumike Jul 18 '12 at 0:43
  • \$\begingroup\$ @compumike Sorry for the late reply. I haven't yet created an account so I could not save the schematic. If you wish, I'll open an account and create it again so I can share it. \$\endgroup\$ – Bruno Ferreira Jul 18 '12 at 15:11
4
\$\begingroup\$

The problem with using discrete components is that you will find it tricky to get the colours just right. You may need specific brightness curves, which will be almost impossible with transistors. For example, to make an LED appear to double in brightness, you may actually need to quadruple the light output (either using current or duty cycle). Look up psychophysics on Wikipedia.

I would just use the lowest cost micro controller you can find. As long as it has one input pin and three output pins, that should be enough. It should easily compete with the discrete components on price, and it will give you much more flexibility to modify the colours.

I have done this very thing using a PIC10. It worked a treat. This is a very small and cheap little MCU. On Farnell, they are just £0.27 for 100. The only other components you will need are the LEDs, thermistor and a resistor. Cheaper, simpler, and much more flexible than the discrete option.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.