Electronic – How to a GPIO logic to high amp/voltage logic adapter be built using multiple voltages? (5v, 12v, 24v)

fpgagpiolevel-shifting

I'm working on a project that requires making a fairly universal board (to work on different model machines). I need to hook up many pre existing motors and switches/sensors to the board that all work off of different voltages and have their own unique pin/plug configuration. I figured using fpga would allow programming of the correct configuration, but I need the 3.3v fpga pins to accept input/output from 5vdc, 12vdc, and 24vdc selectively. Is there any simple solution out there? They all need pwm capability, and the ability to drive small motors/devices.

I have thought of using load switches for the outputs, which seems correct. As for inputs, I was thinking isolators, but they don't allow such a wide range of input voltages if I am correct. The only other thing I can think of is voltage regulators in series or parallel to convert the voltage to 3.3v logic. However this may pose a problem where pins can not be ground (as in 0v) for high current as well as serve as a logic input. Any help or ideas would be appreciated.

Best Answer

For your wide range inputs you could consider a solution that I have used a number of times. Bring your inputs in through a circuit like this:

enter image description here

As shown the input threshold for high/low is set at 2.5V by use of the TLV431. The input signal coming through the 2.2K series resistors are clamped to the 5V supply to keep them in safe input range of the AM26LV32. Outputs swing from rail to rail of 0 to 3.3V for input to the FPGA.