0

Can you fry the MCP4725 by sending bad I2C values?
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Can you fry the MCP4725 by sending bad I2C values?

by HankLloydRight on Fri Jun 04, 2021 9:55 am

I've been having the devil of the time debugging a multi-DAC ESP32 project I'm working on.
I've already killed 5 MCP4725 boards.

I walked back the code and the breadboard step by step until I had the original example code and wiring from the Adafruit website.
I even built this little Arduino test-rig to detect the I2C devices using this code: https://create.arduino.cc/projecthub/ab ... ino-eaadda
(see rig image below)
(the colored tape is so I can identify the new ones from the old ones)
IMG_2285.jpg
IMG_2285.jpg (120.2 KiB) Viewed 272 times


With two more new MCP4725s and one MCP4728, it worked fine to detect all three I2C devices

When I went back to my ESP32 project (using the same three DACs), both new MCP4725s worked initially for some basic waveforms. FINALLY, it worked!

Until I started changing the code to change the waveform and frequencies. When I ran the code, both new MCP4725s ran for one cycle, then died. When I put the two DACs back into my test rig, they are no longer recognized at all.

I'm running the MCP4728 on the same bus with the same code, and it's solid as a rock. I'm down to one MCP4725 board left, which I'll test again today, but I expect the same fate eventually.

All the voltages are USB 5v, so I'm not over-volting them. The only thing that changes between the MCP4725 working and dying is the change in I2C values and frequency being sent. So is it possible to fry these boards that way?

Thanks.

HankLloydRight
 
Posts: 30
Joined: Sat Jul 08, 2017 3:46 pm

Re: Can you fry the MCP4725 by sending bad I2C values?

by adafruit_support_mike on Sat Jun 05, 2021 10:17 pm

Sending the wrong address shouldn't have any effect. An I2C device should ignore any message on SDA whose address doesn't match its own. The worst-case effect of using the wrong address should be a simple failure to communicate.

adafruit_support_mike
 
Posts: 62768
Joined: Thu Feb 11, 2010 2:51 pm

Re: Can you fry the MCP4725 by sending bad I2C values?

by HankLloydRight on Sun Jun 06, 2021 4:07 pm

Thanks, but I don't mean sending the wrong I2C address, I mean, sending it unexpected values, or sending data it too quickly (or something, I really don't know what at this point)

I've already killed five of these boards using the exact same code and connections as the MCP4728, but when I ramp up the frequencies on the 4725, they die. The MCP4728s are solid and stable.

I using a very simple circuit design (See below) -- I don't think it could be any simpler. What could be burning out these MCP4725s?

thanks.

sch.PNG
sch.PNG (139.84 KiB) Viewed 230 times

HankLloydRight
 
Posts: 30
Joined: Sat Jul 08, 2017 3:46 pm

Re: Can you fry the MCP4725 by sending bad I2C values?

by adafruit_support_mike on Sun Jun 06, 2021 7:02 pm

I2C devices have open drain output: instead of changing between high and low voltage (called 'push-pull' output), they change between high and low resistance to GND. That's why the SDA and SCL lines need pull-up resistors.

Open-drain devices can't damage each other. A resistor connected to GND through one switch doesn't behave differently from a resistor connected to GND through two switches.

You can damage an open drain device by connecting it to a push-pull output though. If the push-pull output is trying to hold the line at VCC while the open drain is trying to connect it to GND, you can burn out either or both of those devices.

adafruit_support_mike
 
Posts: 62768
Joined: Thu Feb 11, 2010 2:51 pm

Re: Can you fry the MCP4725 by sending bad I2C values?

by HankLloydRight on Mon Jun 07, 2021 5:16 am

Thank you very much for the detailed explanation. Can you please suggest how to modify my circuit to fix this, or point me in the right direction?
In your MCP4725 tutorial, the I2C lines are directly connected to the Arduino I2C pins. Are the ESP32 I2C pins different (push-pull)? That sure sounds like it could be the problem.
Thanks

HankLloydRight
 
Posts: 30
Joined: Sat Jul 08, 2017 3:46 pm

Re: Can you fry the MCP4725 by sending bad I2C values?

by adafruit_support_mike on Mon Jun 07, 2021 7:03 pm

I don't see anything in the schematic that would kill an I2C device.

