'leccy tronics

wyrd_fish

Fledgling Freddie
Joined
Dec 27, 2003
Messages
537
please help, i only have a basic grasp of the transistor, but want to amke a circuit that will change the colour of some 2 colour LEDs for my computer case

the 2 LEDs are Power and HDD activity

EDIT: is this even possible

please fill in the blanks:
 

Attachments

  • ledsci.PNG
    ledsci.PNG
    15.1 KB · Views: 37

Krazeh

Part of the furniture
Joined
Dec 30, 2003
Messages
950
So you want a circuit that will have the 2 led's lit all the time, one as red and one as green? And for them to change to the alternate colour when the hard drive is in use?
 

Tom

I am a FH squatter
Joined
Dec 22, 2003
Messages
17,346
You need a transistor that changes state depending on the voltage coming from the hard drive LED pin.

*struggles to remember college days*

From what I can recall, transistors have a Base, collector, and emitter. The base controls the state of the transistor, if the base voltage rises to a certain point, the transistor will allow the passage of current from the collector through to the emitter.

Basically, with no HD activity, the LED pin will be at 0v, in which case the transistor will not allow any current to pass. When the HD does something, the LED pin voltage rises, and it is that voltage that will switch the transistor 'on'.

I don't know which transistor to get, but its a very simple circuit, and anybody with basic electronics theory will be able to design it for you.

Points:

You must make sure the voltage from the HD pin can switch the transistor.

You must also make sure that the HD pin is isolated, you don't want voltage going into the HD now do you? You can do this by inserting a diode between the pin and the base.

Let me have a think about this, although I'll probably get it wrong.
 

Tom

I am a FH squatter
Joined
Dec 22, 2003
Messages
17,346
OK, I've had a think, bear in mind that this is all from memory and could be totally wrong :D

crap%20circuit.jpg


Basically, when the HD pin is at 0V, the first transistor (PNP) is off. Therefore, there is 0V on the base of the 2nd transistor. The 2nd transitor is an NPN type (IIRC, NPN transistors allow current to flow between their collector and emitter when their base voltage is 0V), its base voltage is therefore at 0V, so it allows current to flow, so the green LED lights up.

When the HD does something, the voltage at the base of the first transistor rises, and the transister switches on. The voltage at the base of the 2nd transistor rises as well, and it switches off (because its a PNP type). Therefore, the Red LED lights up, and the Green LED turns off.

Now what you need is another circuit that does the opposite for your power LED. I could draw something for that, but until somebody confirms what I've typed in this post, I won't bother, as it could be wrong.

You will need an external voltage to power the circuit, you could probably use the voltage from the PSU that is supplied to the case power LED. The voltage from the HD pin is used only to switch the transistor state, and not to power the LEDs.

I hope this helps, again, my memory is very very rusty on all of this.

PS the two LEDs in the diagram are actually the same dual-colour LED. Connect one leg to the +ve supply, and the other legs to the relevant transistor legs.
 

RandomBastard

Can't get enough of FH
Joined
Dec 28, 2003
Messages
1,318
Hate to burst the bubble but its not that simple.

First of all to utilise the leds as you want you cannot apply voltage to the red and the green at the same time, as this will not change colours but either destroy the led or combine to create a third colour (usually orange) and if thats what you wanted you could simply connect the idle colours to the power pin and the activity colours to the hd pin and common the grounds.

Apart from that youd need to create a circuit with diodes and things to esnure only one colour was in use.

edit // and the circuit toms drawn will turn both on at once or not at all. Allthough it would make a nice current amplifier and act as a darlington pair.
 

Tom

I am a FH squatter
Joined
Dec 22, 2003
Messages
17,346
Would it still act as a darlington pair even though the two transistors are differing types?

I honestly can't remember much about this.
 

Tom

I am a FH squatter
Joined
Dec 22, 2003
Messages
17,346
Thinking about it again, put the Red LED on the emitter leg of the first transistor, rather than the collector leg, and it that would stop it being on all the time.

/edit: feck, I draw a superb world-class diagram and he doesn't even respond :(
 

wyrd_fish

Fledgling Freddie
Joined
Dec 27, 2003
Messages
537
i've been reading though...

i'm just more confuced than before :(
 

phlash

Fledgling Freddie
Joined
Dec 24, 2003
Messages
195
OK - my turn :)

You currently (sic) have two LEDs, one power, one HDD. The power LED is on pretty much full time, the HDD LED as and when activity occurs. This means you have a constant current supply via the power LED connector, that just needs switching into one or other leg of the multi-colour LEDs, the switching being controlled by the HDD LED signal.

A conceptual circuit diagram would be:

Code:
HDD LED signal -------------> 'switch'
Power LED signal -------------o--->o-----------+
                                  o----+       |
                                       |       |     <-- LED anodes (+ve)
                                      RED      GRN   <-- multicolour LED
                                       |       |     <-- LED cathodes (-ve)
Power LED ground ----------------------+-------+

Now in practice it's gonna be easier to wire two 'switches' using a pair of transistors, so it looks like this (note this assumes the signals are generated on the motherboard using pull up resistors to +5v or similar, if signals are generated by pull down to ground then the bias resistor needs changing over to the opposite supply rail):

Code:
Power LED signal -----------+------------------+
                            |               b  | e
                            +----------+   +---O     <-- PNP transistor
                                       |   |   | c
                                      RED  |  GRN   <-- multicolour LED
                                    b  | c |   |
               NPN transistor -->   +--O   |   |
                                    |  | e |   |
Power LED ground -------------------|--+---|---+-------------+
                                    |      |                 |                           |
HDD LED signal ---------------------+------+-[BIAS RESISTOR]-+

Choosing an appropriate value for the bias resistor may need a little experimenting with... it depends on the value of the pull up/down resistors already on the motherboard, and the gain of the transistors used.

Making this circuit operate two multicolour LEDs in opposite phase (ie: one is red when the other is green) requires putting the other LEDs in series with the ones shown.

Finally, if your multi-colour LEDs have a common cathode (which I think they do from your picture), then you cannot switch the cathode side of one colour, and must have an inverter and two anode switches eg:

Code:
Power LED signal ----------------------+--------+
                                    b  | e   b  | e
                                   +---O    +---O    <-- 2 * PNP transistors
                                   |   | c  |   | c
                                   |  RED   |  GRN   <-- multicolour LED
                                  _|_  |    |   |
            LIMIT RESISTOR -->    |  | +----|---+    <-- common cathode
                                  |__| |    |
                                b  | c |    |
 NPN transistor (inverter) -->  +--O   |    |
                                |  | e |    |
Power LED ground ---------------|--+---+----|-----------------+
                                |           |                 |
HDD LED signal -----------------+-----------+-[BIAS RESISTOR]-+

NB: The limit resistor controls the current through the new anode switch (controlling the RED led here), and should be a similar value to the Bias resistor.

Hope this helps!

Phil
 

Users who are viewing this thread

Top Bottom