# square wave to sine wave RC filter

I wanted to create a sinewave at 10kHz with Vpp of lets say 90v. The current draw of the output sinewave will be 1uA.

My plan was to drive a mosfet at 10khz which will (I thought atleast )create a square wave of 0 to ~100V. I will then pass this high voltage through 3 passive RC filters to create a sinewave.

f=1/2*piRC; C=1nF; f=10000 --> R ~ 16K Vgs of the mosfet = 10v mosfet = IRFB20N50K

as you can see below the circuit is simple, however when I run the simulation the square wave at the drain of the mosfet is not even 10v and therefore the sinewave Vpp is very small.

Can someone please tell me what obvious concept am I missing? isn't this the way TTL mosfets work? I have just simply increased the voltage to 100V.

If this is just bad practice then can someone please suggest another method?

Thanks guys

You have available 100Vpp or 50V square amplitude. Theoretically optimal filtering would extract surprisingly 63,7V peak sinusoidal voltage from it. It means 45V RMS.

The RC filtering is far from ideal. You get DC through it and you must attenuate the fundamental sinusoidal component to keep the higher harmonics invisible at least in the oscilloscope.

You should replace your RC filter by a narrow band bandpass filter.

You use the mosfet as cathode follower. Your max output voltage to the filter is about the same as at the gate of the mosfet. Another answer gives a fix: use the fet as common cathode switch. Beware: You will dissipate hefty 5 watts in R10 and have 50VDC at the ouput.

Consider to generate the sinusoidal in low voltage and have an amp or transformer or both.

Just in case you want to generate the final sinusoidal voltage without a transformer and you do not want an amp due the low current consumption, I give one possiblity:

The resonant circuit L1C1 is the simplest possible bandpass filter that has reasonably low bandwidth. It's excited by current limited mosfet that pulls 10 kHz square pulses. Very soon there builds up a remarkable AC voltage to the drain of the mosfet. The voltage swings approximately 0V to 2 x Vsupply. If you have 50 volts Vsupply, you can expect 100Vpp AC voltage.

There are losses, but the theoretical overshoot partially compensates that.

A proper L1 is easily available as HiFi speaker tweeter filter coil. You must connect C1 from several capacitors to get the right tuning despite the coarse tolerances of the coil and capacitors. Elko is not an usable capacitor type, have for example polycarbonate or polyester caps. Note: The voltage rating. You must also select a type that stands at 10 kHz that 100Vpp or whatever your voltage is. This requirement IS NOT TRIVIAL!!!! A 100V DC-only type will get internally hot and blow.

There's a simple highpass filter 100nF / 100kOhm that removes the DC. It has a time constant, so you do better if you add a pair of opposite zener diodes that prevent the overvoltage in the startup.

You can add different resistors as loads to see how the output voltage drops when loaded. A few microamperes mean nothing. Probably you can calculate how much energy is needed to accelerate a known viscous fluid particle to a wanted velocity and move it to a wanted distance. This is your real load.

You can add a buffer voltage follower amp for greater output currents and for isolating the filter from capacitive loads.

Consider to use high voltage solid state AC relays for distributing the AC voltage. An example: Panasonic AQW216.

• Thanks, I like the idea of the bandpass, I will try that method. however I rather not use a transformer because from my understanding, power on both sides has to be balanced and since I will have (eventually) 150Vrms at 1uA, the input to the transformer has to draw alot of current to balance the equation and I just wanted to avoid that if possible plus the transformers tend to be bulky. The DC offset at the output is still an issue but not that big of a deal. The 50W dissipation might be avoidable by "nonya_business " suggestion. would you please clarify if im wrong? Apr 13, 2017 at 19:58
• @Udiny The balancing: 1uA at 150Vrms means 15uA at 10Vrms. 15uA is quite small when compared to the average 50mA in R10. BTW I wrote only 5W dissipation after making the circuit as nonya_business suggested. But that 5W comes from P=(U^2)/R multiplied by the duty cycle 50%. nonya_business surely confirms that, if you ask. I add soon the bandpass filtering circuit (no transformer)
– user136077
Apr 13, 2017 at 20:40
• @Udiny Only curious: what useful will your 10 kHz 90Vpp sinewave do? You wrote its current is only 1uA. That's not especially generous , not at least to do some mechanical work.
– user136077
Apr 13, 2017 at 20:50
• i plan to use this for digital microfluidics applications. essentially you can move small droplets (biological sample mostly) using the "electric field". so imagine a droplet sandwiched between a GND thin conductor and a High voltage conductor (this is of course the simplified explanation). that system can be modelled as a really big capacitive load and therefore there wont be much current. i will try to implement all of your suggestions. i have never designed high voltage circuits like these and really do appreciate all the help you guys give :) . Apr 14, 2017 at 0:37
• @Udiny is the sinusoidal voltage essential? Note: Capacitive load comes as a capacitance in the circuit. The circuit cannot be a high Q passive filter that depends heavily on the capacitance values. I see that you need AC to prevent unwanted electrolysis and to create some manageable motion. How about current limited square voltage sources that essentially give triangular voltages to capacitive loads?
– user136077
Apr 14, 2017 at 2:12

One obvious thing is that you are using the n-channel FET as a high-side switch. Swap the positions of R10 and M1 to make it low-side.

• Thanks a lot, that did solve the issue with the square wave. it is now at 100V. the Vpp of sinewave produced is around 20v but I assume that is normal because of the 3rc filters. Apr 13, 2017 at 19:08
• @Udiny It will also be a little unbalanced because the RC constant for charging your first stage has an extra 1 kOhm than when discharging. You could wire up a slightly more complicated circuit with another transistor as a low side switch to switch a high-side p-channel FET instead, you just have to understand how FET gate-source voltages need to be biased to turn them on/off properly.
– user146257
Apr 13, 2017 at 19:24