Electronic – arduino – Potentiometer volume control for a piezo buzzer in bridge (2-pin) configuration

arduinoModulationpiezopiezo-buzzerpotentiometer

I have a 10K potentiometer that I'd like to use to control the volume of a piezo transducer/buzzer, which is driven by one or more MCU PWM-capable pins (ranging from 0 to 3.3V). Originally, my configuration looked like this, using a single pin:

schematic

simulate this circuit – Schematic created using CircuitLab

I need to adapt this to use a bridge configuration across the piezo buzzer, using two separate PWM-capable pins, similar to what's shown below, except with volume control somehow:

schematic

simulate this circuit

The bridge configuration has a number of advantages, like increasing the overall max volume and allowing emulation of two channels (similar to the Arduboy2 or toneAC library).

Is there any simple way that I can effectively scale two separate signals with the same potentiometer? Preferably, I'd need to stick with simple through-hole components.

Some things I've thought about:

  • Using diodes somehow, maybe in an ORing configuration, but I don't think this will give the desired effect.

  • Since I do have a DAC available on my MCU (SAMD21E), I can mix the two audio signals (square waves) in firmware and output on the DAC pin, using the configuration in diagram 1 to control the overall volume.

Thanks for any help or advice.

Best Answer

schematic

simulate this circuit – Schematic created using CircuitLab

Just replace ground with the other phase.