Double-check all your connections to make sure there are no unexpected connections to VCC on the SDA or SCL lines.

adafruit_support_mike
 
Posts: 62768
Joined: Thu Feb 11, 2010 2:51 pm

Re: Can you fry the MCP4725 by sending bad I2C values?

by HankLloydRight on Mon Jun 07, 2021 7:26 pm

Thanks again.

I have a little more information today. My main project breadboard has two MCP4725s and one MCP4728. Since I only have one good MCP4725 left (out of 6 that I bought), I tried running the same circuit with just two DACs instead of three. And it's been rock solid all day -- nothing so far has killed the remaining MCP4725. (although strangely enough, I lost the D channel on the MCP728-- A,B, and C work perfectly). So I think whatever was killing my 4725s only happened when I had two in the circuit. I traced all the connections and I can not find any rouge connections to VCC. The 4725 works on both the X and Y channels (leaving the other channel empty) -- so the connections to each channel are working independently. Looks like I'll have to order more 4725s and one more 4728 to get this working.

HankLloydRight
 
Posts: 30
Joined: Sat Jul 08, 2017 3:46 pm

Re: Can you fry the MCP4725 by sending bad I2C values?

by adafruit_support_mike on Mon Jun 07, 2021 9:14 pm

HankLloydRight wrote: I tried running the same circuit with just two DACs instead of three.

That's new information.

The MCP4725 only has one address pin, and you can only switch it between two I2C addresses. You can't make three of them work on the same I2C bus.

adafruit_support_mike
 
Posts: 62768
Joined: Thu Feb 11, 2010 2:51 pm

Re: Can you fry the MCP4725 by sending bad I2C values?

by HankLloydRight on Mon Jun 07, 2021 9:21 pm

I'm running two 4725s, one with A0 high, and the other A0 low, plus one MCP4728 as 0x60, so there should be no conflicts. You can see this in the photo in my first post.

HankLloydRight
 
Posts: 30
Joined: Sat Jul 08, 2017 3:46 pm

Re: Can you fry the MCP4725 by sending bad I2C values?

by adafruit_support_mike on Tue Jun 08, 2021 5:19 pm

Good.. critical details have a way of showing up as “oh yeah, that’s not a problem is it?” items as the conversation unfolds.

The only other thing I can think of that might kill a chip is the bipolar power supply for the op amps. The ‘virtual short circuit’ relationship between the positive and negative inputs is an approximation of the circuit’s DC behavior. It’s possible to see large voltage spikes between the two inputs at the microsecond level.

You might want to clamp the DAC outputs to their supply voltage with a couple of reverse-biased diodes from VCC to the output, and from the output to GND.

Also sanity-check the pot that provides the positive reference voltage. If its low end got connected to the negative op amp supply, the amp could try to pull its negative input below the DAC’s negative supply. That’s a longshot.. the resistor values should limit current to a safe level even if that was the case, but the first rule of debugging is “don’t believe anything you haven’t verified instrumentally.. and then be suspicious”.

adafruit_support_mike
 
Posts: 62768
Joined: Thu Feb 11, 2010 2:51 pm

Re: Can you fry the MCP4725 by sending bad I2C values?

by HankLloydRight on Wed Jun 09, 2021 5:19 pm

Thanks for your help. The pot low end is not connected to the Op-amp supply.

I've now somehow blow two of the four channels on the 4728, but I'm pretty sure that was a stray lead getting shorted to +5v, so that's on me.

I have some MCP4922s coming tomorrow, so I'm going to try using those as SPI DACs instead with the rest of the circuit remaining basically the same.

Any reason Adafruit doesn't offer any SPI DACs as breakout boards? Like the MCP49x2 line?

HankLloydRight
 
Posts: 30
Joined: Sat Jul 08, 2017 3:46 pm

Re: Can you fry the MCP4725 by sending bad I2C values?

by adafruit_support_mike on Thu Jun 10, 2021 7:06 pm

We haven't seen much demand for SPI DACs. I'll mention it to our products team though.

We generally prefer I2C over SPI. Each SPI device needs its own CS pin, which can rack up the pin count quickly. There's also the fact that SPI isn't a formal protocol, so vendors can add their own special quirk whenever they feel like it.

adafruit_support_mike
 
Posts: 62768
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.