MCP4725 DAC Suddenly Stopped Working

I have two MCP4725 DACs connected on the I2C bus. I connected them as the data sheet says and all was great and dandy, and even ran a triangle wave example and viewed it on an oscope.

It was working for a few hours and outputting the voltages correctly but then I connected the vout and gnd of the second DAC to a signal conditioner that takes in a 0-5V signal. The DACs stopped working. Once I realized it wasn't working, I reverted everything back, meaning I just disconnected vout and gnd from the conditioner and measured the output which is now stuck at roughly 2.5V. Same code and wiring which was working before. And even though I only wired one DAC to the conditioner BOTH now do not output different voltages just stuck at around a constant 2.5V .

My thinking is that the signal conditioner might have drawn too much current from the DAC perhaps breaking it but it doesn't add up as to why both would now not be working even though only 1 was wired to the signal conditioner. On top of that, the signal conditioner runs on a separate 24v supply, so it probably isn't pulling much current if any(will double check with a meter next week). Heres a link to that signal conditioner i keep mentioning. https://www.automationdirect.com/adc/shopping/catalog/process_control_-a-_measurement/signal_conditioners/dc_voltage,_current_or_potentiometer_input/fc-33?gclid=CLb48riQ1uICFQ7bwAodlkMEQQ

Here is my wiring diagram

Here is the code.

#include <Wire.h>
#include <Adafruit_MCP4725.h>

Adafruit_MCP4725 dac0;
Adafruit_MCP4725 dac1;

void setup(void) {
  Serial.begin(9600);
  Serial.println("Hello!");

  // For Adafruit MCP4725A1 the address is 0x62 (default) or 0x63 (ADDR pin tied to VCC)
  // For MCP4725A0 the address is 0x60 or 0x61
  // For MCP4725A2 the address is 0x64 or 0x65
  dac0.begin(0x62);
  dac1.begin(0x63);
}

void loop(void) {
    uint32_t counter;
 
    for (counter = 0; counter < 4095; counter++)
    {
      dac0.setVoltage(counter, false);
    }
    for (counter = 4095; counter > 0; counter--)
    {
      dac0.setVoltage(counter, false);
    }
  
    for (counter = 0; counter < 4095; counter++)
    {
      dac1.setVoltage(counter, false);
    }
    for (counter = 4095; counter > 0; counter--)
    {
      dac1.setVoltage(counter, false);
    }
    
}

Do your breakout boards have realistic I2C pull-ups on board? At least 4.7k? If not, I’d add pull-ups to the breadboard as the Mega has 10k pull-ups by default which may be your problem. You should have at least one 100nf bypass cap on the mcp4725’s as well.

If you have the Sparkfun breakouts, the necessary parts are already in place. Cannot tell what you have with the Fritzing finger painting.

Separate 24V supply?

You must only connect voltages that are in the range of 0V to 5V of the DAC's supply. A separate supply could be floating at any voltage w.r.t. the Arduino circuit.

Did you common the grounds?

WattsThat:
Do your breakout boards have realistic I2C pull-ups on board? At least 4.7k? If not, I’d add pull-ups to the breadboard as the Mega has 10k pull-ups by default which may be your problem. You should have at least one 100nf bypass cap on the mcp4725’s as well.

If you have the Sparkfun breakouts, the necessary parts are already in place. Cannot tell what you have with the Fritzing finger painting.

Hi, thanks for the response. Sorry for my finger painting lol, this is the DAC MCP4725 Breakout Board - 12-Bit DAC w/I2C Interface : ID 935 : $4.95 : Adafruit Industries, Unique & fun DIY electronics and kits

It looks like each breakout has 2 pull up resistor of 10k.

And it also looks like it has the cap.

MarkT:
Separate 24V supply?

You must only connect voltages that are in the range of 0V to 5V of the DAC's supply. A separate supply could be floating at any voltage w.r.t. the Arduino circuit.

Did you common the grounds?

The 24V supply only powers the signal conditioner. It is completely isolated from the arduino and DAC.

And yes I did common the grounds of the DAC.

Did you connect A0 differently on the two DACs? One you need to connect to 5V and the other you need to connect to ground.

And yes I did common the grounds of the DAC.

With the ground of the 24V supply?

Grumpy_Mike:
Did you connect A0 differently on the two DACs? One you need to connect to 5V and the other you need to connect to ground.
With the ground of the 24V supply?

On one of them yes I connected A0 to 5V but on the other I did not connect A0 to anything. However, that being said it was working for quite a bit that way.

However, that being said it was working for quite a bit that way.

Yes but that means the input was floating and subject to all sorts of interference so the addresses could have clashed at some point.

Do you want to answer the second part of my question?

Sorry! No I did not tie the ground of the DACs to the 24V supply ground. I only connected the grounds of the DACs to the 5V power supply gnd and left it that way. The 5v supply ground was also separate of the 24v supply ground.

Ok so any one of those two could have ended up frying your DACs.

Possibly the latter is favorite.

Hi,
Have you run the I2C Scanner code to see if the two DACs are responding?

Can you draw a circuit diagram of your complete project, including the conditioners and how they are powered please?
Just a picture of a hand drawn circuit will speak volumes.

Thanks.. Tom... :slight_smile:

Grumpy_Mike:
Ok so any one of those two could have ended up frying your DACs.

Possibly the latter is favorite.

But why would they both be fried if I only connected one?

Rough hand drawn photo of my circuit.

TomGeorge:
Hi,
Have you run the I2C Scanner code to see if the two DACs are responding?

Can you draw a circuit diagram of your complete project, including the conditioners and how they are powered please?
Just a picture of a hand drawn circuit will speak volumes.

Thanks.. Tom... :slight_smile:

Hi Tom, Uploaded a rough photo! Thanks in advance !
Also have not had the chance to run the I2C scanner yet.

Ether your schematic is missing important connections or:

There is no common connection (0V, GND) shown between the DAC's and the Arduino. That will not work.

The 5V 2A supply as shown is totally unnecessary, the DAC boards can be powered by 5V output of the Arduino.

The signal conditioner is galvanically isolated so no issues there between the Arduino & DAC's and whatever is being controlled.

WattsThat:
Ether your schematic is missing important connections or:

There is no common connection (0V, GND) shown between the DAC's and the Arduino. That will not work.

The 5V 2A supply as shown is totally unnecessary, the DAC boards can be powered by 5V output of the Arduino.

The signal conditioner is galvanically isolated so no issues there between the Arduino & DAC's and whatever is being controlled.

The schematic is rough but it is how I wired it. I did not know the DAC must share a common with the arduino and will make sure to do that. That being said, though why would that cause an issue especially after it ran for hours fine? Thanks, Alex.

But why would they both be fried if I only connected one?

Because they are both connected through the I2C lines. Excess voltage can be spread thorough a circuit. You might have even blown the I2C lines on the Arduino.

That being said, though why would that cause an issue especially after it ran for hours fine?

Because functioning fine is no indication that the circuit is fine. It could have been chipping away at what ever blew up or it could be that something became loose on a the breadboard and pushed it over the edge.

Once you make serious errors in a design all bets are off and there is little point in worrying about the exact mechanism that caused failure. You will not learn anything useful if you know anyway. Just don't make those fundamental errors again.

Grumpy_Mike:
Because they are both connected through the I2C lines. Excess voltage can be spread thorough a circuit. You might have even blown the I2C lines on the Arduino.
Because functioning fine is no indication that the circuit is fine. It could have been chipping away at what ever blew up or it could be that something became loose on a the breadboard and pushed it over the edge.

Once you make serious errors in a design all bets are off and there is little point in worrying about the exact mechanism that caused failure. You will not learn anything useful if you know anyway. Just don't make those fundamental errors again.

Fair enough. However could I get an explanation on to why the ground of the DAC needs to be tied to the arduino ground? Especially when its being powered from its own supply. Thats the part I cant wrap my head around. Thanks

Fair enough read this
http://www.thebox.myzen.co.uk/Tutorial/Power_Supplies.html

Try changing address of your dac, I had the same problem. So I connected A0 pin with ground and set the address to 0x60. It worked properly. It looks like the default voltage is 2.5v.