Help wanted: High capacity loadcell with esp32 - Page 1
Forum section: electronics / projects

author: raoul98765nl
author_rank: Newbie
timestamp: March 03, 2023, 08:49:10 pm
content: Hi,I've got a couple of loadcells I would love to connect to an esp32 to measure the weight of a storage system. I've got 2 times 4 ct50ktc loadcells, 4 per system,specs are 2500mv/v, 5v power, max cap 22500kg.After some googling I found out that loadcells normally output about 10mv and require an amplifier.I looked up the formulas for loadcells, and according to the formula the max output voltage of my loadcell is 12.5v. That's a big probleem because the adc on the esp32 has a 3.3v max. And the loadcell needs a differential adc.I don't have any experience with loadcells and measuring them. So my question is could anyone help?

author: Martinn
author_rank: Frequent Contributor
timestamp: March 03, 2023, 09:12:33 pm
content: The ESP32 ADC is truly miserable, don't use it.The arduino guys typically use a HX711 type amplifier. Googling "esp32 hx711" will give you plenty of info.

author: Terry Bites
author_rank: Super Contributor
timestamp: March 03, 2023, 09:45:57 pm
content: How are you getting 12.5V from a 5V rail? That sounds like magic to me.For a load cell excited by 5V you have a common mode voltage of 2.5V.The term common mode voltage (CMV) refers to the fact that both the + and - outputs of the cell are at the same voltage under no load.The output, say 10mV, is riding on top of the 2.5V CMV. Its only thedifferencebetween + and - you need to amplify.You need a differential amplifier to sift the precious mV from the CMV. See attched- you'll figure it out.The HX711 is a handy low cost load cell signal conditioner that will do just that.Put the HX711 right next to the cell and use data lines to connect to the (remote) micro.Tip. Buy HX711 ready made PCBs, amazing VFM. You only need one common clock line.

author: james_s
author_rank: Super Contributor
timestamp: March 03, 2023, 09:52:52 pm
content: Isn't a load cell a Wheatstone bridge? If so then the 12.5V is probably the maximum voltage it can be safely used at.

author: Terry Bites
author_rank: Super Contributor
timestamp: March 04, 2023, 04:11:25 pm
content: A load cell is most certainly a Wheatstone bridge.The maximum exitation voltage allowed before heating starts to affect the accuracy of a large cell would be in the >10V area.Not a good idea to run at the max even if it looks like you're going to get a fatter signal.

author: raoul98765nl
author_rank: Newbie
timestamp: March 04, 2023, 07:58:35 pm
content: Thx people for the great feedback.I initially got the spec from someone onsite, but they do seem a bit off. So, I went to look myself (Picture of loadcell attached), had to clean the label a lot. It seems that the loadcell is 2.5 mv/v so HX711 would work fine.I've got 2 storage silos, each having 4 loadcells. What would be a recommended way of connecting that? I'm thinking about using the OT3331 (HX711 board)

author: mrburnzie
author_rank: Regular Contributor
timestamp: March 04, 2023, 08:10:51 pm
content: I had the opportunity to create a bee hive weighing project with the esp32.In short, I would suggest using an IC like the HX711 or something similar. The esp32 adc is just miserable, and you can't go wrong with a special purpose IC (if in stock of course).

author: james_s
author_rank: Super Contributor
timestamp: March 05, 2023, 12:01:14 am
content: Quote from: raoul98765nl on March 04, 2023, 07:58:35 pmDo you want the sum of all four load cells in a silo? If that's the case, then it seems what you want is a summing amplifier.https://www.electronics-tutorials.ws/opamp/opamp_4.htmlYou have an amplifier for each load cell that gives you a single ended voltage, then you can feed those into the summing amplifier and connect the output of that to the ADC.

author: Terry Bites
author_rank: Super Contributor
timestamp: March 05, 2023, 11:08:54 am
content: Do your summation in the digital domain- the errors will be smaller and easier to calibrate out.In your harsh envoinment you want to keep the analog electonics and analog signal lines to a minimum.I'd put a HX711 pcbs very close to the to the cells if you can, feed the clock and data to a local micro that has Ethernet or Wi-Fi.Say a arduino or Pie.

