TL;DR: Can I make some sort of differential voltage read with an MCU and some basic components, such that MCU with output LOW would result in a reading of 2.5V, but MCU output HIGH would result in 5V on the gate pin? This is using a 3.3V MCU (and a separate 5V power supply) and basic components such as resistors, capacitors, and diodes.
I have a MOSFET that I'm going to use for a synthetic load tester like the one seen here. Based on my testing I need to operate the MOSFET I have between 3V and 5V. I was planning on just using an RC low-pass filter to make an effective voltage. I have AVR 5V MCUs (Arduino Nano, Uno, ATtiny85), but the analog read/write resolution on these (at least as far as I've seen) is 10 bits or less. I'd rather use something like my SAMD21 based boards which can go up to 12 bits in some scenarios, but they only output 3.3V. I know of opamps and MOSFET drivers, but I really have no money to spend right now. Is there any way this can be done with just resistors, capacitors, and diodes, of which I have plenty? I was thinking about if I used some high value resistors to make a voltage divider of some kind, then connect 5V to the gate then to some resistors to an output on the MCU then pull the MCU low, the MOSFET might read 2.5V, and then as I raised the output it would raise up the gate voltage?
EDIT: Or is there a differential mode one the SAMD21 chip such as QT Py and Seeduino Xiao, or even on the RP2040 (I have a couple RP2040 boards)?
I have a MOSFET that I'm going to use for a synthetic load tester like the one seen here. Based on my testing I need to operate the MOSFET I have between 3V and 5V. I was planning on just using an RC low-pass filter to make an effective voltage. I have AVR 5V MCUs (Arduino Nano, Uno, ATtiny85), but the analog read/write resolution on these (at least as far as I've seen) is 10 bits or less. I'd rather use something like my SAMD21 based boards which can go up to 12 bits in some scenarios, but they only output 3.3V. I know of opamps and MOSFET drivers, but I really have no money to spend right now. Is there any way this can be done with just resistors, capacitors, and diodes, of which I have plenty? I was thinking about if I used some high value resistors to make a voltage divider of some kind, then connect 5V to the gate then to some resistors to an output on the MCU then pull the MCU low, the MOSFET might read 2.5V, and then as I raised the output it would raise up the gate voltage?
EDIT: Or is there a differential mode one the SAMD21 chip such as QT Py and Seeduino Xiao, or even on the RP2040 (I have a couple RP2040 boards)?
Last edited: