0
\$\begingroup\$

I've designed a circuit to drive a +5V MCU input from a +24V signal that I believe would work, but looking at other examples it seems like MOSFETs aren't frequently used for this purpose. My primary goal with using +24V is that it's the input voltage for other functions on my board, so its readily available, and using a higher voltage on limit switches is useful for preventing false triggering. The basic idea is to use a zener diode on the gate of the MOSFET to prevent anything < ~+18V from driving the gate. Would this work? I've seen solution that involve voltage dividers, which seem inefficient, and opto-isolators, which would be somewhat pointless here as the +24V for the limit switch signal is coming from the same board.

enter image description here

\$\endgroup\$
1
  • \$\begingroup\$ Your existing solution would work better if you swapped the diode and the resistor. Use something like 10V-12V zener. 18V is kind of high to protect 20V abs max Vgs. But still. the simplest thing to do is just use the existing 5V you have, run that through the switch, and back to the MCU. No circuitry required. Also, using a higher voltage on the switch doesn't do anything for false triggering so you don't gain anything. If false triggering is a problem, you have a switch problem. Or noise is triggering the MCU. \$\endgroup\$
    – MOSFET
    Commented Feb 23 at 17:41

1 Answer 1

1
\$\begingroup\$

You can just use a voltage divider. No transistor necessary. BTW, using 24V instead of 5V won't prevent false triggering. That sounds like a problem with your switch.

schematic

simulate this circuit – Schematic created using CircuitLab

Or you can level shift it:

schematic

simulate this circuit

Or you can do this for ultra low power/current usage:

schematic

simulate this circuit

\$\endgroup\$
2
  • \$\begingroup\$ So the reason I'm not crazy about using a voltage divider here is because: 24V/2.4kΩ = 10mA 10mA^2 x 2.4kΩ = 0.24W So I could just barely use a 1/4W resistor, but it would get hot. I'd really like to know if my circuit would work, or if not, how I could use a MOSFET to do this. \$\endgroup\$
    – flimsy
    Commented Feb 23 at 17:07
  • \$\begingroup\$ @flimsy, double the resistor values and put two of each in parallel. If heat generated is really a requirement over simplicity and cost, than the optocoupler is a fine solution. Why would you think it's pointless? BTW, I've included one more idea in my answer. \$\endgroup\$
    – MOSFET
    Commented Feb 23 at 17:19

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.