Electronics Temperature dependent bicolor LED

Discussion in 'Modding' started by Risky, 8 Jul 2004.

  1. Risky

    Risky Modder

    Joined:
    10 Sep 2001
    Posts:
    4,386
    Likes Received:
    113
    That's what I was thinking of. I have found a spreadsheet I used for thermistor calculations and farnell's improved parametric search is helping. However my electroncs gets hazy when you mention transistors, so if you ever have a chance for a schematic I'd be grateful.

    I can get the fitting for the led from compito or other German stores which is a 1/4 BSPP male fitting to take 5mm LEDs
     
  2. acrimonious

    acrimonious Custom User Title:

    Joined:
    8 Nov 2002
    Posts:
    4,060
    Likes Received:
    3
    http://forums.bit-tech.net/showpost.php?p=650633&postcount=11

    Check out cpemmas explanation of a "tap valve".

    You'll can provide input to the transistor base with two resistors, your thermsitor and one variable resistor for adjustment, in a 'potential divider' aranagement.

    If you don't know what i'm on about, google for "potential divider thermistor tranistor" or something, its a very common arangement so you should find lots :thumb:
     
  3. Risky

    Risky Modder

    Joined:
    10 Sep 2001
    Posts:
    4,386
    Likes Received:
    113
    Many thanks,

    Now this makes some sense - I understand potential dividers well enough so I just need to work out the voltage range I need for the LED and then set up the divider appropriately.

    I'm alittle unclear on how I control the current going to the LED. I see about the 100:1 ratio to base, so is this how I net the current level or and I very confused.
     
  4. acrimonious

    acrimonious Custom User Title:

    Joined:
    8 Nov 2002
    Posts:
    4,060
    Likes Received:
    3
    Take the supply voltage to be your supply minus 0.7v, take the current to be the same as usual.

    Example...

    Supply = 12v
    LED V = 2.2v
    LED I = 20mA

    (12-0.7) - 2.2
    0.02​
    = 455

    Next value in E24 series = 470 Ohms

    Geddit?
     
  5. Splynncryth

    Splynncryth 0x665E3FF6,0x46CC,...

    Joined:
    31 Dec 2002
    Posts:
    1,510
    Likes Received:
    18
    just an addition to the current gain thing, don't count on it being 100:1. It's fine to use in your calculations, but be prepared to fiddle with the finished circuit with an adjustment pot. Multiturn trimpots would be my choise for this. But since this doesn't need to be super accurate, I wouldn't worry much. But because of this, make sure you have corrent limiting resistors in line with the LEDs.
     
  6. Risky

    Risky Modder

    Joined:
    10 Sep 2001
    Posts:
    4,386
    Likes Received:
    113
    Ok now, I'm going to stick with this idea, but I need a little help yet.

    Say I grab a Thermistor 1k 25C B=4000

    I make that 1237R at 20C to 354R at 50C so If I had that in a divider with a 250R and a 5V supply, allowing for a .7V drop I have
    Code:
    T	Rt	Rf	V
    0	1294	200	4.0
    5	845	200	3.9
    10	690	200	3.7
    15	568	200	3.6
    20	470	200	3.5
    25	429	200	3.4
    30	392	200	3.3
    35	328	200	3.1
    40	277	200	2.9
    45	234	200	2.7
    50	200	200	2.5
    which might be viable for a suitible LED say
    Farnell code 366-4533
    FNL-U500B07CDSL
    If= 20mA,
    Vf(typ)=3.7V
    Vf(max)4.2V

    I guess I'd need to be able to trim this until it behaved and I need to work onthe reverse (Red) circuit, but am I on the rigth lines here?

    Now is the limiter at 33R? on the basis that Vmax= 4.3, Vtyp = 3.7? etc?
     
  7. SteveyG

    SteveyG Electromodder

    Joined:
    23 Nov 2002
    Posts:
    3,049
    Likes Received:
    8
    Just in case you forgot/didn't know, you won't just be able to connect the LED into the potential divider circuit, since the values in the able would no longer hold. Use an op-amp configured as a voltage follower and then connect your LED (33R resistor should be fine) to the output.
     
  8. Risky

    Risky Modder

    Joined:
    10 Sep 2001
    Posts:
    4,386
    Likes Received:
    113
    I was hoping to follow this "tap valve" circuit

    The table I gave included the 0.7V drop from the transistor. Am I still roughly on path?
     
  9. Risky

    Risky Modder

    Joined:
    10 Sep 2001
    Posts:
    4,386
    Likes Received:
    113
    Now I seemed to have missed this first time but I recognised if from reading over the Cathode Throbber article. Now I can see that the second two op amps (U1C, U1D) are turning my sensor voltage into a variable level between +V and Gnd, but I can't thing what the first two (the line into pin 10) are up to.

    Or to simplify:
    • Is the left half doing some like of throbbbing effect - in which can I don't need it and can simplify this down to a LM358
    • am I better using a LM35 sensor, in which case how do I set up the reference levels.
    • Do I take it that R7 and R8 are doing controlling D2 and D1 respectively and the values would be calculated in the usual way?

    Mentime my farnell card builds up as I collect possible parts....
     
  10. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    The circuit needs 3 op amps. The first two are a standard triangle-wave generator, set to run at around 500Hz, so there's no visible led flicker, with a wave amplitude between 3.3V and 8.5V.

    The 3rd op amp U1C is a comparator that switches when the wave voltage on pin#10 meets the temperature-sensitive reference voltage from the thermistor-pot potential divider on pin#9, sending out a 500Hz square wave with a duty cycle (on-off ratio) between 0% and 100%. When it's on D1 lights with R8 as current-limit resistor, off D2 lights through R7. High voltage is about 10.5V, low is 0V, so R8 is lower than R7 (You can use the usual led resistor calculations, but max current is limited to 25mA IIRC and at high currents you get poor dimming as duty cycle falls).

    The 4th op amp U1D isn't needed, but as you should never leave spare op amps with the inputs unconnected, it's wired in as a source-follower, an amplifier with a voltage gain of 1.

    You could design a LM358 (2 op amp) circuit with the first as a saw-tooth oscillator and the second the comparator, but the triangle-wave is a better dim at no real extra cost, LM358=17p, LM324=19p from ESR.

    The LM35 or LM335 would be much more linear than a thermistor, setup is as the datasheet to give 10mV/degC output, and you'd need to set the triangle wave peak & trough levels to match the sensor voltages at the max & min temperatures. Something I'm planning for Fan Noise Solutions. :hip:
     
  11. Risky

    Risky Modder

    Joined:
    10 Sep 2001
    Posts:
    4,386
    Likes Received:
    113
    Thanks, I'm now up to speed, I hope, so I'm ready to order a large pile of parts and then put off construction for as long as possible.

    Now if I was to go back to the bi-colour LED when could I get a decent red-blue? Farnell don't seem to offer them (I have a farnell order to make os this seemed a good enough place to do my shopping.
     
  12. Risky

    Risky Modder

    Joined:
    10 Sep 2001
    Posts:
    4,386
    Likes Received:
    113
    I'm looking at a LM335 so the mixmax volage for 20-40C would be 2.93V - 3.13V (on 10mV/K) roughtly. No how do I adjust the triangle wave amplitude? Is it R4/R5?

    (nearly there - I hope)

    Oh and any good places to hunt a red/blue bicolor LED?
     
  13. kbn

    kbn What's a Dremel?

    Joined:
    17 Mar 2004
    Posts:
    603
    Likes Received:
    0
  14. Risky

    Risky Modder

    Joined:
    10 Sep 2001
    Posts:
    4,386
    Likes Received:
    113
  15. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    R2/R3 set the amplitude, R4/R5 set the mid-point. You'll probably need a couple of preset pots for fine tuning. Best to test in a simulator like the Circuitmaker Student freebie to check component values.
     
  16. gifthot

    gifthot What's a Dremel?

    Joined:
    21 Feb 2004
    Posts:
    23
    Likes Received:
    0
    According your information,
    I try to test the bicolor led to do the temperature circuit
    It's successful!!
    But now I want to change use a tricolor ( red & blue )
    led to do the temperature circuit.
    If it can, can you provide the circuit to me
    Thank you very much
    Best reqards
     
  17. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    Good job there's a sparish op-amp.

    Two ways, one is to use the spare U1d as another comparator in parallel with U1c, but with the reference voltage & wave voltage input pins swapped over, so the final PWM pulse is low on one output when it's high on the other. One led anode from 1, second from t'other assuming common cathode.

    Second way is to swap the signal & feedback wires over on the U1d unity-gain so it's inverting unity-gain,

    [​IMG]

    Looks to work in simulation, let us know if it works for real.

    If you want to get 256 colours with a rainbow led, PM TheAnimus. :p
     
  18. gifthot

    gifthot What's a Dremel?

    Joined:
    21 Feb 2004
    Posts:
    23
    Likes Received:
    0
    Can you provide the 256 colours with a rainbow led circuit to me
    Thank you very much
    Best reqards
     
  19. gifthot

    gifthot What's a Dremel?

    Joined:
    21 Feb 2004
    Posts:
    23
    Likes Received:
    0
    I take a test for simulation tricolor
    with a tricolor led .
    The test is successful.
    Thank you very much
    Best regards.
     
  20. cpemma

    cpemma Ecky thump

    Joined:
    27 Nov 2001
    Posts:
    12,328
    Likes Received:
    55
    Thanks for the feedback. :thumb:

    It's nice to confirm you can do electronic stuff without a PIC. :p
     

Share This Page