chebe: (Default)
chebe ([personal profile] chebe) wrote2020-06-23 09:48 pm

Generate -5V to 5V signal from Arduino

An Arduino microcontroller can generate a square wave on PWM pins to simulate an analog wave. But the wave alternates between 5V and 0V, it doesn't change polarity.

If you have a component that expects an AC signal you need to change the 0V to 5V signal to a -5V to 5V signal.

One simple way to do this is with a SparkFun Transceiver Breakout. Connect the Power pin to either 3.3V or 5V on the Arduino, GND to GND, T2IN to a PWM pin, and T2OUT to your component. analogWrite() your required frequency to control your component.



Back of SparkFun Transceiver Breakout with labelled pins visible
Photo by [personal profile] chebe


Post a comment in response:

(will be screened)
(will be screened if not validated)
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

If you are unable to use this captcha for any reason, please contact us by email at support@dreamwidth.org