# Two HX711 Load Cell Amplifiers on Pico

**URL:** <https://forum.core-electronics.com.au/t/two-hx711-load-cell-amplifiers-on-pico/19403>\
**Category:** Uncategorized\
**Created:** [14 March 2024 10:33 UTC](https://forum.core-electronics.com.au/t/two-hx711-load-cell-amplifiers-on-pico/19403 "2024-03-14T10:33:55Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Frederick60798](https://avatars.discourse-cdn.com/v4/letter/f/e0b2c6/32.png) [@Frederick60798](https://forum.core-electronics.com.au/u/Frederick60798)\
**Post date:** [14 March 2024 10:33 UTC](https://forum.core-electronics.com.au/t/two-hx711-load-cell-amplifiers-on-pico/19403/1 "2024-03-14T10:33:55Z")

</div>

I am trying to use two HX711 load cell amplifiers to connect two load cells to one Raspery Pi Pico.

By using the HX711 library and sample code at

> **[Makerverse Load Cell Kit Guide | Measure Weights and Forces - Tutorial Australia](https://core-electronics.com.au/guides/makerverse-load-cell-kit-guide/)**
>
> Introduction Welcome to the guide for the Makerverse Load Cell kit. With this hardware you will be able to make a set of scales capable of measuring weights up to 3kg with a precision as low as 0.1g!
> To follow along you will need:
> 
> The...

I have been able to independently set up and calibrate each load cell/HX711 combination using a 686 g test weight.

The load cell amplifiers were connected (one at a time) as follows:

LC1 Dout – GPIO21 Sclk GPIO20  
then  
LC2 Dout – GPIO11 Sclk GPIO10

Aaron (Core Electronics) has suggested that I modify the Core sample code as follows to use both LC1 and LC2 concurrently.

from machine import Pin  
from Makerverse\_hx710c import Makerverse\_hx710c  
from time import sleep\_ms

LC1 = Makerverse\_hx710c(dataPin = Pin(21), clkPin = Pin(20), calibration=0.001393792)  
LC2 = Makerverse\_hx710c(dataPin = Pin(11), clkPin = Pin(10), calibration=0.001417685)

while True:  
Data1 = LC1.read\_hx710\_calibrated()  
print(“{:+.3f} g1”.format(Data1))

```
Data2 = LC2.read_hx710_calibrated()
print("{:+.3f} g2".format(Data2))

sleep_ms(90)

```

Using the 686g test weight I get the following results.

Actual Weight on Load Cell Reported Weight  
LC1 LC2 LC1 LC2  
0 0 -161 0  
686 0 -161 0  
0 686 +513 +686

LC2 is working correctly but LC1 is not. If I subsequently disable each HX711 in turn (remove Vcc and Grd connections) the other one again works correctly.

Help is requested to get both load cells reporting correctly.

---

<div class="post-metadata">

**Author:** ![Frederick60798](https://avatars.discourse-cdn.com/v4/letter/f/e0b2c6/32.png) [@Frederick60798](https://forum.core-electronics.com.au/u/Frederick60798)\
**Post date:** [14 March 2024 22:46 UTC](https://forum.core-electronics.com.au/t/two-hx711-load-cell-amplifiers-on-pico/19403/2 "2024-03-14T22:46:08Z")

</div>

My results table lost its formatting when posted. It should look more like the following.

![Results](https://canada1.discourse-cdn.com/flex028/uploads/core_electronics/original/2X/1/13a2123440bd506838b32694c5ceefa6d8c29202.jpeg)

The problem I am having seems to be that experienced in the following post.

> [@Multi Scale System - How to use mutiple scales](https://forum.core-electronics.com.au/t/multi-scale-system-how-to-use-mutiple-scales/17509):
>
> Hi I need some help with my scale system. I’ve created all the main components for my system, I’m just trying to get this work for the code side now. I did use chatGPT to develop Code for this I’m using the Maker verse hx710b load cell amplifiers. I don’t know whether their are any issues within the code or hardware. I started of by verifying that each 4 of my scales works correctly individually. Then I started to mess around with Two which I could not seem to get working e.g. scale 1 reports …

Any help to resolve this would be appreciated.

Fred

---

<div class="post-metadata">

**Author:** ![Liam120347](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/liam120347/32/5003_2.png) [@Liam120347](https://forum.core-electronics.com.au/u/Liam120347)\
**Post date:** [14 March 2024 23:24 UTC](https://forum.core-electronics.com.au/t/two-hx711-load-cell-amplifiers-on-pico/19403/3 "2024-03-14T23:24:46Z")

</div>

Hi Fred,

Awesome project!

The Makerverse Load cell uses the Picos PIO behind the scenes.  
You’ll have to specify a different state machine for each:

```auto
from machine import Pin
from Makerverse_hx710c import Makerverse_hx710c
from time import sleep_ms

LC1 = Makerverse_hx710c(dataPin = Pin(21), clkPin = Pin(20), calibration=0.001393792)
LC2 = Makerverse_hx710c(dataPin = Pin(11), clkPin = Pin(10),stateMachine = 1, calibration=0.001417685)

```

The code above should work.

---

<div class="post-metadata">

**Author:** ![Frederick60798](https://avatars.discourse-cdn.com/v4/letter/f/e0b2c6/32.png) [@Frederick60798](https://forum.core-electronics.com.au/u/Frederick60798)\
**Post date:** [15 March 2024 00:21 UTC](https://forum.core-electronics.com.au/t/two-hx711-load-cell-amplifiers-on-pico/19403/4 "2024-03-15T00:21:00Z")

</div>

Liam,

Yes that’s all it needed. Now working perfectly.  
Thanks very much for your help.  
What a great forum!

Regards,

Fred

---

<div class="post-metadata">

**Author:** ![Liam120347](https://yyz2.discourse-cdn.com/flex028/user_avatar/forum.core-electronics.com.au/liam120347/32/5003_2.png) [@Liam120347](https://forum.core-electronics.com.au/u/Liam120347)\
**Post date:** [15 March 2024 00:30 UTC](https://forum.core-electronics.com.au/t/two-hx711-load-cell-amplifiers-on-pico/19403/5 "2024-03-15T00:30:22Z")

</div>

Hi Fred,

Great to hear! No worries at all 😃

Keen to see what you make!

---

<div class="post-metadata">

**Author:** ![John55139](https://avatars.discourse-cdn.com/v4/letter/j/45deac/32.png) [@John55139](https://forum.core-electronics.com.au/u/John55139)\
**Post date:** [16 March 2024 23:32 UTC](https://forum.core-electronics.com.au/t/two-hx711-load-cell-amplifiers-on-pico/19403/6 "2024-03-16T23:32:36Z")

</div>

Why are you using two HX711s? Are the two load cells supporting the same platform? If so then you can just connect both load cells to the same HX711.

---

<div class="post-metadata">

**Author:** ![Frederick60798](https://avatars.discourse-cdn.com/v4/letter/f/e0b2c6/32.png) [@Frederick60798](https://forum.core-electronics.com.au/u/Frederick60798)\
**Post date:** [17 March 2024 04:42 UTC](https://forum.core-electronics.com.au/t/two-hx711-load-cell-amplifiers-on-pico/19403/7 "2024-03-17T04:42:32Z")

</div>

John,

I am wanting to measure two independent loads so believe I have to use two HX711s.

Regards,

Fred
