0
\$\begingroup\$

I'd like to use a single bi-color 2-pin LED (red/green in my case) to display both Power and HDD activity of my PC. The case has no provision for an HDD light so I'd be replacing the single color power LED with a dual-color one in the light-pipe switch. I've decided to toggle off the Power LED when HDD LED needs to be on since it would be reversing voltage.

Logically it would be like this:

  • POWER_LED = NOT (HDD_LED)
  • REVERSE_POLARITY = HDD_LED

Both LED headers are 5v+ straight off the motherboard. I'm assuming I'd have to use at least two transistors to do this since the HDD_LED would be reversing the voltage while turning off the POWER_LED.

Additionally, I'd like to have an option of a "dwell" since switching between two can be too fast to differentiate as two different colors.

I imagine a transistor H-bridge with some logic could do the job of reversing the LED polarity but I'm uncertain whether that would be overly complicating things.

I'm not handy with transistors at all and wondering how such a circuit would look like.

Thanks!

\$\endgroup\$
6
  • \$\begingroup\$ You don't need transistors. Transistors allow a low current signal to modulate the current from a high current power source through a load. In your case, you already ahve the 5V off the mobo which is intended to drive LEDs. So unless you plan to use it to control some spotlights powered from a more powerful power source, there's little point to transistors. The dwell time is going to be a pain. \$\endgroup\$
    – DKNguyen
    Oct 12, 2021 at 3:58
  • \$\begingroup\$ I wouldn't need something to reverse voltage to the LED to turn the other color on? \$\endgroup\$
    – Paul
    Oct 12, 2021 at 4:15
  • \$\begingroup\$ Whether you even can reverse the current to turn the LED on depends on the LED. My bet is you don't and that it's common cathode or common anode, rather than anode-to-cathode. \$\endgroup\$
    – DKNguyen
    Oct 12, 2021 at 4:16
  • \$\begingroup\$ It's a two pin LED as I mentioned. Reversal turns on the other color. \$\endgroup\$
    – Paul
    Oct 12, 2021 at 4:18
  • 1
    \$\begingroup\$ Oh, you said 2-pin in the title. You may want to remove the "(and bi-polar?)" in that case since it makes it sound like you're not sure. If you're actually not sure look at the datasheet. If there is no datasheet, then get some resistors and test it with a battery and don't buy things with no datasheet next time. But if I were you, I would just get a common anode or common cathode LED. Way simpler. \$\endgroup\$
    – DKNguyen
    Oct 12, 2021 at 4:20

1 Answer 1

1
\$\begingroup\$

schematic

simulate this circuit – Schematic created using CircuitLab

Adjust R values to suit your desired intensity or Vdd.

When Pwr is ON, it's one colour and when HDD Busy it's the other colour. If you toggles really fast, it may appear yellow if it's a Bi-LED.

Your choice.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ Unfortunately the red LED would never light up as the 74HC04 output only goes down to 0V, instead of going to negative. I suggest using another NOT gate of the HC04 to make a H-bridge, if it is a must to use only 2 wires for driving a 2-pin bicolor LED. The HDD ready output would generally not be a push pull output as it is meant to drive a LED, so at least a pull-up to supply is a good addition. \$\endgroup\$
    – Justme
    Oct 12, 2021 at 7:38
  • \$\begingroup\$ @Justme no need to explain, just a brainfart. \$\endgroup\$ Oct 12, 2021 at 16:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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