# DC/AC generator

#### Garry

Joined Jul 1, 2005
12
Hi,

I'm more of a digital/microcontroller guy, so I'm sort of out of my league here ...

for some experiment, I'm looking for some circuit that will generate some sine(ish) A/C from D/C input, if possible with adjustable frequency (1-100Hz would be fine I guess), adjustable voltage (step-down only, 9-12V A/C would be enough with an input of up to 30V DC), and if possible a DC offset (e.g., 9V A/C +/- 9V D/C). Amps don't need to be very high, some 20-40mA should do nicely ...

Adjustments via potentiometer would be OK, though it would be cool if the settings could be adjusted digitally (e.g. microcontroller etc.), allowing for some semi-automated tests.

Any suggestions as to how to implement something like this?

#### MrChips

Joined Oct 2, 2009
22,551
Use a microcontroller with a DAC output.

#### Garry

Joined Jul 1, 2005
12
Which supports that load? Just looked at some spec docs, e.g. Atmel only has their DACs rated at up to 10mA ...

#### SgtWookie

Joined Jul 17, 2007
22,220
You can use a power opamp in a non-inverting amplifier configuration.

An L272 is an inexpensive and widely available power opamp that can source/sink up to 700mA.

#### MrChips

Joined Oct 2, 2009
22,551
Thanks for this Wookie. If you need more drive, LM675 is good to 3A, though a bit more expensive.

#### SgtWookie

Joined Jul 17, 2007
22,220
Might check out the L165V, too - 3.5A, and under a buck if you look around for them.
AvnetExpress sells them for $0.81 when you buy 1. Future Electronics has them for$0.79/ea
Mouser & Digikey both have it for ~$1.71/ea. Cheapest I can find the LM675T is$3.12 @ Future Electronics. Mouser & Digikey are around \$6.70 ea.