elter1ster
Posts: 5
Joined: Thu Sep 24, 2015 6:05 am

Raspberry Pi3 and HX711

Tue Apr 12, 2016 6:05 am

Hi,

Can somebody help me with HX711 loadcell sensor and Raspberry Pi3?

I need to get those communicating with together. What I need to do? I´m rookie with these so please give me quite simple quide what I need to do.

I already connected HX711 to the tension load sensor, but now I need to know to which pins I need to connect HX711 and Raspberry Pi?

In Rasperry I have already installed raspian Jessie.

And also where I can find correct code to the that HX711 sensor and how I can install/add that code to the Raspberry Pi

I hope that above are all question where I need answer this moment, but if there are something else what I need to know please tell me.

Regards.

elter1ster
Posts: 5
Joined: Thu Sep 24, 2015 6:05 am

Re: Raspberry Pi3 and HX711

Fri Apr 15, 2016 8:32 am

Hi,

Now I get that Project that far that I get below information from tension load sensor. It is same how much I put load to the sensor results are the same:

0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n: 0
-
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n: 0
-
*SNIP*
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n: 0
-
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 n: 0
-
No data to consider

Please can somebody help me?

User avatar
RaTTuS
Posts: 10506
Joined: Tue Nov 29, 2011 11:12 am
Location: North West UK
Contact: Twitter YouTube

Re: Raspberry Pi3 and HX711

Fri Apr 15, 2016 8:51 am

I'm sorry
my e-crystal ball is suitablely broken
what instructions are you following
what equipment have you got
what have you plugged where
what have you done
what appears not to work
How To ask Questions :- http://www.catb.org/esr/faqs/smart-questions.html
WARNING - some parts of this post may be erroneous YMMV

1QC43qbL5FySu2Pi51vGqKqxy3UiJgukSX
Covfefe

elter1ster
Posts: 5
Joined: Thu Sep 24, 2015 6:05 am

Re: Raspberry Pi3 and HX711

Fri Apr 15, 2016 9:06 am

what instructions are you following:
- I tried to find instructions how I can get my Project combination working
what equipment have you got:
- I have below equipment:
- Raspberry Pi 3
- SparkFun Load Cell Amplifier - HX711
- Laumas FUN Load cells for wire rope measuring sensor
what have you plugged where
- I have made below connections:
- Load cell plugged to the Sparkfun load cell amplifier HX711
- Load cell amplifier HX711plugged to the Raspberry Pi
- HX711 VCC <-> Raspberry Pi pin 2
- HX711 DAT <-> Raspberry Pi pin 16
- HX711 CLK <-> Raspberry Pi pin 18
- HX711 GND <-> Raspberry Pi pin 20
what have you done
- Already installed Jessie to the Raspberry Pi and also move HX711 code to the raspberry like below link:
http://hivetool.org/w/index.php?title=I ... X711_to_Pi
what appears not to work
- I dont any other results than 0 0 0 0 0 0 -> although put any kind load to the load cell.

Hope you get enough information.

User avatar
joan
Posts: 14480
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Raspberry Pi3 and HX711

Tue May 10, 2016 2:12 pm

I have a Python class at http://abyz.co.uk/rpi/pigpio/examples.h ... n_HX711_py

Power the sensor from 3V3 (pin 1) rather than 5V. If you feed 5V into a Pi GPIO there may be problems.

karen9434
Posts: 8
Joined: Tue Nov 24, 2015 11:39 am

Re: Raspberry Pi3 and HX711

Thu May 12, 2016 12:18 pm

joan wrote:I have a Python class at http://abyz.co.uk/rpi/pigpio/examples.h ... n_HX711_py

Power the sensor from 3V3 (pin 1) rather than 5V. If you feed 5V into a Pi GPIO there may be problems.
Could you please tell me how to calibrate and what is the unit (g, lbs??)of the values shown after running? Thanks.

User avatar
joan
Posts: 14480
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Raspberry Pi3 and HX711

Thu May 12, 2016 12:36 pm

karen9434 wrote: Could you please tell me how to calibrate and what is the unit (g, lbs??)of the values shown after running? Thanks.
All my script does is read the raw data from one of the channels.

If you have connected it to a weighing machine the normal calibration would be to take 50 or so readings with no weight and average them to get a zero reading, RZ say. Then add a large weight, say W, and take another 50 or so readings to get a known weight reading, RW say. You would then place the weight, say U, you are interested in on the scale and get a reading, say RU.

Then U would be (RU-RZ) / (RW-RZ) * W

karen9434
Posts: 8
Joined: Tue Nov 24, 2015 11:39 am

Re: Raspberry Pi3 and HX711

Mon May 16, 2016 11:48 am

joan wrote:
karen9434 wrote: Could you please tell me how to calibrate and what is the unit (g, lbs??)of the values shown after running? Thanks.
All my script does is read the raw data from one of the channels.

If you have connected it to a weighing machine the normal calibration would be to take 50 or so readings with no weight and average them to get a zero reading, RZ say. Then add a large weight, say W, and take another 50 or so readings to get a known weight reading, RW say. You would then place the weight, say U, you are interested in on the scale and get a reading, say RU.

