11 load cell project

I am an Arduino newbie. We had some help getting going but it was too much for the guy to handle. Now I am trying to pick up the pieces.

Here’s the project.

I need 11 scales connected to an arduino to weigh each load. It needs to then find the smallest combination of scales which is as close to the target weight without going under. Once it has calculated the averages and has the answer, I need LED lights to change from yellow to green to indicate which ones.

Ideally, if any scale has a weight of under a certain tiny amount (.25 ounces or less) that scale will tare again. Possibly the tare could be triggered by a button.

We are using 0.78 Kg Micro Load Cells, HX711 load cell amplifiers, SPLixel Single RGB LEDs and the guy who tried to figure this out was using sippinos to connect them to a prototino.

I have a lot of questions.

  1. Is there a better way to connect these to a larger Arduino, skipping the Sippinos. I am wondering if using a larger board like an Arduino Mega 2560 would mean I could connect all 11 to the digital inputs, along with 11 LEDs.

  2. I have read through the following thread

and wonder if any Arduino can handle all those readings without slowing down too much. I may just have to connect them all one after the other to find out, but if anyone has tried and has found a limit to the number of load cells, that information could save me a lot of time and money.

  1. I am hopefully going to have everything set up to test in the next day or so, and this is the sketch he gave me that works. It only has 5 cells so far, but adding the others should be straightforward. I hope. Any feedback is appreciated.

  2. While the 5 cells are reading, only the 1st will tare. Not sure why!

I have attached the sketch we are using so far.

Thanks in advance. I’m new to this but enthusiastic! Please don’t assume I know too much.

loadcell_jul24.ino (2.03 KB)

Have you tried to use a single, common clock line?
Regarding speed - the bottleneck most probably isn't arduino, is the limit in HX711 that it can take either 10 or 80 readings/second.

If you look deep under the skirt of HX711's libs, you might find a way to read all scales at the same time using a common clock and sending commands/ receiving data simultaneously.

Regarding blinking many leds and reading many buttons.. dig into the "Controlling multiple inputs and outputs" section into this forum, find out what you can do with shift registers, multiplexers and other specialized circuits.

Thank you! I will read up on them now. Reading them all at the same time would be ideal.

AFAIR you can send a trigger to every scale, so that they take a new value, then wait for the completion flag and read the result back. But in free running mode you always should get the last conversion value, regardless of when you request it. I'd get multiple readings from every scale, and calculate an average. In this case you have to wait for the conversion complete flag, else you get the same value over and over again.

If you watch my YouTube videos for beginners, #31 & 32 "Load Cell" then you may get some ideas - of course, this is for a single Load Cell but as self-proclaimed newbies I would get one working (even if just on a breadboard) before trying several with the additional logic required.

It's not that hard but then everything is so much easier when you know how. That's why I have these videos :slight_smile:

URL in the footer of this post.

DrDiettrich:
AFAIR you can send a trigger to every scale, so that they take a new value, then wait for the completion flag and read the result back. But in free running mode you always should get the last conversion value, regardless of when you request it. I'd get multiple readings from every scale, and calculate an average. In this case you have to wait for the conversion complete flag, else you get the same value over and over again.

This sounds like a great idea to get a more accurate reading. Do you think it will slow it down a good deal? I wonder how many readings will be ideal. I will see if I can get that running and then see how long various retakes take and make a decision.

The only slowdown is caused by the conversion time, times the number of samples for the average. If you have one ADC for each scale, they can measure in parallel, not adding any further slowdown.

What’s the timing you want to achieve with your project?