I2C Scanner- Device not found- Arduino R3 and DAC Max521ACPP

Good afternoon!
I am currently working on a project aimed at converting the digital signal from an Arduino R3 to analog signal through a DAC (Max521 acpp). However, I keep failing to communicate with the DAC. I ran an I2C scanner, but it shows 'device not found.' I tried the address for Max521 from the datasheet, but it fails too. I did not find any more information on the internet, so here I am! Thanks for your help in advance.
Blow is some figures for my set up:



批注 2024-03-06 121204
MAX521 datasheet:https://www.analog.com/media/en/technical-documentation/data-sheets/MAX520-MAX521.pdf
uno A4--dac sda
A5--dac scl
5v--Vdd
GND-DGND
AD0--Vdd
AD1--GND ( with mentioned in datasheet when i did such connection the slave address should be 0101001 or 0x29 but I still failed under this address)
REF4-5V ( I measured the voltage between output 7 and GND fromDAC always get around 4.2V insted of near 5V with or without REF4 connect to 5V.)
Two pull up resistor are both 4.7K ohm (with or without pull up resistor i failed to communicate with DAC).
I2C scanner code:

#include <Wire.h>

void setup()
{
Wire.begin();
Wire.setClock(100000); // 100khz
Serial.begin(9600);
while (!Serial); // Leonardo: wait for serial monitor
Serial.println("\nI2C Scanner");
}

void loop()
{
byte error, address;
int nDevices;

Serial.println("Scanning...");

nDevices = 0;
for(address = 1; address < 127; address++ )
{
// The i2c_scanner uses the return value of
// the Write.endTransmisstion to see if
// a device did acknowledge to the address.
Wire.beginTransmission(address);
error = Wire.endTransmission();

if (error == 0)
{
  Serial.print("I2C device found at address 0x");
  if (address<16) 
    Serial.print("0");
  Serial.print(address,HEX);
  Serial.println("  !");

  nDevices++;
}
else if (error==4) 
{
  Serial.print("Unknown error at address 0x");
  if (address<16) 
    Serial.print("0");
  Serial.println(address,HEX);
}    

}
if (nDevices == 0)
Serial.println("No I2C devices found\n");
else
Serial.println("done\n");

delay(5000); // wait 5 seconds for next scan
}

The photo does not show if the chip is powered with 5V.

You write that AGND is connected to GND, but I think it is connected to nothing. The DGND seems to be connected to GND.
Please connect both AGND and DGND to GND.

Yes, you are right. just a typo, DGND is connected to GND. And it is powered by arduino's 5v output. I just tried to connect both AGDN and DGND to GND. And it works!!!! May i asked why i should connect both DGAN and AGND to GND?

But then there comes another problem, the output used to be around 4.2V but now it is just 8mV.

I also fund that the I2C Scanner found the dac even if i did not connect the arduino's GND to DAC's GND, I just need to connect AGND with DGND. Really have no idea what is going on.

In the datasheet it says that both AGND and DGND should be connected to a star ground (a single point that is the reference ground). They assume that everyone connects both AGND and DGND, no one uses only one.

I don't know why the output has that value, sorry.

In my previous post I forgot to write: "Welcome to the forum", so here it is: Welcome to the forum.

1 Like

Oh I saw it now! I am really a beginner in this area, kind of read dozen times of datasheet but still didn’t get what i want😫
Thank you so much!

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.