200V piezo crystal driver

Spoiler alert: I got the driving circuitry to behave as planned, but I could not feel the crystal vibrate.

The idea is to use the tiny crystals used in piezoelectric motors to create an array of dots that can be made to vibrate under the area of a finger tip. This will be used to create a tactile display that can be felt. The initial aim would be an array of these crystals under an area the size of your fingertip. This would enable things like a Braille or Moon display that can be felt under your finger and that updates real time.

These crystals are designed to resonate at around 40 kHz. Now, you won’t feel something vibrating at this high a frequency. Your touch is sensitive to vibrations of around 10-100 Hz. So the crystals need to be driven with a frequency of around 40 kHz, which is then switched on and off (modulated in engineering speak) at around 30 Hz. All of this with a voltage amplitude of around 100 V RMS (200 V peak to peak for a square wave). How hard could that be? Errrr….

Well, I built a 100 V power supply in another post here. However, I used some Rohde & Schwarz HMP4040 adjustable power supplies I found in the lab as I could get over 200V by daisy chaining the outputs in serial. I read the supply’s manual online to check that the outputs could be connected like this safely. I ended up with around a 220 V peak to peak waves, modulated at around 30 Hz.

How to create a 40-42 kHz output signal which is then switched on and off at about 30-50 Hz? I used an N-channel MOSFET (FET) to switch a low voltage signal, with the gate of the transistor operated by an operational amplifier (op amp). The op amp input comes from an external microcontroller. I thought of lashing something up to create this input using a BBC micro:bit. Then I hosed money at the problem until it went away and bought an Analog Discovery 2 gizmo with a built in waveform generator. The software for the Analog Discovery allows for signals to be modulated, so I could easily create got the driving signal I was after. There are a range of YouTube videos to get you started with the Analog Discovery 2.

Top tip. Run the Analog Discovery from a laptop and disconnect the laptop from the mains when connecting the Analog Discovery 2 to your circuit. I measured the potential difference between the ground on the Analog Discovery 2 and my circuit and it was around 0.06V with the laptop connected to mains power. When running on battery, the potential difference was a magnitude lower. This means there is less chance of a ‘ground loop’ cooking off your laptop when you connect the ground of the Analog Discover 2 waveform generator to the ground of your circuit board.

I simulated the circuit using the Falstad and ltspice simulators. Simulate twice, build once as my Grandma used to say. I tried the qucs simulator as well, but could not get it to ‘converge’ with my design. Probably something I’m doing wrong.

Falstad is not as accurate as ltspice but is more interactive. Falstad runs through the browser. I found a downloadable version of Falstad called Circuit Simulator here, which seems to load the CPU less than running the browser version. I’m grateful for the all of the simulators being made available for us to use for free.

A screen grab from Falstad/Circuit Simulator can be seen below. I use a CA3140 CMOS op-amp as I found a few of them in the lab and they are fit for purpose. The FET is a 450V rated N-channel SSN1N45B (farnell p/n 2454128). This FET can handle the voltage that I need to use and can be switched on and off with a reasonably low voltage swing to the gate.

Falstad simulation of the piezo driver. The piezo crystal is represented by the 20F capacitor.

An example ‘scope grab from a Tektronix TBS1104 is shown below. The dense bursts of signal are the 40kHz driver, the larger gaps show that this is being switched on and off at around 30Hz. The orange trace is the signal from the Analog Discovery 2 board used as the input to the non-inverting port of the op-amp. The output from this op-amp switches the FET on and off. The green trace is the voltage at the high side of the piezo crystal. In this display, the driving voltage is 212V peak to peak, which is 106V RMS for a square wave. The signal frequency on the ‘scope is shown as 6.250kHz, with a question mark, as the modulation of the 40kHz with the 30Hz signal confuses the ‘scope’s frequency measurement.

piezo driver signal, 40kHz moudulated at 30Hz

The ‘scope grab below shows a close up of the gate driver where I try 41kHz as driving frequency for the piezo crystal. We can see that the FET gate is being driven with a 7.6V peak to peak square wave, which enables the 226V high voltage rail to be switched to generate the piezo driver signal. I tried a few frequencies to try and get the crystal to resonate. The gate of the FET needs around 7.5V peak to peak to ‘open’ the FET enough for the full 226V to switch through it. With a lower high voltage supply, a lower FET gate voltage is needed. I spent a few years trying to study physics, so did at one time have a good understanding of all the semiconductor shenanigans that go on inside the transistor. That was a long time ago.

We can see that when the FET gate goes high, the piezo driving voltage goes low. This is as the FET is opened by the gate going high, which connects the drain to source to ground through the 300Ohm resistor. This pulls the voltage low. When the gate signal is low, the FET is closed, so the high voltage rail is measured at the piezo crystal.

piezo driving signal, 41kHz

I messed around with some transformers with limited result. I could wind one of my own, but would rather use something off the shelf. I tried a few from coilcraft but without success. You need to be careful with transformers, as their impedance changes with frequency, meaning you can end up putting more current through them than their windings are designed for if you’re not careful, as shown by the imitable Electroboom.