Generating multiple sine or square waves

I need to generate waves to run piezo transducers at 60kHz frequency and 10-20 volts (it doesnt matter if they are square or sine waves). The trick is that i need to generate multiple (most probably 6) of these, all with different frequences which frequencies i can change with the arduino.
Because of this there is no way i can use the arduino PWM. I would also need this to be as precise as possible.

I thought of doing it with astable (op-amp) multivibrators where i would use some kind if variable resistance that i can controll with the arduino and thus controll the frequency, but since im inexperienced with this im not sure if its the best way or if it would be a good idea at all.

Could anyone point me on the right direction on this?

Fyi im using an arduino uno if thats relevant information at all

You either need a timer per piezo for a hardware solution or you need a sufficiently fast Arduino for a software solution.

Use an AD9833 and an amplifier for each channel. A bit overkill but you get very good control. There are multiple breakout modules for the chip available. They claim up to 12.5 MHz for sine waves, but above 3-4 MHz the output gets rather grainy and the output decreases.

1 Like

generating 50KHz pulses with an ESP32 using a timer interrupt is simple - see creating-a-modulated-signal-using-timers-with-a-variable-duty-cycle, e.g. 100KHz
image

however, six with different frequencies would probably require multiple ESP32 devices
how are the frequencies related to each other? are they synchronised in some way?

No, the frequencies would change independently.

Thanks, i will look into it. I really couldnt image myself needing anything higher then 100kHz, and i only need to be able to wary the frequency a few percentages. I was also looking into an IC called "ICL8038", where i could change its frequency with some digitally variable resistor, is that viable?

Edit: nevermind, youre suggestion seems to be much better suited for my uses. Quick question though since i havent really built anything like this before and since we are already here what kind of amplifier would you use?

The ICL8038 is a very old analog chip, it has long been replaced by easier to use DDS chips.

I haven't designed an amplifier in ages, so don't have much advice.
Some things to consider.

  • The piezo transducer is a capacitive device so normal audio designs might have problems
  • If the transducer doesn't need to be grounded you can use a bridge circuit to double the voltage across it.
  • I would check on high voltage op amps and stereo audio amps to see if any of them are possibilities.
1 Like

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.