problem with basic OLA+mux reading NAU7802 Qwiic Scale

Hi, I’m trying to replicate the setup in the OLA video with an OLA connected to a Qwiic Mux (TCA9548A) reading multiple NAU7802 Qwiic Scales. However, readings (and calibrations) of the NAU7802 are all over the place when connected via the mux.

Here is the calibration followed by readings of one NAU7802 connected directly to the OLA:

Menu: Configure NAU7802 Load Cell Amplifier
1) Sensor Logging: Enabled
2) Calibrate Scale
	Scale calibration factor: 13498.0
	Scale zero offset: 48139
	Weight currently on scale: 10.002
3) Number of decimal places: 3
4) Average number of readings to take per weight read: 10
x) Exit
2022-12-06T15:22:36+00:00,15:22:36.67,67995799,10.040,
2022-12-06T15:22:37+00:00,15:22:37.68,68995827,10.033,
2022-12-06T15:22:38+00:00,15:22:38.68,69995848,10.040,
2022-12-06T15:22:39+00:00,15:22:39.69,70995863,10.046,
2022-12-06T15:22:40+00:00,15:22:40.69,71995878,10.045,

Note that the calibration weight was 10 g and the reading after the calibration (weight currently on scale) was correct, as were the actual readings while logging.

Now here is the calibration of the same NAU7802 (using the same 10g weight) connected to a mux (there were a total of two NAU7802s connected to this mux), followed by the readings. No other components connected.

Menu: Configure NAU7802 Load Cell Amplifier
1) Sensor Logging: Enabled
2) Calibrate Scale
	Scale calibration factor: -2.700000
	Scale zero offset: 48077
	Weight currently on scale: -12.593
3) Number of decimal places: 3
4) Average number of readings to take per weight read: 10
x) Exit
2022-12-06T15:19:22+00:00,15:19:22.70,287604799,0.0,-95906.664,
2022-12-06T15:19:23+00:00,15:19:23.71,288604827,0.0,-95925.555,

This is baffling to me and suggests I’m missing some really basic setting that is needed when reading NAU7802s on a mux.

Thanks for your help.

Yep, you are on the right path…sensors/boards using i2c generally have a pull-up resistor on their bus; only one set of pull-ups in TOTAL should be active on a single bus

…and there are 3 currently active in this case, as the mux has one too.

Disable 2 of the three (I usually leave the mux one intact, as it makes adding more sensors simpler) shown here (note: scroll up one paragraph)

https://learn.sparkfun.com/tutorials/qw … e-assembly

Thanks for the quick response! However, this still isn’t working. On each of the NAU7802s I cut both of the narrow traces between the three I2C pads and checked for continuity. They were definitely cut.

When the NAU7802s are plugged into the mux, it’s still reading nonsensical and often negative values, even after calibrating each of the load cells. Sometimes I can get one NAU7802 to give reasonable readings but the other one will not.

I have tried multiple NAU7802s with only 2 plugged into the mux at a time, and I have also tried different load cells.

Is there something else I am missing? Thanks for your help.

In your code, do you have a separate instance of NAU7802 for each scale? You need that since each instance has scale-specific info like cal data.

Look at this post viewtopic.php?p=220782#p220782 for an example of how to read multiple sensors connected to a mux

/mike

I’m using Sparkfun’s OLA, so it is automatically reading both scales…