How to use HX711 with Four Load Cells

Поделиться
HTML-код
  • Опубликовано: 23 июл 2024
  • Have you ever needed to weigh something or wanted to automate something using weight? Try using a four load cell setup for your next project.
    To see the code, check out my article here robotresearchlab.com/2020/08/2...
  • НаукаНаука

Комментарии • 88

  • @RobotResearchLab
    @RobotResearchLab  2 года назад +1

    The library for this has some changes which have apparently affected the `scale.begin()` command. I didn't have time to figure out why but did fix the code in my blog post. If you are seeing an error regarding the `begin()` function, check out lines 25 and 26 in the code in my blog post for the fix. robotresearchlab.com/2020/08/28/four-load-cell-with-hx711-programming/#The_Code

  • @CamiloSperberg
    @CamiloSperberg 3 года назад

    Thank you sooo much for this easy, right to the point explanation! I was getting pretty confused by how to connect it all and most videos and guides connect only the one that has the integrated weathstone bridge. My only issue now is to get all cable lengths the same as I have to set up 8 of them under our bed somehow hahaha

    • @RobotResearchLab
      @RobotResearchLab  3 года назад +1

      Thanks for the kind words, I'm glad this helped. Sorry I can't help with your cable management, I would if I could ha ha.

  • @luigibuffone5533
    @luigibuffone5533 Год назад

    Good video. I am looking for a code to manager 2 or more sensors in output

  • @qzorn4440
    @qzorn4440 2 года назад

    very interesting way to use the strain gages as a load-cell bridge. 😃years ago i purchased some strain gages from Omega Engineering with epoxy to glue on an I-bead to measure the flex to weigh several tons as a ball-park scale indicator. 🥳thanks a lot. 🥠☕🐬

  • @user-dj2jq2dp2t
    @user-dj2jq2dp2t 11 месяцев назад +1

    hello, thank you for your video, it's very clear. I'm kind of new to electronics, for a project I need to be able to measure weight from 24 different sources. Do you think it would be possible to use six HX711 (witch each four load cells) connected to the same Arduino ?

    • @RobotResearchLab
      @RobotResearchLab  10 месяцев назад

      I don't think this will give you what you need. When you connect four load cells to an HX711, the inputs are combined into a single output. I don't believe there is a way to get each cell's value.
      I'm not absolutely positive but I believe you would need an HX711 or other sensitive ADC for each load cell if you want to do it this way.

  • @pathmashanthasenanayake2144
    @pathmashanthasenanayake2144 3 года назад

    my Arduino code shows this compile error "no matching function for call to 'HX711::HX711()'". Please help me

  • @amateurbythesea8376
    @amateurbythesea8376 2 месяца назад

    To make it clear, is "Load cell" a combination of four "Strain gauge"' in bridge circuit?

  • @markamandaangeloni1918
    @markamandaangeloni1918 3 года назад

    Hi There how did your project turn out?
    I take it you were leaving the kegs on the scales for days on end did this cause any problems in the weight readings creeping.
    Your project is similar to mine and this is my main concern the margin of error with a load on the scales almost permanently would give an unworkable error for my needs.
    what sort of weight were you trying to weigh and what error did you get.
    Thanks

    • @RobotResearchLab
      @RobotResearchLab  3 года назад

      My final project actually ended up being a coffee monitor for the office. It monitors the amount of coffee in a carafe to let people know how many cups are in it, it even sends out a Slack message to notify people when a new pot was brewed. Anyway, the weight of the carafe and coffee together was about 120 ounces if I recall. I did have issues with creeping which I tried to fix by taring when I detected the carafe was removed from the scale (during a new brew). Ultimately it ended up that I had better results just ignoring the creeping because it would eventually hover around the accurate reading, it would just sway up and down over time, the amount of creep was never more than a couple ounces. I want to say (though I don't recall if it was the case) that I ended up having less creeping problems by using a different sensor than the HX-711. I used an ADS1232 which was harder to find, and even harder to find documentation for, I ended up writing my own library for it because I couldn't find one but this was all done on the Raspberry Pi because, since it sends Slack notifications I wanted an all in one system instead of an Arduino plus a WiFi module. It also gave me the ability to add logging to a MySQL database and create a website where I could view logs and charts of historical data.

  • @matthewb7800
    @matthewb7800 2 года назад +1

    I accidentally purchased some 4-wire strain gauges, can they be tied together like the 3-wire? I found your drawing for a single 4 wire but not for a multi 4-wire setup.

    • @RobotResearchLab
      @RobotResearchLab  2 года назад

      I'm going to be honest here, electronics is not my best skill, I have enough knowledge to get around but that's about it. I'm not sure if you can tie more than one four-wire strain gauge together. What I would do if I were in your situation is simply use two HX711 boards and average the values in the software to get a combined result. I hope that helps, sorry I couldn't directly answer your question.

  • @filip4188
    @filip4188 2 года назад +1

    I am trying to recreate scale but i do get fault in code problem is : Scale.begin(LOADCELL_DOUT_PIN, LOADCELL_SCK_PIN, 128); its says that no matching function for call to 'HX711::begin(const int&, const int&, int)'
    .... could you help ?

    • @RobotResearchLab
      @RobotResearchLab  2 года назад

      Yeah, I got a couple comments on my blog post about this project as well. I don't have a lot of free time these days but I looked into the library quickly but I couldn't see what would have changed to cause this code to fail but I did come up with a workaround. If you remove that last argument (the 128) then that should fix the scale.begin() call. The third parameter is for controlling the gain, which is defaulted to 128 anyway so it won't alter the functionality. If you do end up needing to adjust the gain later down the road, there is a `scale.set_gain(128)` function that can be called.
      I've also updated the code in my blog post so you can check that out if you want, if I recall, it's lines 25 and 26 that have changed. robotresearchlab.com/2020/08/28/four-load-cell-with-hx711-programming/#The_Code

  • @makespace8483
    @makespace8483 2 года назад

    Well explained. Thanks.

  • @elliob
    @elliob Год назад +1

    What is VCC from the HX711 board connect to on the ESP? 3.3V or 5V?

  • @prof953
    @prof953 4 года назад +1

    Is it possible to read 4 loadcells individually in this configuration?
    I need to read 4 loadcell value and display in LCD. Do I need four HX711 or is it possible with single as in your video?

    • @RobotResearchLab
      @RobotResearchLab  3 года назад

      Unfortunately not in this configuration. In order to do that you would need to have four different HX-711s, at least that would be the simplest circuit I could think of, there are other more complex circuits that might allow for a single HX-711 but would be much more complex than necessary given the option of just using four HX-711s. Sorry for the late reply, I'm not getting notifications for every comment for some reason.

    • @prof953
      @prof953 3 года назад

      @@RobotResearchLab Thankyou for the reply. I just made it using 4 loadcells.

  • @ljbix
    @ljbix 3 года назад

    I want to make a 4-corner scale using this amplifier, but with four 1kg load cells the type that are each a bridge, with four wires: V+, V-, Sig+, Sig-. (Max load this will ever see is about 1.2kg, distributed among the four load cells). Seems like I would just hook all four up in parallel - all four V+ wires together to the supply, all four V- wires together to ground, and all the Sig+ wires together and all the Sig- wires together, and then provide the four resulting common connections to the HX711. Is that right?

    • @RobotResearchLab
      @RobotResearchLab  3 года назад +1

      Unfortunately it wouldn't work that way since each of the four wire load cells contains its own wheatstone bridge, you could theoretically hook up two of the four wire load cells to a single HX711. Normally diagrams online show hooking up to E+,E-,A+,A- but there is also a B+ and B- that can be used for a second set of inputs. The issue there is that you'd have a hard time finding a library already built to support it. Most libraries I've seen only manage the single (A) channel.
      Your best option would probably be to use an HX711 for each load cell. In that case you'd just create four HX711 objects in your code and you would simply add the total between the four readings.

    • @ljbix
      @ljbix 3 года назад +1

      @@RobotResearchLab I think it actually does work. electronics.stackexchange.com/questions/484863/connecting-4-load-cells-in-parallel (and other hits on googling 'connect 4 load cells in parallel). It just makes a larger bridge with the corresponding leg of each wired in parallel. But buying 4 load cells with 4 HX711 is almost as cheap as buying just the four load cells so I can try it both ways. One advantage of 4 HX711s: I could calibrate each channel separately to eliminate corner error that arises from different gains in the load cells (if necessary and it probably won't be).

    • @RobotResearchLab
      @RobotResearchLab  3 года назад +1

      @@ljbix Interesting... I didn't think that would work but yeah, searching for load cells in parallel there seems to be a lot of documentation on it. To be honest electronics is not my strong suit, I'm a Software Engineer by trade, electronics was some basic stuff in the military and other self taught stuff. I never got into Thevenin circuit theory.
      Sorry I almost steered you in the wrong direction, I honestly didn't think that was possible but glad I was able to learn something new.

  • @christopherstaples6758
    @christopherstaples6758 2 года назад

    @1:40 how do you wire up multiple of those ? I am wanting to use 4x 1kg versions on each corner of my fish feeders to workout how many grams of feed is being dispensed (assuming this would let me weigh 4kg worth of feed or am i better of with just 1x 5kg ? I am trying to measure to nearest gram )

    • @RobotResearchLab
      @RobotResearchLab  2 года назад

      You could probably go with either one 5KG or four 1KG sensors, the smaller the sensor, the better the resolution should be so it might be slightly more accurate to go with the four 1KG sensors. You would wire it up the same way I have mine wired. Here is a link to an image showing how the four sensors should be wired in order to feed into the sensing board. aws1.discourse-cdn.com/arduino/original/4X/1/8/4/1846b960455dc62a2179470df9ae335eebecce1b.jpeg Let me know if you have any issues.

    • @royemory800
      @royemory800 4 месяца назад

      @@RobotResearchLab Link to image is broken.

  • @wilvanham8911
    @wilvanham8911 3 года назад

    How to integrate a tarra weight?

  • @leyxy
    @leyxy 2 года назад

    Hi there, I have issue with my program. But in my program, I use Raspberry pi.
    I just want to use 1 load cell. The output giving me inconsistent value. Any advice?

    • @RobotResearchLab
      @RobotResearchLab  2 года назад

      It's hard to troubleshoot over text but I would first check that you get expected changes when you press on and release the sensor. As long as it goes up when you press and down when you let go at least you know it's somewhat working properly. After that, if you are getting drift when nothing is on it, try putting weight on it and see if it still drifts. Any more testing would be based on what you see after running those checks.
      I hope this helps.

  • @ciennacharron8820
    @ciennacharron8820 2 года назад

    You mentioned that all the wires have to be the same length on every sensor, but can you shorten the wires as long as they are the same?

    • @RobotResearchLab
      @RobotResearchLab  2 года назад +1

      As long as they are the same length it wouldn't matter if they were cut shorter. In fact, the length of the wires shouldn't affect the results too much, it's just that because these sensors are very sensitive, it's possible that having different lengths could affect the output since longer wire (especially thinner wire) increases resistance. Again, this would be very minimal and probably not noticeable but is worth noting.

  • @_frostypaw
    @_frostypaw 3 года назад +1

    How did you connect the wires together under the scale? Electrical tape?

    • @RobotResearchLab
      @RobotResearchLab  3 года назад

      I wouldn't recommend electrical tape but you could use that if you have nothing else (twist the wires together and tape them). For my project I always solder the wires together and cover it with heat shrink tubing. You could use a breadboard, this would allow you to plug each wire in and no taping or soldering would be necessary. This video ruclips.net/video/MT8cT7eCWSg/видео.html is for a battery connector but it would show you how I connect wires together. Thanks for watching and commenting.

  • @pathmashanthasenanayake2144
    @pathmashanthasenanayake2144 3 года назад

    Good job sir 💛💛

  • @OmaraDynasty
    @OmaraDynasty 3 года назад

    Thank you so much for this video! Helped alot with general knowledge of the HX711 and how it works. My current project is looking to possibly use multiple sensors. Do you know if it is possible to use multiple HX711 (up to 4 so 16 sensors) with one Arduino uno?

    • @RobotResearchLab
      @RobotResearchLab  3 года назад

      To be perfectly honest, I don't know of a way to mesh multiple sensors though I imagine it's possible. If they are all part of the same scale you could use multiple sensors and simply add the values from each sensor to get the total distributed weight.

  • @kristophermaltais4154
    @kristophermaltais4154 3 года назад +1

    Hello, is it possible to use these load cells with a larger surface? Maybe around a square 5 feet x 5 feet?

    • @RobotResearchLab
      @RobotResearchLab  3 года назад +1

      Of course, you can use any size object, as long as it is completely supported by the sensors. You will also have to take into account the weight of the object you are using as the base of the scale. Each load cell can support 50Kg/100lb, with four that would allow you 200Kg/400lb. So, say your scale base weighs 100lb that means you shouldn't try to weigh anything over 300lb or you'll risk damaging the sensors.

    • @kristophermaltais4154
      @kristophermaltais4154 3 года назад

      Thank you for the answer! I set my scale with the 4 x 50kg load cells but I get inaccurate data... I set it up exactly like you did and I get data like these (I use my cellphone of 159g as the know weigth for the calibration):
      08:12:28.341 -> Readings:
      08:12:28.341 -> one reading: 1192.5 | average: -95.4
      08:12:31.312 -> one reading: 1192.5 | average: 270.3
      08:12:34.186 -> one reading: 1733.1 | average: 1431.0
      08:12:37.021 -> one reading: 572.4 | average: 747.3
      08:12:39.890 -> one reading: 826.8 | average: 747.3
      08:12:42.762 -> one reading: -1733.1 | average: -47.7
      08:12:45.637 -> one reading: 79.5 | average: -667.8
      08:12:48.509 -> one reading: -1144.8 | average: -2687.1
      08:12:51.368 -> one reading: -2909.7 | average: -3211.8
      08:12:54.239 -> one reading: -3847.8 | average: -3943.2
      08:12:57.091 -> one reading: -3227.7 | average: -2687.1
      08:12:59.947 -> one reading: -2718.9 | average: -1876.2
      08:13:02.822 -> one reading: -2273.7 | average: -2941.5
      08:13:05.665 -> one reading: -2559.9 | average: -3148.2
      08:13:08.539 -> one reading: -3657.0 | average: -3052.8
      08:13:11.415 -> one reading: -2623.5 | average: -3323.1
      08:13:14.260 -> one reading: -3195.9 | average: -2194.2
      08:13:17.135 -> one reading: -2416.8 | average: -2877.9
      08:13:19.992 -> one reading: -2289.6 | average: -3339.0
      08:13:22.872 -> one reading: -3307.2 | average: -2830.2
      08:13:25.715 -> one reading: -1272.0 | average: -1764.9
      I also tried other thing up to 2000g for my know weight and I face the same situation.
      My scale is a 6x6 square and I use solid wood for the two platform.
      Do you have any tips to help me with the situation? is it possible that a part of my system doesn't work as expected? I use load cells bought on amazon (came with the hx711), an arduino nano and a breadboard. I verify the tension in the wires and it is correct.
      I don't know what to do and I read a lot on the Internet, but nothing helped me.
      Sorry for my english, it is not my first language!

    • @RobotResearchLab
      @RobotResearchLab  3 года назад

      @@kristophermaltais4154 Yeah, those are very bad readings, it's possible that you have a bad sensor but I'm not sure. I never really had to troubleshoot mine because it just seemed to work. The one issue I did have at first (and I think I mention in the video) is that you have to put the outer part of the scale sensor on something to lift it up and you need to have space in the middle for the middle part to move up and down. So, be sure the middle part can move up and down and is not sitting on a flat surface.
      If you are getting the same reading with no weight, another thing you could try is, with the wood surface off, put a known weight on each sensor by itself, it may not give you accurate readings but it should give you the same reading over and over. If you aren't getting similar readings constantly, you may have a bad scale sensor.
      Are you getting close to the same reading when there is nothing on the scale?

  • @user-nc6ro6ie9f
    @user-nc6ro6ie9f 3 года назад +1

    If we use 4 pcs of 50 kg loadcell, the maximum weight will be 200 kg or still max 50 kg?

    • @RobotResearchLab
      @RobotResearchLab  3 года назад

      Dusting off my knowledge from college physics, theoretically the max weight would be 200 kg since the weight is distributed across four sensors at 50 kg max for each. However, this assumes the weight is evenly distributed so I definitely wouldn't push the max limit since there may be slight variances in placement, how well the sensor is touching each plate, and where the weight is placed on the plate. Good question, thanks for asking.

  • @msqru
    @msqru 2 года назад +1

    Hi. if the sensor is under load all the time, will it affect its performance? Will it stop working due to deformation?

    • @RobotResearchLab
      @RobotResearchLab  2 года назад +1

      I can't say for certain but my guess would be that it would be fine. The sensor reads based on the amount of flex in the film so it shouldn't be affected by a constant load. Please let me know if you find out otherwise, I'd be interested to hear about it.

    • @msqru
      @msqru 2 года назад +1

      @@RobotResearchLab thank you for the answer. Definitely will write you when I will chek it ;)

  • @pathmashanthasenanayake2144
    @pathmashanthasenanayake2144 3 года назад +1

    Please explain following code line...
    HX711 scale;

    • @RobotResearchLab
      @RobotResearchLab  3 года назад

      In this line, it's much like creating a variable but instead we're creating what is called an "object". Objects can have specific values and functions that all relate to that object. In this case we created an HX711 object and called it scale because the functions for this object will be representing readings from the weight scale. I hope that helps.

  • @daveanthonymanrique9180
    @daveanthonymanrique9180 2 месяца назад

    Good day sir do you have python code of this?

  • @BretBowlby
    @BretBowlby 3 года назад +1

    how accurate are these? can it go down to the per gram?

    • @RobotResearchLab
      @RobotResearchLab  3 года назад

      It's been a while but I think I showed a little bit of the accuracy toward the end of the video. With that said though, I use my project to monitor weight in ounces and it can fluctuate by an ounce or so and an ounce is about 28 grams. The main issue is that everything comes into play, if you take a look at the datasheet, different temperatures can yield different results so if the temperature changes, your weight calculation would need to change for that much accuracy.
      TLDR; Out of the box, not accurate to gram precision but with some algorithms like maybe a kalman filter it could be better.

  • @ashwin.r1780
    @ashwin.r1780 3 года назад +1

    Can we use 4x4 wire loadcell with this setup ??

    • @RobotResearchLab
      @RobotResearchLab  3 года назад

      If you are referring to the single load cells with 4 wires then yes, this same setup would work.

  • @user-uz3pz2mc6m
    @user-uz3pz2mc6m 4 года назад +1

    Nice!

  • @yurheejin5706
    @yurheejin5706 3 года назад +1

    how did you attach load cell on the plate? did you use glue gun?

    • @RobotResearchLab
      @RobotResearchLab  3 года назад

      Oh yeah, good question. Yes, I used a small dab of hot glue on each corner. You just have to be sure it doesn't interfere with the movement of the middle piece as the flexion from that piece is what determines the load.

  • @wallthemart
    @wallthemart 4 года назад +1

    Can this specific load cell be used as a singular load cell? I don't quite understand the reasoning for the wheatstone bridge.

    • @RobotResearchLab
      @RobotResearchLab  3 года назад

      Sorry for the delay, I wasn't getting notified of all comments. Yes, you can use a single load cell, I did a video on the four load cell setup because there isn't much out there for that. There are lots of examples for single load cell setups. The reason I need four load cells is because I want a platform to be able to determine the total weight, I can't simply put one load cell in the middle because it would need to balance on a single load cell.
      In order to use multiple cells for balance (one in each corner) you need the wheatstone bridge to essentially combine the four sensors into one otherwise you could check the load on each sensor and combine it yourself but that would be a lot of extra wiring, components, and code. Some load cells have wheatstone bridges built in with the flex sensors, you just don't see it but that's why they have four wires coming out. Check out this image for example, it uses four flex sensors but they're all inside so you don't have to worry about wiring it up. www.monodaq.com/wp-content/uploads/2020/04/cell-and-wheatstone-1024x412.png

  • @daffaakbarr
    @daffaakbarr Год назад +1

    when you wiring all the sensors together, is that becoming a full wheastone bridge ?

    • @RobotResearchLab
      @RobotResearchLab  Год назад

      Yes, the four sensors combined create a full wheatstone bridge.

    • @daffaakbarr
      @daffaakbarr Год назад

      @@RobotResearchLab full wheatstone bridge, all 4 resistors changes their values to get the weight measures ?

    • @RobotResearchLab
      @RobotResearchLab  Год назад

      @@daffaakbarr Yes, the fact that all four are "active" components makes it a full wheatstone bridge

    • @daffaakbarr
      @daffaakbarr Год назад +1

      @@RobotResearchLab i see, thankyou for the answers

    • @daffaakbarr
      @daffaakbarr Год назад

      @@RobotResearchLab heyy, i just wanna ask something about voltage change. When i use 4 loadcell sensor, every single sensor have the voltage change, lets say V1,V2,V3, dan V4. So the delta V = V1+V2+V3+V4 ? And the delta V gonna be converted using ADC?

  • @i_am_great6344
    @i_am_great6344 2 года назад +1

    What is the Total weight it can handle

    • @RobotResearchLab
      @RobotResearchLab  2 года назад +1

      The ones I have state that they are 50KG sensors. If you have four of them then the total weight they can support would be 200KG since the weight would be distributed evenly across the sensors. So, provided the weight is evenly distributed, the total weight calculation would simply be (# of sensors * weight supported by each sensor)

    • @i_am_great6344
      @i_am_great6344 2 года назад +1

      @@RobotResearchLab thank you soo much

  • @TheDiverJim
    @TheDiverJim 3 года назад

    How could I do this with only 1 of these thin load cells? I need a thin pressure sensor.

    • @RobotResearchLab
      @RobotResearchLab  3 года назад

      Are you asking about using a strain gauge by itself (like this one that is mounted on a piece of glass i.ytimg.com/vi/uQWfNc24Ehc/hqdefault.jpg ) or just using a single load sensor like the four I was using in the video?

    • @TheDiverJim
      @TheDiverJim 3 года назад

      @@RobotResearchLab maybe both. My original question was using a single load cell like the 4 used in your vid.

    • @RobotResearchLab
      @RobotResearchLab  3 года назад +1

      @@TheDiverJim That should be pretty easy though I have not tested this myself. Since you're only using one, you have to essentially finish the wheatstone bridge yourself. Here is an image of a circuit that should work for you, then the code should all be the same.
      aws1.discourse-cdn.com/arduino/original/4X/7/9/1/791377ddf46355cc9d9d6d059fbc83f9841a0f66.jpeg

    • @TheDiverJim
      @TheDiverJim 3 года назад

      @@RobotResearchLab thank you so much!!! I unsure what the amazon listing meant by half bridge, yet 4 load cells. So since these are center taped, the thermal error should still be compensated for some what?

    • @RobotResearchLab
      @RobotResearchLab  2 года назад +1

      @@TheDiverJim I wouldn't worry about the thermal compensation, at least not until you get the code running and figure out if it's actually an issue. Also, if the ambient temperature is going to be relatively stable it wouldn't matter as it would be factored into the calibration for the most part.

  • @parikapustina1398
    @parikapustina1398 10 месяцев назад +1

    Thank you for the video,
    but it is a shame that a long video with 32k views, has no actual Diagram attached to it. It is not scientific to have to zoom into the video to "guess" the wiring. i give it a try, i hope i do not burn my boards.

  • @dani-hc6ut
    @dani-hc6ut 4 года назад +1

    Can i have a coding

    • @RobotResearchLab
      @RobotResearchLab  3 года назад

      Sorry for the delay, here's an article that includes the code robotresearchlab.com/2020/08/28/four-load-cell-with-hx711-programming/ Thanks for watching!