Multiple Load Cells, Multiple Lines to Serial Monitor, please help!

Hello, and thanks in advance for your help!

I am doing my first project using load cells. I am using an Arduino Uno and an HX711 amplifier for my load cell. I followed the directions listed on this spark fun page to make my project work with one sensor:

https://learn.sparkfun.com/tutorials/load-cell-amplifier-hx711-breakout-hookup-guide/discuss

It worked great! The data from my load cell shows up in the Serial Monitor and Plotter perfectly in lbs.

But my question comes in the next step of my project. I need to have three load cells and three separate HX711's measuring three separate loads. I would like to wire them all into one Arduino and be able to read three lines of data in my serial monitor/plotter. I am sure this is possible just not sure how to do it.

Can this be done, can anyone please point me in the right direction?

Here is the code I am using for the single load cell:

/*
Example using the SparkFun HX711 breakout board with a scale
By: Nathan Seidle
SparkFun Electronics
Date: November 19th, 2014
License: This code is public domain but you buy me a beer if you use this and we meet someday (Beerware license).

This example demonstrates basic scale output. See the calibration sketch to get the calibration_factor for your
specific load cell setup.

This example code uses bogde's excellent library: GitHub - bogde/HX711: An Arduino library to interface the Avia Semiconductor HX711 24-Bit Analog-to-Digital Converter (ADC) for Weight Scales.
bogde's library is released under a GNU GENERAL PUBLIC LICENSE

The HX711 does one thing well: read load cells. The breakout board is compatible with any wheat-stone bridge
based load cell which should allow a user to measure everything from a few grams to tens of tons.
Arduino pin 2 -> HX711 CLK
3 -> DAT
5V -> VCC
GND -> GND

The HX711 board can be powered from 2.7V to 5V so the Arduino 5V power should be fine.

*/

#include "HX711.h"

#define calibration_factor -7050.0 //This value is obtained using the SparkFun_HX711_Calibration sketch

#define DOUT 3
#define CLK 2

HX711 scale(DOUT, CLK);

void setup() {
Serial.begin(9600);
Serial.println("HX711 scale demo");

scale.set_scale(calibration_factor); //This value is obtained by using the SparkFun_HX711_Calibration sketch
scale.tare(); //Assuming there is no weight on the scale at start up, reset the scale to 0

Serial.println("Readings:");
}

void loop() {
Serial.print("Reading: ");
Serial.print(scale.get_units(), 1); //scale.get_units() returns a float
Serial.print(" lbs"); //You can change this to kg but you'll need to refactor the calibration_factor
Serial.println();
}

Like I said three Seperate Measurements and three seperate lines of output in the serial monitor is my goal. Thanks!

HX711 scale(DOUT, CLK); // this line has three important values.

  1. The name "scale"
  2. datapin number
  3. clockpin number

Now change/add all the #define and names for that first sensor, and see if the sketch still works.

Example:

#define DOUT1 3 // pin3
#define CLK1 2 // pin2

HX711 scale1(DOUT1, CLK1);
scale1.tare();
etc.

Then add the second one.

#define DOUT2 5 // pin5
#define CLK2 4 // pin4

HX711 scale2(DOUT2, CLK2);
scale2.tare();
etc.

Post your attempt (inside code tags).
Leo..

I will try this, thank you!