DUE DAC 0-3.3V to bipolar 10V

I'm working on a flight simulator and need to use our Arduino Due to send -10V to +10V to a hydraulic pump that controls the pitch and roll on the simulator.

Could I achieve something like this using the DUEs built in DAC and scaling up the voltage with an op amp?

If this would work, I could really use a schematic and parts list to follow. I'm more of a programmer than an electrical engineer.

Any help would be appreciated.

Here's a video of the project so far.

I assume you're asking for a ±10volt signal for a motor driver, not a ±10volt to drive the motor. Attached example diagram will do that. You need a bi-polar ~12volt supply, with decoupling on the opamp (not drawn). The 5k resistor can be 2*10k in parallel.
Leo..

Super cool project, congrats !

Note that DAC0 and DAC1 output a signal within the range 1/6 * 3.3V and 5/6 * 3.3V.

IMO, you should firstly fix the range "issue" and afterwards the bipolar issue.

Mixing the Wawa answer above and this blog should send you to the right track:

@Wawa Your assumptions are correct. We have a PC power supply that can provide the bipolar 12V. Any recommendation on an IC I could use for the op amp?

ard_newbie:
Super cool project, congrats !

Note that DAC0 and DAC1 output a signal within the range 1/6 * 3.3V and 5/6 * 3.3V.

IMO, you should firstly fix the range "issue" and afterwards the bipolar issue.

Mixing the Wawa answer above and this blog should send you to the right track:

ArduPicLab: How to modify analog output range of Arduino Due

If someone can make the modification I would be grateful. Does the Due never output 0V if you set analogWrite(DAC0, 0)?

Hackmodford:
Does the Due never output 0V if you set analogWrite(DAC0, 0)?

See page 1412 of Sam3x datasheet.

Change the 10k into 15k, and the 5k into 4k3 (standard 1% metalfilm E24 values).
That will get you close with a D/A range of 1/6 to 5/6.

Almost any modern cheap opamp should do.
Check that it can do the ±10volt swing on a ±12volt supply.
Leo..

Would something like this work?
Texas Instrumen UA741CP OP Amp Single General Purpose 18V 8-Pin Plastic Dip Tube (Pack of 20) Amazon.com

Also, I’m not sure what decoupling is.

A 741 is a >50-year old dinausaur.
Still used in many example diagrams, but yeah-nah, museum stuff.

It's sibbling, the LM358, is already heaps better.
Not sure if it can reach +10volt on a bi-polar 12volt supply.
Also depends on the 'load' (input impedance) of the motor driver you're connecting it to.
Reaching -10volt won't be a problem.

Haven't bought any modern general purpose opamps for years (still using old stock).
Maybe others have a recommendation for a GP opamp with rail2rail outputs for a ±12volt supply.
Leo..

@ wawa

I use TL084 for the general applications. I think that can also help in this application

Yes, the TL07x and TL08x (single/double/quad) J-fet opamps used to be the default GP opamp in the eighties/nineties.
Still have a few tubes of those. No rail2rail outputs though.
Leo..

For future reference, I asked an Electrical Engineer I know what OpAmp to use and he suggested the LM7322. (This meets the specific requirements of my project.)

It looks like they only have a surface mount version of it. Not ideal, but I can work with that.

I had to add a .1uf capacitor to the output of the schematic to get rid of some noise from a power supply. Does this change the offset? Because now I'm getting -7 to 12 as the range.

Although I'm not familiar with this opamp in general you should not drive a high gain amplifier straight into a capacitor especially one as high as 0.1µf.

I suggest you put a 0.1 cap from the +12V to ground and another from the -12V to ground. If you still have noise you can add resistor at the output of the amplifier of the order of 100 ohms then add a 0.01 cap. You might get by with a 0.1 after the 100 ohms but I'm not sure with this amp.

Note when I say at the output I mean after the 10k feedback resistor. If your input is low impedance the 100 ohms could be a problem but its likely you are driving a high enough impedance so the 100 ohms will not cause you an issue.

John

For some reason the opamp started working as expected again, so I'm assuming something was shorted at some point...

In any case, what if it was a 10 ohm resistor with a .1uf cap? That's how it was setup on the board I am trying to recreate with the Arduino.