Go Down

### Topic: DAC analogue output scaling / amplifying (Read 1 time)previous topic - next topic

#### mr2b

##### Oct 01, 2013, 01:11 pm
Hi there,

I'm an electronic newbie and I'm experimenting with the DAC of the Arduino DUE and with an MCP4725 DAC connected to the DUE - both true 12bit DAC, no PWM. I want to use the output voltages to controle modules from a modular synth system (like the doepfer).

The voltage output ranges for the both DACs are:
0.55V - 2.75V for the DUE
0V - VDD for the MCP4725   (VDD can be 3.0V - 5.0V)

Now I need a circuit that lets me scale theses outputs to let's say 0V - 1V or 0V - 2V for the full 12-bit range and I have to make sure that the output currents do not exceed the  limits of the DACs:
40mA for the DUE
25mA for the MCP4725
(When I connect the outputs directly to the synth modules, I measured that the currents increase with the voltage and get to soon to high.)

I've searched the web and think I need something like an opamp (for the MCP) or an differential opamp (for the DUE) but many of the solutions I found seem to be very extensive...

So, has anybody experience with this topic and can give me a hint or maybe point me in the right direction...

Many thanks!

#### dougc314

#1
##### Oct 04, 2013, 06:12 pm
Yes for the DUE you can use a differential amplifier. For 0 to 1V you will want a differential gain of 1/2.2. For 0 to 2V you want a differential gain of 2/2.2.

Referring to the figure 4 in the  wikipedia article on differential amplifiers http://en.wikipedia.org/wiki/File:Op-Amp_Differential_Amplifier.svg
The following values would work well... set Rf and Rg to 9.09 K (1% resistor) set R1 and R2 to 20.0K (1% resistor). The differential gain will be very close to 1/2.2., giving you a 0-1V output. With Rf and Rg at 18.2K (1%) the range is 0 to 2V

Note that the node labeled V1 needs to be connected to 0.55 volts and the node labeled V2 is the DAC0 or DAC1 voltage.
You can change the circuit and get 0.55V for free. Connect a new resistor (24.3K, 1%) from the neg opamp input (junction of R1 and Rf) to ground , and change R1 to 121K (1%), and connect the node labeled V1 to 3.3V. Now the resistor divider does two things at the same time, divides the 3.3 to 0.55, and has a parallel resistance very close to the original 20K.

If you want to you can use the closest 5% values 20K, 9.1K, 18K, 24K, 120K for the various resistors instead of the 1% resistors I specified, however, the actual voltage range (which wasn't exact with the 1% values) are likely to be less exact with the 5% values.

There is one problem though, and it is probably why the DAC doesn't do it (output 0V). Its very hard to make an OPAMP circuit output a voltage all the way to its supply rail. There are "RAIL to RAIL" opamps, but they usually the only get very close, (say .1 to .2V) not really all the way. To make your differential amplifier really deliver 0V you will almost certainly have to use a bi polar supply, say +/- 3.3V. The opamp usually has two supply pins for just this purpose.

Regards, Dougc314

Go Up

Please enter a valid email to subscribe