I have designed a circuit to turn green led ON if the voltage from the power supply (3.3kV 10uA) is greater than 2.7kv and turn the red led ON if it is equal to or less than 2.7kV.

Here 50Mohm and 50kohm is a 4pin caddock HV divider resistor. 100kohm resistor is used in order to drop the 2.7kv to 1.8v so that it turns off the mosfet. The led that i thought of using is a bi-colour common anode red+green led. One point to be noted is that the 12v is from the same power supply and this is converted to kvolts.

The problem with the circuit is that when I set the voltage between 2.708kV and 2.35kv both red and green leds turns ON. Please guide me how can I solve this issue and also can i use bjt instead of a mosfet.

Thanks in advance. Voltage Indicator

  • 1
    \$\begingroup\$ Have you considered a design with two mosfets or a negative rail? \$\endgroup\$
    – Voltage Spike
    Commented Apr 20, 2017 at 18:08
  • \$\begingroup\$ It is a common anode led how can i use it on another mosfet \$\endgroup\$ Commented Apr 20, 2017 at 18:56
  • \$\begingroup\$ Do the same thing you did for the green LED on the red. Common anode ties the positive sides together so that doesn't affect your ability to add a low side FET. \$\endgroup\$
    – BB ON
    Commented Apr 20, 2017 at 19:32
  • \$\begingroup\$ Your circuit might work because green LED requires slightly more voltage than red LED to turn on: reduce R2 from 165 to about 68 or 82 ohms. Increase R1 from 350 to 470 ohms. With careful juggling of these resistors, you might be able to reduce the range where both LEDs are partially ON. It is a design that might not work acceptably over a wide temperature range. \$\endgroup\$
    – glen_geek
    Commented Apr 20, 2017 at 21:10
  • \$\begingroup\$ @glen_geek: Using bjt instead of a mosfet will give me the same results or introduce more issues? \$\endgroup\$ Commented Apr 21, 2017 at 7:35

2 Answers 2


Sounds like a job for the trusty old LM339 comparator to me.


simulate this circuit – Schematic created using CircuitLab

Note: I didn't add any hysteresis. I figured the third colour you get when it oscillates when the inputs are equal was a bonus feature.

  • 1
    \$\begingroup\$ Why, you're a true engineer, Trevor...marketing must love your "features". +1 for eschewing the extra resistor. \$\endgroup\$
    – glen_geek
    Commented Apr 20, 2017 at 21:19
  • 1
    \$\begingroup\$ I would not rely on 2.7V zenner accuracy, it would need larger current - 30-50mA to achieve nearly stable 2.7V. You can use TL431 instead which can work with 1mA. I also love such extra features that come out of nothing :) \$\endgroup\$ Commented Jul 27, 2017 at 10:54

If you want precise and fairly accurate switching use a comparator instead of a transistor. With a transistor you will get "soft" switching and there will be a band of voltages that cause both LEDs to illuminate as you are witnessing. So, use a comparator (hard switching) and then use an inverter fed from the comparator output to power the 2nd LED. You'll barely have any band where both LEDs are on together but this can be more guaranteed by using a smidge of hysteresis on the comparator.

These are fairly common practices so use google to obtain several examples of circuits such as search for "comparator with hysteresis".


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.