Trying to make a piezo screamer with a transducer from an old alarm system and a dual voltage power supply.
Thought it would be as simple as pic related, using a 3.3V square wave to switch two MOSFETs to drive the piezo at 20V. LTSpice suggests I'm doing this wrong though, as the waveform across the capacitor (piezo) comes out as centered around 9V and has a swing of about 1V.
Am I using the MOSFETs wrong or is 3.3V just not enough to drive the gates?
pic related is the voltage across the capacitor, sorry if this is a really simple question.
>>1045114
Hint: MOSFET turnon is determined by the gate-to-source voltage (V_GS).
>>1045112
Yeah amoung other things, 3.3V probably not enough to drive the standard model MOSFET you are using for your simulation. That being said, you can easily get MOSFETs that can be driven off 3.3V though they tend to have relatively high on resistance (~100ohms) but that shouldn't be a problem for driving a piezo. Also your M2 low side MOSFET is the wrong way around, you need source always negative side, drain always positive otherwise in most real MOFETs which have an integral anti parallel diode it'll just short circuit or if it's a special one that doesn't, its performance will be sub par. You'd also likely get better results using a proper H-bridge and doing proper differential drive instead of the fuckery u got going on here.
>>1045112
your schematic is the most fucked up thing i've seen this week. trash it and read a book
The schematic I wrong.
You should look at a how a halfbridge works. Or a push pull configuration, but this would require a transformer with split primary windings..
Also supply a model for your mosfets..
The mosfet will only turn on when the GATE to SOURCE voltage is above Vth. This is where most people fail. Especially when switching halfbridges or high side mosfet..