My Compaqt solution
#11
Photo 
Acting on Jims advice ..the LEDs were removed and I decided to tackle the problem this way (see photo)
I have fitted a 470 ohm resistor ..and hopefully Jim will provide the other values so I can complete it.
I then have to run 3 pairs of wires out to the compaqt front panel and mount 3 x coloured LEDs..
rgds
VS


Attached Files Thumbnail(s)
   
Reply
#12
Blue needs 110 ohm. Green needs 270 ohm.
Reply
#13
Thanks Jim ..I'll get on that later today when I am fully awake.
rgds
VS
110 ohm is going to be a tricky value for me ..
How critical I wonder ? ..I have 100 ohm and 120 ohm ..
So most likely I will have to use 100 ohm ..and drop a 10 ohm in the actual lead to the blue LED .
but I guess this is an option.
Reply
#14
100 and 120 are probably both fine, but it really depends on the forward voltage of the LED.

You need to keep the current to around 5mA max because that is all the microprocessor will output on a port.

Look at the datasheet for the diodes you are using to determine their forward voltage.  Then use this formula to calculate the proper resistor:

3.3 - fwd voltage / .005 = resistance in ohms
Reply
#15
Once again Jim .
many thanks.
You help is very much appreciated.
Reply
#16
Sadly this box of 3mm water clear leds didn't come with forward voltage ratings ...so I could just use the "typical" ratings ...or try and set up a breadboard to ascertain them ..
Typical for R G B would be 1.8v  , 2.2v and 2.8v ...
but how accurate this is I have no idea ?
would you recommend an exact calculation Jim ..or do you think this would be 'close enough'
rgds
VS
..so doing the calculations and assuming the typical forward voltages for this type of 3mm coloured led
..gives me :-
Red - 300 ohm
green - 220 ohm
blue - 100 ohm

blue being the closest to the original resistance
but short of knowing for sure what the forward voltages of these leds are...pure guesswork.
They are all close-ish ..but left as is theoretically they would glow similarly or a bit dimmer passing less current in the case of red and green that is.
Reply
#17
Blue LED's typically have a forward voltage of 3.0v or higher.

If you pick the wrong resistor you will damage the CPU permanently. You are better off having a dimmer than desired brightness than no LED at all. Smile
Reply
#18
Dimmer but safer sounds good to me Jim ..
I think I'll chance leaving the resistors at the value set by you ..plus put an extra 50 ohm in series with the +ve leg of each front panel substitute LEDs.
rgds
VS
Reply
#19
Photo 
Good news ..did some searching and finally found an accurate chart for the LEDs I have..
So ..I can now get the resistor values correct.
rgds
VS


Attached Files Thumbnail(s)
   
Reply
#20
I would recommend 330 ohm for the red and 100 ohm for the green and blue. That is a really high forward voltage for the green LED. Normally, those are around 2.2v.
Reply




Users browsing this thread: 1 Guest(s)