author: raoul98765nl
author_rank: Newbie
timestamp: March 05, 2023, 07:46:10 pm
content: The old system has the load cells cables coiled up and has maybe 5 meters or so of extra cable. After that, all 8 cells are connected in parallel in an ip68 box inside. the bundles 5v+, 5v-, sen+, sen-, gnd are connected to some board named "lcc" which does the measurement and is connect to some proprietary "io-net".It explains why there could only be one system weight.I'm planning to use the OT3331 board (HX711 chip with clock and two inputs (A and B)) with an esp32. I'm also planning to only use the included cable from the sensors, so I would place the new system (esp32 + hx711) between the two silos. Or underneath one of the silos to protect against rain.I have a couple of questions about the parallel connecting:What happens to the formula?Does to voltage just add or average?Is there an easy way to add ethernet to an esp32 devkit board?

author: james_s
author_rank: Super Contributor
timestamp: March 05, 2023, 07:53:17 pm
content: ESP32 is a wifi microcontroller, it has no facility to support wired ethernet. If anyone is still making SPI ethernet adapters it's probably possible to make it work but if you aren't going to use WiFi then there is little point in using the ESP32.

author: NiHaoMike
author_rank: Super Contributor
timestamp: March 06, 2023, 12:34:07 am
content: Quote from: james_s on March 05, 2023, 07:53:17 pmhttps://sautter.com/blog/ethernet-on-esp32-using-lan8720/

author: mrburnzie
author_rank: Regular Contributor
timestamp: March 06, 2023, 06:42:47 pm
content: It supports RMII, thus ethernet is quite easy.

author: Martinn
author_rank: Frequent Contributor
timestamp: March 06, 2023, 07:57:19 pm
content: Quote from: raoul98765nl on March 05, 2023, 07:46:10 pmConnecting multiple load cells seems common practise. I have so far been to lazy to do the proper math, but my guess would be that if the cells are perfectly mached (in terms of absolute resistances and sensitivities), then connecting them in parallel would result in having an averaged reading. When sensitivities don't match obviously you will get errors. If you have proper data sheets of your load cells (including measured sensitivities), you could calculate the error. Probably for a silo, distribution on the four corners will be pretty even so most likely connecting four in parallel will be OK (also since you did not state any accuracy requirement).However I'd definitely use two HX711 for the two silos.Quote from: raoul98765nl on March 05, 2023, 07:46:10 pmThere is a ethernet devkithttps://docs.espressif.com/projects/esp-idf/en/latest/esp32/hw-reference/esp32/get-started-ethernet-kit.htmlalthough ESP32 is known for Wifi, not cabled ethernet, so I wouldn't count on perfect software integration. Why not use a board that has ethernet natively built in like a Raspi?

author: james_s
author_rank: Super Contributor
timestamp: March 07, 2023, 01:03:46 am
content: If the load cells were wired in parallel in the original application, and that arrangement provided adequate performance when everything was in good working order then I see no reason why it wouldn't work just as well with a new DIY solution. I suppose you might get potentially useful diagnostic information by being able to view the output from individual load cells though.

author: raoul98765nl
author_rank: Newbie
timestamp: March 07, 2023, 08:06:20 pm
content: My thanks to everyone who has replied.Today I received the hx711 board. Hooked it up to the esp32 and it seems to work fine. I'll connect it to the system in the next few days.The reason I use the esp32 is because to get the prototype/demo version up and running I'm planning to connect it to an old phone wifi hotspot. But that is a temporary solution. As a permanent solution I was planning to run a 150-meter long ethernet cable/network to the system, but that requires some more paperwork. I'm not sure if ethernet is the best option, but I'm planning to add a couple hundred sensors to the site. The cable runs can get quite large (300-meter max). All sensors send data to a http-server, because of all that ethernet seems like the best option. But I'm open to alternatives.On the topic of the weight. The old system would drift up and down by about 200kg when it is windy. It's not critically important to know the exact weight, as long as it's not more than 500kg of it's fine. The way I'm planning to calculate the sensitivity and/or scale is by collecting the data for about a week. During that week, the silo would go empty and be filled by a known amount.On the topic of the hx711. I'll hook up two hx711 boards, one for each silo. The boards are only €0.50 so that isn't a problem.I've already made the dashboard and cloud backend, so I'm hoping this goes smoothly.