Page 1 of 1

AC converter to DC

Posted: Sun Mar 22, 2026 2:35 pm
by gpfacu
Hi,

I´m trying to generate an AC signal with my ESP-32 and I´m having some inconviniences. I´m going to be sending squared pulses from 0V to 3.3V, the period is going to depend on what I need at the moment, but generally it´ll be something like 10ms ON - 100ms OFF. Can anyone give me some advice on how to achieve this?

Thanks!

Re: AC converter to DC

Posted: Mon Mar 23, 2026 3:16 am
by mikemoy
The ESp32 has a DAC, you should look into using that.

Re: AC converter to DC

Posted: Mon Mar 23, 2026 4:15 pm
by MicroController
Use a timer. Set it to e.g. 100ms. When it expires, turn output on, reset timer to 10ms; next time it expires, turn output off, reset timer to 100ms.