Output negative voltage to Buzzer

Hi everyone, I am not sure if I post on the right place.
My project is going to output negative and positive voltage to Buzzer(-5V~5V).
I am using the Arduino Uno and its operating voltage is 5V. I am wondering how can I output negative voltage without any extra IC or board?

I have tried a solution but I am not sure if I am doing right. I used the potentiometer to adjust the analogInput from 0~1023 to change the output from -5V to 5V. And my code is :

const int analogInPin = A0;  
const int analogOutPin = 9;

int sensorValue = 0;   
int outputValue = 0;       

void setup() {
  Serial.begin(9600);
}

void loop() {
  
  sensorValue = analogRead(analogInPin);
 
  outputValue = map(sensorValue, 0, 1023, -5, 5);
  
  analogWrite(analogOutPin, outputValue);

  Serial.print("sensor = ");
  Serial.print(sensorValue);
  Serial.print("\t output = ");
  Serial.println(outputValue);

 
  delay(2);
}

I used "map" command and set the (toLow, toHigh) to (-5, 5). I don't know if this is right for setting the voltage range from -5 to 5, but the buzzer was turned off when the serial monitor shows the output=0.

Could you guys give me some suggestion or advice? Thank you so much.

is this a buzzer with a built-in tone generator or a piezo transducer/speaker?

The Arduino runs from a +5V supply and it cannot go negative. It's also digital so the output is either high (about +5V) or low (about zero volts). Analog out is only approximated with PWM, and although you may be able to hear the PWM it may not be what you want. The tone() function puts-out a square wave. (50% PWM should give you the loudest signal because it's also a square wave.)

But there is a "trick"... You can connect the piezo transducer between two output pins. Drive the pins in opposite directions and you create a bridge connection and you'll get 10V peak-to-peak across the piezo. But, you can't use the tone() function without an external inverter chip because it won't drive the pins oppositely.

DVDdoug:
is this a buzzer with a built-in tone generator or a piezo transducer/speaker?

Hi DVDdoug, it's the buzzer with a built-in tone generator.
Yes, it's a trick...I connect the multimeter and it's not a negative voltage...:frowning:

So is there any suggestion you could give me? If I connect external board?

Hi,
Can you post a link to data/specs of the "buzzer", please?
Can you post a picture of the 'buzzer", please?

Thanks.. Tom... :slight_smile:

Hi Tom,

This is the buzzer I am talking about.

Thanks:)

DVDdoug:
But there is a "trick"... You can connect the piezo transducer between two output pins. Drive the pins in opposite directions and you create a bridge connection and you'll get 10V peak-to-peak across the piezo. But, you can't use the tone() function without an external inverter chip because it won't drive the pins oppositely.

Doug, Can you explain how this comes about, never heard of it before. Maybe a link?

I think that you may be misunderstanding the piezo you have...

Hi,
And here is the spec sheet.

Tom..... :slight_smile: