FX29 load cell I2C or amplified voltage output

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
Gregosaurusrex
 
Posts: 7
Joined: Thu Jan 07, 2021 10:24 am

FX29 load cell I2C or amplified voltage output

Post by Gregosaurusrex »

Hi, I'm planning to use an economical FX29 series load cell from TE (datasheet attached) and an IMU (likely product ID 4754) to log data in the 10Hz to 100Hz range. These will be for a project to measure a load and orientation with respect to the horizon. I'll likely use a QT Py SAMD21 (product 4600) since I have some already, and the STEMMA QT connector is extremely convenient. I will either save the serial output via TeraTerm or similar and use JMP for data analysis of said serial data or I will integrate the system with LabVIEW to read the serial output and plot and save the data as needed for later analysis in JMP statistical software.

My question is, does anyone have experience successfully using the FX29K (I2C) with Arduino or CircuitPython? This option would have the simplest wiring and smallest footprint, however I haven't found any success stories with I2C communication with this load cell.

My alternative is to use the FX293 (amplified voltage 0.5-4.5V). I can use the 5V from the QT Py to power the sensor. The only hitch is that I'd then need to use an ADC (likely product 1085 with VDD supplied by the QT Py 5V) to convert the 0.5-4.5V into I2C digital communication with the QT Py to make use of the full 0.5-4.5V range since the QT Py and most modern dev boards only accept up to 3.3V analog input. This is a bit more complex to wire initially, but I feel confident that I could get it to work and output the serial data that I want to collect.

I would typically use a LabJack T7-Pro DAQ to collect the amplified voltage signal from the FX293, but since I want the orientation with respect to the horizon, it is simpler to keep all data acquisition on a development board like the QT Py. It doesn't appear to be trivial to perform I2C communication with the LabJack T7-Pro DAQ, and I don't want to use too much time for initial setup and debug.

Please let me know if you see anything I have overlooked, or if you have ideas to simplify the setup. I haven't yet taken the plunge into CircuitPython, and I know I could use CircuitPython with the above ADC and IMU. I also know the Mu editor could perform some simple plotting.
Attachments
ENG_DS_FX29_A5.pdf
(692.88 KiB) Downloaded 198 times

User avatar
adafruit_support_mike
 
Posts: 67734
Joined: Thu Feb 11, 2010 2:51 pm

Re: FX29 load cell I2C or amplified voltage output

Post by adafruit_support_mike »

We've never used that device, so I don't have any useful information about making it work.

The datasheet seems to have a healthy dose of "I know what I'm talking about", but it looks like the device has both a load cell and an amplifier that reads the cell and provides useful output.

It looks like the I2C protocol is pretty simple: you send the device a Read byte, wait for it to pull the SDA line low, send a byte that requests the value of register 6, then read two bytes of data.

You might want to check to see if there's any other technical documentation that has specific details about the I2C interface.

User avatar
Gregosaurusrex
 
Posts: 7
Joined: Thu Jan 07, 2021 10:24 am

Re: FX29 load cell I2C or amplified voltage output

Post by Gregosaurusrex »

Thanks for the reply Mike. I requested more information from the manufacturer (TE) last week, but I haven’t received a reply yet. I didn’t find any other published information regarding I2C communication with this sensor on the TE site. (My background is mechanical engineering so I’m a bit of a novice at deciphering electronic data sheets, and I agree with your judgment).

Since the price is reasonable, I may just purchase all the flavors (analog mV/V, amplified voltage, and I2C) and see if I can get I2C working first. If I have any luck, where is a useful place to post my learning so people outside my company can make use of this?

User avatar
adafruit_support_mike
 
Posts: 67734
Joined: Thu Feb 11, 2010 2:51 pm

Re: FX29 load cell I2C or amplified voltage output

Post by adafruit_support_mike »

You can post your findings here in the forum. We're a pretty big target for people searching for information.

User avatar
ronbot
 
Posts: 2
Joined: Tue Jul 06, 2021 8:22 pm

Re: FX29 load cell I2C or amplified voltage output

Post by ronbot »

Me too... and I just found this but haven't tried yet...

https://github.com/eepj/FX29K_for_Arduino

User avatar
ronbot
 
Posts: 2
Joined: Tue Jul 06, 2021 8:22 pm

Re: FX29 load cell I2C or amplified voltage output

Post by ronbot »

Found a (almost) working sketch based on Wire.h.
https://forum.arduino.cc/t/i2c-code-for ... ngs/693417

The only change I had to make was in the scaling to get real pounds

Code: Select all

#include <Wire.h>

#define UseDebug 1

#define clockFrequency 400000
#define zeroOffset 940            // fine-tuned for a specif load cell, should stay at 1000 normally


float scaleFactor = 1400;         // 14000 counts / 10 pounds
int curAddress = 0x28;

void setup() {
  Wire.begin(); //Starts I2C, will need to change these two values (or delete them)
  Wire.setClock(clockFrequency); //Sets I2C frequency to fastest
  Serial.begin(9600);
}

void loop() {
  Wire.beginTransmission(curAddress); //Request Measurement
  Wire.endTransmission();
  
  delay(100); //Delay for measurement to be taken (could be done in IRQ)
  
  Wire.requestFrom(curAddress, 2); //Requests two bytes of data 
  byte msb = Wire.read();
  byte lsb = Wire.read();

  #if (UseDebug)
  byte statusVals = msb/64; //Determines the status values from the measurement to ensure a new measurement was taken
  Serial.print("status:");
  Serial.println(statusVals, BIN);
  Serial.print("msb:");
  Serial.println(msb, BIN);
  Serial.print("lsb:");
  Serial.println(lsb, BIN);
  #endif
  
  int dataVal = (msb%64)*256 + lsb; //Throws out the status bits and converts the measurement data into a single int
  Serial.print("dataValue:");
  Serial.println(dataVal);  
  
  float weightVal = ((dataVal-zeroOffset)/scaleFactor);
  
  Serial.println("Weight: " + String(weightVal) + " lbs"); 
  
  Serial.println();
  delay(1000);
}

User avatar
adafruit_support_mike
 
Posts: 67734
Joined: Thu Feb 11, 2010 2:51 pm

Re: FX29 load cell I2C or amplified voltage output

Post by adafruit_support_mike »

Nice! Thanks for posting the code.

Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”