[personal profile] chebe
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

Profile

chebe: (Default)
chebe

June 2025

M T W T F S S
      1
23 45678
9101112131415
16171819202122
23242526272829
30      

Expand Cut Tags

No cut tags

Style Credit