November 22, 2024, 12:56:03 PM

Arduino Mega wiring with ADS1220

Started by JTapio, November 18, 2022, 09:12:07 PM

Previous topic - Next topic

JTapio

Hi everyone.

I tried to search within forum / Github repo(s) for a solution but could not come up with one yet.

I am truly a beginner with microcontrollers but I have managed to wire Load Cell => HX711 => Arduino Mega so I have been able to measure loads after calibration.

Now I am trying to wire Load Cell => Olimex ADS1220 => Arduino Mega
My project goal would be to get data rate of 1000sps for my project which would be used in Physiotherapy/Sports to measure knee extension torque output against time (usually intervals like 50ms, 100ms, 150ms, 200ms etc. being used).

With current wiring / code I just seem to get arbitrarily jumping values, no matter if I change to lower gain and/or data rate => No response to load cell tension/pressure.


For some reason I think I have issue with wiring in overall(?)

Currently my sample code has been:
#include <ADS1220_WE.h>
#include <SPI.h>

#define ADS1220_CS_PIN    7 // chip select pin
#define ADS1220_DRDY_PIN  6 // data ready pin

ADS1220_WE ads = ADS1220_WE(ADS1220_CS_PIN, ADS1220_DRDY_PIN);

void setup() {
  Serial.begin(9600);
  if (!ads.init()) {
    Serial.println("ADS1220 is not connected!");
    while (1);
  }

  ads.setCompareChannels(ADS1220_MUX_1_2);
  ads.setGain(ADS1220_GAIN_128);
  ads.setOperatingMode(ADS1220_NORMAL_MODE);
  ads.setDataRate(ADS1220_DR_LVL_6); // Goal would be to get 1000sps, hence level 6
  ads.setVRefSource(ADS1220_VREF_REFP1_REFN1);
  ads.setVRefValue_V(5.0);
  ads.setLowSidePowerSwitch(ADS1220_SWITCH);
}

void loop() { 
  Serial.println(ads.getVoltage_mV(), 3);
  delay(500);


Current wiring as follows:

Load Cell ADS1220
Red (Excitation +)IN0
Green (Signal +)IN1
White (Signal -)IN2
Black (Excitation -)IN3

Load Cell GND wire has been attached to Arduino Mega GND (At least load cell instructions say it is GND wire)


ADS1220 Arduino Mega
AVDDPin 5V
VDDPin 5V
CS#Pin 7
DRDY#Pin 6
DOUTPin 50
DINPin 51
CLKPin 52
GNDGND

I have been unsure about two AVSS pins. I have connected them to GND on Arduino Mega but also have let them float free. This has not influenced the current issue in any way.

Load Cell specifications

Brand/MakePushton PSD-S1-100kg
Full scale output2.0 mv/V
Input impedance350 +/- ohm
Output impedance350 +/- ohm
Insulation resistance>= 5000
Excitation Voltage5V
Maximum Excitation12V


Any help for the newbie is welcome, thank you!

LubOlimex

Excitation Voltage   5V
Maximum Excitation   12V

What does this mean? ADS-1220 works up to 5.5V no more.
Technical support and documentation manager at Olimex

JTapio

Hi LubOlimex thank you for reply.

I just pasted the specifications as it is written on the load cell sheet which came with the load cell.

To be bloody honest I do not know why it has been detailed in that way since I've understood that one could use even lower excitation voltage, but the lower excitation voltage would generate less output voltage, right?

As I understand, I can't go over 5V when using Arduino Mega as excitation source, right?

Hence, hopefully I have been able to at least try out the load cell with ADS1220 and Arduino Mega without already breaking the ADS1220 board.

LubOlimex

> As I understand, I can't go over 5V when using Arduino Mega as excitation source, right?

Yes.
Technical support and documentation manager at Olimex