I need to amplify the output range of the Arduino Due's DAC from 0.55v-2.75v (approx. according to the doc) to 0-12v. Do you guys have any idea how to do that ?
I'm not an electronic man and I don't know if I should make a circuit with some op amps or is there already some components that can make all the stuff.
Any reference for an op amp or any other component will be very helpful.
What's your application? How much current do you need?
A [u]non-inverting amplifier[/u] can be made with on op-amp and two resistors. The gain is determined by the ratio of the resistors and if you want to amplify 2.75V to 12V, that's a gain of 4.36. (You might want to make a gain of 5 and then you can scale-down the output in software if you don't want to go over 12V.) Typically, your resistors should be in the ballpark of 10K - 100K.
Generally, you'll need a power supply of more than 12V (maybe 15V) and if you want to go down to zero the op-amp should have a a negative power supply.
I need to amplify the output range of the Arduino Due's DAC from 0.55v-2.75v (approx. according to the doc)
I haven't looked at the specs, but are you sure the DAC won't go down to zero? You can "bias" the op-amp to offset the 0.55V but that takes a couple more resistors and a couple more calculations.
DVDdoug:
I haven't looked at the specs, but are you sure the DAC won't go down to zero? You can "bias" the op-amp to offset the 0.55V but that takes a couple more resistors and a couple more calculations.
Yes, the Due DAC is particularly hard to work because of this. The datasheet isn't helpful because you need to go to three areas in the datasheet to find the values to calculate the numbers that Monce has written. No, there's nowhere in the datasheet that actually says what this range is in volts.
I've done it with an opamp generating a reference voltage of 0.55V and then another amp configured as a difference amplifier.
Rail-to-rail opamps are capable of outputting zero volts but their output current is very limited when close to the rail voltages. If there's any real power (more than a milliamp) required then you need positive and negative supply rails. They don't have to be symmetric. I've used +13V and -5V for some designs that needed a 0-10V output.
Thank you all for your replies. I'm sorry I've been particularly busy this weekend, I couldn't check your replies.
J-M-L:
what are you driving afterwards ?
Actually I won't drive anything. I'm trying to build a small test bench and I just would like to generate some analog signals and visualize them on an Oscilloscope. So for now I don't care about the current at the output.
MorganS:
Rail-to-rail opamps are capable of outputting zero volts but their output current is very limited when close to the rail voltages.
I don't know anything about this kind of opamps. I googled it and I found that they are typically intended for application with a low input voltage. Do you have any reference maybe that can fit with the DAC's output range ?
MoncefM:
Actually I won't drive anything. I'm trying to build a small test bench and I just would like to generate some analog signals and visualize them on an Oscilloscope. So for now I don't care about the current at the output.
so why do you need to boost the signal? your Oscilloscope should be totally happy with 0.55v-2.75v?
Oh sorry, I wasn't clear enough about my application. The test bench I'm working on aims to test some cars ECUs (Engine Controller Units), and I need to simulate some specific signals with a 0-12V range, to simulate some sensors inside the car. That's why for now I need to only visualize them and see if the Arduino's DAC + the amplifier block, give results as expected.
MorganS:
I've done it with an opamp generating a reference voltage of 0.55V and then another amp configured as a difference amplifier.
I want to try your method. I found this circuit LM158N which has two opamp. I thought about using the first one as a Subtractor OpAmp and then the other one as an non-inverter amplifier :
Using a voltage divider for the 3.3V output of the Arduino to have approximately 0.5v.
Use it in the inverter entry of the first opamp, and the Dac's output of the Arduino in the other one, using same value for all the resistors (to have something like Vout = Vdac - 0.5).
Use the output of the first as an input to the oter opamp to amplify it (don't know how to configure it tho).
V_batt in this case was 14.8V. It needs to have some headroom above the max output voltage. You can't get 12V out with a 12V input.
Resistors R18 and R19 set the reference voltage, as a ratio of the 3.3V supply rail. This is then buffered with IC3B, so that the current through those reference resistors is always constant.
Resistors R17 and R20 set the gain for the output: 10V in this case. R21 keeps the output at zero when there's no signal from the Due, during boot-up. C21 is a smoothing capacitor, because it seemed like a good idea.
Because the output can't go below zero and it can't approach the positive supply voltage. There is some "dead zone" in the output where changing the input has no effect. This particular circuit must be able to reach 0V and it doesn't matter if that is analogWrite(10)
Oh I see now. I must receive all the components in two days, so I'll try and see what I will have as result.
I saw in the LM2904 specs that it can be supplied up to 26V, so I think maybe I'll try with a higher voltage and see what will happen.
I also think about using a rail-to-rail amplifier to get closer to the voltage supply, because it will be hard to provide a higher voltage to it, while my test bench will be supplied with only 12V.
Thank you for your help MorganS. I'll post the results if I find a way to get things work properly
I had a question regarding the simulation of the above DAC Amplifier.
I tried to build this circuit on Altium but I am having issues on simulating the circuit. I am not sure if you have had any experience with Altium but here is what happens when I try to click simulation by going to the settings on the menu bar. I see nothing after Simulation.
Unlike the asker, I must drive an inductive load. The inductive load gets V_0 = 0-15 Volt. The resistance in series varies between 500 Ohm to a minimum of 5 Ohm. So I expect a a maximum current of I_max = 3 A.
So:
can the proposed circuit (reply #8 from MorganS) drive this load? And can it easily be modified to support 0 to 15 Volt?
or / and are there some ready-made amplifiers that do this job? Especially it must be small. I have an amplifier on my desk here that is as big as my feets. It should be portable!
3A requires a power amplifier. The opamp circuit won't do that.
What is it that you are really driving? An inductor like a motor or solenoid coil will perform much better with a PWM output. There are a zillion circuit tutorials out there to do this at much higher power than you are asking for. A motor shield like the Sparkfun Monster Moto can do this in its sleep.
Also a MOSFET will be more than 90% efficient while an analog amplifier will be less than 50% efficient. That requires a heavy and bulky heatsink.
Hello, I know it's been a while since this was posted, but I'm using your diagram to change to a 0-5v output with my Due. I changed R17 to 47k (for 2.13 gain) and R19 to 2.2k (for 0.81v ref). VBatt is 12.0 volts. My max is good at 7v but my min is not. My calculations show min should be about -10mv but I have +20mv. I've tried different values but I can't seem to reach the 0v mark. Any suggestions would help.
Thanks, Josh
MorganS:
This circuit will amplify the Due DAC output for the range 0-10V.
V_batt in this case was 14.8V. It needs to have some headroom above the max output voltage. You can't get 12V out with a 12V input.
Resistors R18 and R19 set the reference voltage, as a ratio of the 3.3V supply rail. This is then buffered with IC3B, so that the current through those reference resistors is always constant.
Resistors R17 and R20 set the gain for the output: 10V in this case. R21 keeps the output at zero when there's no signal from the Due, during boot-up. C21 is a smoothing capacitor, because it seemed like a good idea.