Then U would be (RU-RZ) / (RW-RZ) * W

Thank you so much! I can work with a 3kg load cell with HX711. However, when I plug into another load cell of 20 kg with HX711, it cannot work. Is there any difference of writing the equation or which channel should be used for 20 kg one? Thank you.

User avatar
joan
Posts: 14480
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Raspberry Pi3 and HX711

Mon May 16, 2016 12:10 pm

karen9434 wrote: ...
Thank you so much! I can work with a 3kg load cell with HX711. However, when I plug into another load cell of 20 kg with HX711, it cannot work. Is there any difference of writing the equation or which channel should be used for 20 kg one? Thank you.
That's beyond my knowledge. However I would try in the order

CH_B_GAIN_32
CH_A_GAIN_64
CH_A_GAIN_128

You will need separate calibration constants for each channel and you will need to re-calibrate periodically.

Andrew Heaney
Posts: 4
Joined: Sat Feb 11, 2017 6:57 pm

Re: Raspberry Pi3 and HX711

Sat Feb 11, 2017 7:09 pm

I have been following this thread and I have not been able to get the desired output from the sensor. When I run the script I get the following output:

start with CH_B_GAIN_32 and callback
Change mode to CH_A_GAIN_64
Change mode to CH_A_GAIN_128
Pause
Start
Cancel callback and read manually
0

Can anyone tell me what this means? Is there a way to specify what pins the input comes from. My data pin is 23 and my clock pin is 24.

Thanks

User avatar
joan
Posts: 14480
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Raspberry Pi3 and HX711

Sun Feb 12, 2017 11:54 am

You need to edit the following line

Code: Select all

s = HX711.sensor(pi, DATA=9, CLOCK=11, mode=CH_B_GAIN_32, callback=cbf)
Change the 9 to the Broadcom GPIO you have connected to the data line and the 11 to the Broadcom GPIO you have connected to the clock line.

Andrew Heaney
Posts: 4
Joined: Sat Feb 11, 2017 6:57 pm

Re: Raspberry Pi3 and HX711

Sun Feb 12, 2017 1:20 pm

joan wrote:You need to edit the following line

Code: Select all

s = HX711.sensor(pi, DATA=9, CLOCK=11, mode=CH_B_GAIN_32, callback=cbf)
Change the 9 to the Broadcom GPIO you have connected to the data line and the 11 to the Broadcom GPIO you have connected to the clock line.
Thanks for the reply. I changed the 9 and the 11 to the correct numbers but I'm still getting the same 0 output from the sensor? Any ideas why this might be?

User avatar
joan
Posts: 14480
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Raspberry Pi3 and HX711

Sun Feb 12, 2017 1:26 pm

Could be many reasons. A photo clearly showing the connections between the Pi and the HX711 may help.

Andrew Heaney
Posts: 4
Joined: Sat Feb 11, 2017 6:57 pm

Re: Raspberry Pi3 and HX711

Sun Feb 12, 2017 1:42 pm

This is the hardware
http://imgur.com/a/bKdhd

User avatar
joan
Posts: 14480
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: Raspberry Pi3 and HX711

Sun Feb 12, 2017 2:48 pm

The connections look fine. By the way clock is 23 and data is 24. Was that a typo?

Andrew Heaney
Posts: 4
Joined: Sat Feb 11, 2017 6:57 pm

Re: Raspberry Pi3 and HX711

Sun Feb 12, 2017 5:34 pm

Thank you so much I had the pin numbers the wrong way round the whole time. It's finally working. Thanks for all your help much appreciated.

Johnny_Bex
Posts: 1
Joined: Thu Mar 02, 2017 4:08 pm

Re: Raspberry Pi3 and HX711

Thu Mar 02, 2017 4:23 pm

Could you please send the code that you used. I have this exact module but I'm having trouble figuring out what to import from what library and what syntax I should be using. I'm planning on converting an MQ-2 sensor's digital input into an analogueone that my RPi can effectively read and do stuff on.

ashwin2695
Posts: 2
Joined: Sun Mar 19, 2017 1:12 pm

Re: Raspberry Pi3 and HX711

Sun Mar 19, 2017 1:16 pm

Hello elter1ster can you please tell me howto connect the raspberry pi ,hx711 and the load sensor together and can you forward me the python code for using hx711 and raspberry pi

ashwin2695
Posts: 2
Joined: Sun Mar 19, 2017 1:12 pm

Re: Raspberry Pi3 and HX711

Sun Mar 19, 2017 2:26 pm

I have connect the raspberry pi to the hx711 as mentioned above and also have connected the hx711 to the load cell as mentioned
when i am running the code given in the hx711.c file
the code compiles and also executes but there is no output
can somebody help me with that!

User avatar
gandalf15
Posts: 1
Joined: Fri Aug 18, 2017 11:57 pm

Re: Raspberry Pi3 and HX711

Sat Aug 19, 2017 12:00 am

Hello,
I just finished my class. It is only in python 3. I will implement it in C later on. :twisted:
https://github.com/gandalf15/HX711

Take look at example.py it should be clear how to use it. :geek:

Return to “Beginners”