# How to add an offset to a PWM signal to control a N-channel MOSFET that has a large source voltage?

I want to control a N-channel MOSFET through a PWM signal generated by an Arduino board. The amplitude of such PWM is 0V-5V with respect to GND with frequency 20kHz.

My idea is to send the PWM signal to the gate of the MOSFET but the problem is that the source of the MOSFET is connected to a time-varying voltage Vs. For instance, between the source and GND there is a LC circuit, see figure below.

If Vs is too large, then Vgs = Vg - Vs will always be small (or even negative) and the MOSFET will never switch state, no matter the value of the PWM. For this reason, I connected the "negative" terminal of the square wave generator to the source through a resistor to secure that Vgs is in the range 0V-5V as shown in the picture below.

The drain voltage Vdd range is also varying in the range 0V-15V.

Given that the PWM range from Arduino is 0V-5V with respect to GND, my implementation idea is to sum Vs to such a PWM so that it holds Vg = V_PWM + Vs and therefore Vgs = V_PWM which should be enough to switch state of the MOSFET to mimic what is shown in the theoretical model below.

I know that one way to sum signals is to use an OP-AMP, but I believe that for this simple case it should be possible to use a simpler circuit but I cannot find a way to design it.

EDIT: here is a scheme of the circuit I am dealing with. I need to implement the part circled in red by considering that the PWM comes from an Arduino board. In the scheme below the "minus" of the square wave generator is directly connected to the source through a resistor, whereas in Arduino the "minus" of the PWM signal is at 0V.

• What are the expected voltage limits of Vs? Aug 17, 2023 at 16:15
• Tell us about the application: what is it, what is the MOSFET doing, what is Vs, how fast is it changing, what is the drain voltage, what other supply voltages do you have available, etc.? Aug 17, 2023 at 16:16
• You might want to consider some sort of bootstrap circuit, which is the common way of solving this problem for High Side Mosfet switches Aug 17, 2023 at 16:17
• A bootstrap driver is a typical solution here, but you will need a modification from the base case: electronics.stackexchange.com/questions/622398/… Aug 17, 2023 at 16:49
• Why not just use a P mosfet? Aug 18, 2023 at 1:21

Q: This is a buck converter, right?
A: Yes, kind of.