# Digital/Analog voltage conversion and switching

What circuit topology should I use for digital high voltage (20v-30v) to low voltage (3.3v-5v) conversion (for MCU input) and vice-versa? I can think about the following topology:

1. Voltage divider based
2. Power MOSFET based switching with NMOS gate drive

Further to this question, what topology should I use for analog voltage and current input from high side (20-30v) to MCU side (3.3v-5v) for ADC input? I can think about the following topology:

1. Non-inverting Op-amp amplifier
2. Voltage controlled current amplifier

Reference: I wanted to integrate the solution into my existing embedded system and the particular product feature I am looking for can be referred from this link: http://www.phidgets.com/products.php?category=0&product_id=1012_2

1. For digital signals - Voltage divider + zener

2. For analog signals - Inverting OpAmp (a non inverting Op amp cannot attenuate) You can then "correct" the inversion by firmware or by SW, or you could use a voltage divider followed by a unity gain non inverting op amp.

• 1. This is for digital input, what topology for digital output from low side to high side. Aug 29, 2016 at 6:42
• 2. Analog - What about analog input current? Input side is having 0mA to 20mA current range. Aug 29, 2016 at 6:51
• For an analog input current you can make a current to voltage converter using an op amp Aug 29, 2016 at 8:34
• My circuit is supposed to switch faster and power efficient as well. I have a general understanding that voltage divider circuits always consume current and thus power dissipation happens. Further, for logic level conversion, most modern circuit designs are made up MOSFET+NMOS topology. Where to consider MOSFET in switching and voltage conversion application? Aug 29, 2016 at 12:03

What circuit topology should I use for digital high voltage (20v-30v) to low voltage (3.3v-5v) conversion (for MCU input) and vice-versa? I can think about the following topology: 1. Voltage divider based 2. Power MOSFET based switching with NMOS gate drive.

Voltage divider. It's very simple and requires no active components. If calibration is required a small trim-pot can be added. See Figure 1a.

For DAC output 0 - 30 V, a non-inverting opamp is required. See Figure 1b. Gain is $1 + \frac{R_5}{R_6}$. I have chosen supply voltages so that the opamp doesn't have to run rail to rail. You may decide otherwise.

simulate this circuit – Schematic created using CircuitLab

Further to this question, what topology should I use for analog voltage and current input from high side (20-30v) to MCU side (3.3v-5v) for ADC input? Input side is having 0mA to 20mA current range.

For this you need a current to voltage converter - a resistor. See Figure 1c.

• My circuit is supposed to switch faster and power efficient as well. I have a general understanding that voltage divider circuits always consume current and thus power dissipation happens. Further, for logic level conversion, most modern circuit designs are made up MOSFET+NMOS topology. Where to consider MOSFET in switching and voltage conversion application? Aug 29, 2016 at 10:48
• Faster than what? What power loss have you calculated for the potential divider suggested? Aug 29, 2016 at 12:41
• You are not doing logic level conversion. You specified analog. Aug 29, 2016 at 12:43
• This last comment is particularly for digital input/output question. Particularly I am looking for a solution according to this device which is using NMOSFET: phidgets.com/products.php?category=0&product_id=1012_2 Aug 29, 2016 at 13:45
• Sorry, but that's a new question. Aug 29, 2016 at 13:47