Arduino DAC pins don't work - dual powered OP AMP by 9V batteries

Hi,

Let me first state that this is my first hands-on experience on circuits, despite some basics of electronics. I am trying to prototype a sensor. I have generated a sine-wave signal from Arduino DUE (using DAC pins), which, after a voltage divider, is expected to go to a connected device, and from there back to an amplifier (invert) circuit and then a level sifter (invert) circuit. To make sure the amplifier and following parts have no prob, I have the output from the voltage divider connected to the input of the inverting amplifier at the moment, as you can see from the sketch I have attached. To implement the amplifier I have used the LM741CN op amp (dual power supply +/-18V). And (having a 0-30V DC power supply only) I have powered the op amp with two 9V batteries instead. To get the -9V to the VEE pin of my op amp, the - terminal of one of the two batteries was connected to the VEE of my op amp, and the corresponding + terminal connected to the ground of my breadboard. I had an oscilloscope measuring on two channels the output from the voltage divider and the output from the inverting amplifier circuit. As soon as I connected the two batteries, the signal from the inverting amplifier circuit (which was noisy) disappeared. I disconnected everything and tried again, and this time I got only a FLAT signal from the voltage divider (it used to be a good sine-wave). I tried to change DAC pins (0 and 1) and GND pins, but nothing. Not even connecting Arduino to the oscilloscope works anymore. The script has been working until now, so I am sure there is no problem. The lights on Arduino are on, and when the script is loading you can see more noise on the signal, but still flat. Is it possible that Arduino pins are burnt? Is any of the connections I made with the batteries badly damaging Arduino or the oscilloscope? It also looks like the flat signal from Arduino and the voltage divider is higher on the oscilloscope now, with respect to the one I was getting before. I ordered a single op amp in the meanwhile and another dual one, as I am afraid the single could cut my signal. (And I should probably substitute my arduino, is it?)

Hope there is someone able to help me out and clarify this issue! Thank you in advance!

sketch_arduino problem(4).JPG

sketch_arduino problem(4).JPG

We could do with a hand drawn circuit , on the above it looks like the analog input isn’t connected to anything

If you scope the DAC outputs directly and don't see any signal, I think you can put the whole op amp circuit aside until you fix that.

hammy:
We could do with a hand drawn circuit , on the above it looks like the analog input isn’t connected to anything

The application doesn't use analog inputs.

Yup, you fried it if you wired as shown since the DAC1 output is connected directly to the +9 volt rail, not to the resistive divider. Outputs don’t like having voltage shoved into them, even when it’s a wimpy 9v battery.

Not that it matters at this point but none of the resistor values make sense, they’re too low by orders of several magnitudes.

WattsThat:
Yup, you fried it if you wired as shown since the DAC1 output is connected directly to the +9 volt rail, not to the resistive divider. Outputs don’t like having voltage shoved into them, even when it’s a wimpy 9v battery.

Not that it matters at this point but none of the resistor values make sense, they’re too low by orders of several magnitudes.

No, the "+9V rail" is actually being used as a junction bus for the DAC output. Not very standard, but acceptable. Follow the paths closely, there isn't a problem - well, not that one.

This does illustrate the horrible inadequacy of a typical Fritzing diagram...

The DAC pins on the Due are particularly sensitive and should be ideally connected straight into an opamp
input. They need scaling by x 1.5 anyway to reach 0..3.3V span.

BTW I can't figure out the resistor values, the colour bands are dingy and hard to
identify. Its about 4000 times easier to read a circuit schematic compared to a
Fritzing wiring diagram - please try to draw a schematic using standard symbols.

Wiring diagrams are only for wiring up, not for electronics "thinking"...

Yes, why use the inverting configuration that has a low input impedance when you can use the op amp as a high impedance buffer? Also what is the voltage divider after the DAC output doing? That seems strange, you attenuate then amplify the signal for what reason?

I have to wonder if the op amp input remains effectively high impedance for all conditions of op amp supply voltage. If only one battery is connected, there might be some leakage to the input port and then back to the DAC.

It would be much safer to use a rail to rail op amp powered from the Due's 3.3V supply. The LM741 is a dinosaur IC anyway.

A picture is worth a 1000 words.

How to make and post a schematic

Thank you for your answers! Yes exactly, the "+9V rail" is actually being used as a junction bus for the DAC output and The application doesn't use analog inputs (I will probably use analog pins to get a signal back, but not before fixing this problem with op amp), thanks. Unfortunately I can't apply the DAC output to the op amp directly, as I will be connecting a device in between the voltage divider and the the op amp circuit. I am connecting them directly now, just to make sure they work. My problem now is the power of the op amp, is the way I connected the batteries damaging my Arduino?? Or even the oscilloscope? I am mainly worried about the way I connected the -9V and in general the negative terminals "to the GND of Arduino" (by the junction bus). [Even when I will try with the single op amp, is it correct to connect the gnd terminal of the power to the gnd of Arduino (again, by the junction bus)?] If there is something wrong with the batteries connection, would you please suggest me a solution? (not buying a different DC power supply, they are way to expensive and in future I will need batteries anyways)

Here the values of the resistors, op amp is LM741CN(dual power supply)

sketch_arduino problem(1).JPG

sketch_arduino problem(1).JPG

I will be connecting a device in between the voltage divider and the the op amp circuit

You are diving even deeper into details. It would be appropriate if you satisfy the requests for a proper schematic. A hand drawn pencil sketch snapped with a cell phone would even suffice.

Please elucidate on this "device"...

Draw of the circuit, thank you!

Oh dear!!!

All your resistor values are about a factor of 100 - 1000 times too small. The ardiuino can not sensibly drive a 60 ohm load. I dont know where you found your component values but try again with values AT LEAST a hundereed times bigger.

I will, thank you!!
Anything about the batteries?

Batteries should be fine but maybe already flattened by your ciircuit. The 741 should be fine and despite the 741's design being over 50 years old it should do the job.

That's a relief!! Thank you very much!!

Just at the moment I can't get any signal at all, even connecting the oscilloscope to my Arduino directly, so do you think it's gone? It can't be because of the resistors, right? (it was working until I tried to power the op amp)

g_arduino_user:
Just at the moment I can't get any signal at all, even connecting the oscilloscope to my Arduino directly, so do you think it's gone? It can't be because of the resistors, right? (it was working until I tried to power the op amp)

It sure can be the resistors. The 60 ohm load is effectively a dead short as far as the processor output is concerned. It's gone.

Thank you very much! I will definitely increase all the resistors of about 500 ohms each! Thanks!

All your resistor values are about a factor of 100 - 1000 times too small. The ardiuino can not sensibly drive a 60 ohm load. I dont know where you found your component values but try again with values AT LEAST a hundred times bigger.

no not 500 ohms.

Leave the numbers the same. Change from OHMS to KILOHMS.

So your divider has an input impedance of about 60 ohms? Whoops, instant death there.

10k ohms or higher is what I'd load the DAC pins with, they are notoriously fragile, 3 orders
of magnitude higher, basically.

But your whole setup is bizarre - you divide down by a factor of 22, then use an opamp stage
with a gain of -12.2.

First rules of amplification - don't attenuate before amplifying, don't amplify before attenuating!
(Not hard and fast, but generally things to avoid if possible)

Since your overall gain is -12.2 / 22 = -0.55, you just need a single inverting opamp stage with
10k input resistor, 5k6 feedback resistor.

You've missed out decoupling for the opamp - decoupling is never optional, even if the datasheet
neglects to mention it. Are you really using the 741 opamp? Its a museum piece.