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.