I2C and IC interfacing help

I am creating a strain gauge Wheatstone Bridge circuit and needed to use a op amp in order to create a large enough of a signal for the Arduino. In looking for solutions I found the NAU7802 which contained a proper op amp and 24bit adc which would be helpful in my situation as I would prefer more accurate results.

The issue is that a) when i try and check that the ic is up an running with i2cdetect, nothing pops up, and b) my ldo/avdd is unresponsive as my wheatstone bridge stays at 0V. I think this is either my code or wiring. I know the wheatstone bridge works as i tested with a voltmeter. the rest of the wiring for the ic wasn't too difficult either so I think its a code issue. I think i followed all the steps to initialize the ic; its attached in the datasheet, the register numbers and functions are in the datasheet in section 11 and initializing set up is 9.1. Any help would be appreciated, this is my first time using the Wire library and i2c

void setup() {
  // put your setup code here, to run once:
  Wire.begin();
  
  Wire.beginTransmission(byte(0x2A));
  Wire.write(byte(0x00));     //Write to PU Control
  Wire.write(byte(0x21));     //Reset all register values
  Wire.endTransmission();
  
  Wire.beginTransmission(byte(0x2A));
  Wire.write(byte(0x00));
  Wire.write(byte(0x2E));     //Turn off Reset, Turn on PUDigital Circuit
  Wire.endTransmission();
  
  Wire.beginTransmission(byte(0x2A));
  delayMicroseconds(200);     //Allow time for PWRUP Bit to = 1
  Wire.write(byte(0x00));
  Wire.write(byte(0xAE));     //Turn on LDO
  Wire.endTransmission();
  
  Wire.beginTransmission(byte(0x2A));
  Wire.write(byte(0x00));
  Wire.write(byte(0xBE));     //Cyc Start
  Wire.endTransmission();
  
  Wire.beginTransmission(byte(0x2A));
  Wire.write(byte(0x00));
  Wire.write(byte(0xB8));     //Power Down
  Wire.endTransmission();

  Wire.beginTransmission(byte(0x2A));
  Wire.write(byte(0x00));
  Wire.write(byte(0xBE));     //Power Up
  Wire.endTransmission();
  
  Serial.begin(115200);

My experience with I2C is that if i2cdetect doesn't find your device then nothing else will work. I would check your wiring. Make sure you have the the pins correctly wired and some pullups on the 2 pins. When i2cdetect finds your device then try your code.

2 Likes

Hi, @noveltytimes
Is there a reason you are not using a HX117?

It is 24bit.
There are libraries for it to make it easy for use with Arduino.

Thanks... Tom... :smiley: :+1: :coffee: :australia:

Coul you please post a schematic

yeah, so this project is for a competition and we aren't allowed to use external pcbs so i had to find a dip package ic and this was the best i found

I based this design off the sample application in the datasheet, section 9.4

Beware the difference between Accuracy and Precision. Getting 24 bits of ADC accuracy would require monumentally good circuit design, layout, and shielding. You ain't gonna get that with a solderless breadboard with all those antennas.

Hi,
A schematic would help.
An image of a hand drawn schematic will be fine, include ALL power supplies, component names and pin labels.

Thanks.. Tom... :smiley: :+1: :coffee: :australia:


im not the best at drawing these but i hope it helped. im not using the elegoo battery so i chose to exclude it from the schematic btw. swapped the capacitor on the VBG pin for a regular wire but that shouldnt change anything

Hi,
Where are all the capacitors they have in the application notes?

Why?

VBG has to have a capacitor, it is part of the bypassing circuit to minimise noise, to keep the project stable and your reference voltage for the ADC. Not sure what SHORTING it to gnd will do.

The capacitors are also essential in the AVdd and Cfilter circuit for the same reason.
Especially when being built on protoboard.
is there a reason you are not using DRDY pin as in the application.

Tom... :smiley: :+1: :coffee: :australia:

so i thought those were just for noise and as such i didnt think i needed them yet. I was looking to get the entire system set up then try and fix any noise in the circuit after.

for the drdy pin, i looked through google and couldnt find any way to interface it into the arduino so i left it thinking i only needed a data and clock wire for i2c

for the capacitors, do i need to follow the same capacitance values? i only have 10uF capacitors on hand right now

You were right; it was a wiring issue. Paid more attention to the capacitors and connections when i rewired and i2cdetect is working now, Thank you!

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