Analog help : +/- 5v DAC with AVR

Go To Last Post
7 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

I need my AVR to output two separate +/- 5v analogue outputs. (to control two galvanometers, high impedance, low current.)

I've decided to use an SPI device, as it will be easier to interface to. So I searched on Google for a dual channel 8bit SPI DAC, and this one popped up in the top 3 : "Analog Devices AD5429"

http://www.analog.com/static/imp...

So, I can interface the DAC to the AVR. But I'm struggling on the external opamp circuit I'd need to take the output from the DAC to +/- 5v. I have a +/- 15v supply.

Luckily for me, the data sheet has a detailed schematic of their evaluation board, which I think is very close to what I need. Is it as easy as changing the supply to the opamp to +/- 5 v ? (changes marked on the schematic in red rings) (plus I know I need to turn the polarised capacitors around accordingly), or have I over simplified the problem ?

On page 16 the data sheet says "In some applications, it may be necessary to generate full 4-quadrant multiplying operation or a bipolar output swing. This can easily be accomplished by using another external amplifier and three external resistors, as shown in Figure 39"

I think I need a "bipolar output swing" ? Which means I need two opamps on each output ? right ?

Help ? I'm a bit lost with opamps.
:-)

Regards,

Jon.

Attachment(s): 

Jon Russell

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I dont think you need the external dac. Nor do you need a bipolar output for a galvo. A 16 bit pwm out with a big RC lo pass filter would drive a galvo. 50% pwm duty would be 2.5V out. A trim pot in series with the meter would let you trim this to center the deflection. Lots of avrs have 2 16 bit timer outs.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Possibly. The galvos I have are for controlling lasers and are rated at 20 kpps (i.e. the cheap ones, the more expensive ones do 40 kpps). Thats a different voltage every 50uS. Now I doubt I'll get that over SPI, but I wont get anywhere near that with a PWM and low pass filter ? What’s the maximum frequency I could get out a PWM signal output ? Also, the driver amps that come with the galvos require a +/- 5v input. But I could ground the - pin and drive 0-10v. I just wanted to do it properly :-)

Jon Russell

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

OK, the req for fast update rate sort of puts the kabosh on the pwm trick. Its easy to cvt the 0-5V dac out to +-5V. Just need 1 trimpot to both the + opamp ins for bias. Set the gain resistor ratio to gain of 4 (10v/2.5V). Note you labeled the Vss as +5V, but it should be -5V. Vdd is the +5V. You apply the 2.5V bias to the + in instead of grounding it as shown.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Ta. I'll give it a go.

Jon Russell

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You see the bit in the spi control register that speeds it up x2?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You will "simply" need a gain of 2X for each amplifier (5V ppk in, 10V ppk out) and offset each input negative by 2.5V (that is, when the DAC generates 2.5V, you subtract 2.5V from that and get 0V out.

Looks to me like that circuit does that, or very close to it.

Jim

 

Until Black Lives Matter, we do not have "All Lives Matter"!