Load Cell Project

Folks, I have a project, this is for work, so if you do not want to help, please do not feel obligated!

But, I am working on a Load Cell project.

I want to run ALOT of scales off of one connection. I want to do it all as diy.

So, here is my thoughts, and I am looking right now, but with the experts we have here I thought i would run it here, maybe someone else can use the knowledge!

So one load cell, and an inventory bin attached. That load cell would somehow connect to a RS485 connector so I can i.d. and connect many scales. I have some thoughts for hardware, and am trying to piece the code together, but I am not an engineer, and it is not really working in my head.

Anyone have any thoughts? I have rs485 knowledge, but not programming wise, only use wise. How you can goto i.d. X and get value Y, but not how to go the other way and present data Z to Rs485 id X for Pc to read.

Man, I hope I did not lose you all!
Thanks.

2 Likes

@Jonathjon you may be able to use this for inventory if your sales start getting big enough!

WAIT, sorry, WHEN your sales start getting big enough!

2 Likes

O.k. so I found this.

This gets me started, i kinda like this. It addresses how to set the id’s, etc. Now I need to figure out adding the scale to the arduino and passing the weight on command.

2 Likes

Funny you tagged me. I am for sure watching this with interest! I am zero help for what you need though. I tried making weight sensors for filament spools but failed miserably at that LOL. Need to revisit it though and see if I can get them working again

1 Like

ohhhh, that would be soooo easy.

https://www.youtube.com/watch?v=3vdbRLYNyGY here is one. there are many
look up Load cell scale. I think there are even printables projects.

You know I never even thought about that. Man, I bet that could even tie into Klipper!!!

1 Like

I’m not an expert, but I dabble in microcontroller projects including a couple of load cell projects.

What do you mean by “ALOT?” A quick check indicates that RS485 is limited to 32 devices. My first thought was to use I2C for communication. It supports 127 unique slave devices.

With this communication stuff there are other hardware considerations including length of wire runs.

You might want to provide a more defined outline of your project:

  • Max number of scales

  • Distance between scales

  • Is the scaling event driven in any way?

My hobbyist thought would be to pair each scale/amplifier with an Arduino, then to use I2C to communicate to a master Arduino. From there, communication to the PC can use any protocol including wireless ones.

1 Like

The bare load cells are analog and very sensitive. So you want short wires from them to a good ADC. This one from adafruit looks like it might be just the ticket. That would transmit a digital signal to your microcontroller.

This sensor uses a two-wire protocol, similar to SPI. If you want a similar sensor but I2C, check out the NAU7802 breakout we make.

I don’t know much about the two wire protocol. But my guess is that you would have an easier time attaching each ADC to a big arduino mega with a lot of pins and then spitting out each signal separately over UART to whatever brain you want. I write software for a living. So my first attempt would be to combine them in software. Any kind of relay or multiplexer madness seems like it would be asking for trouble.

You can start with one load cell, the ADC, and an arduino to see if you can get the right numbers over rhe serial monitor through arduino IDE. Then it is a copy/paste to get 10-20, etc up and running.

What is your final goal with where that info goes and how many do you actually want?

2 Likes

This is a very good idea. It would also let you build in individual buttons for tare and calibration on each scale before combining them. Either 1x/ scale or 1 micro for 4x scales or something.

1 Like

Yeah I made them and had them working, but the temperature swing was effecting them too much. I needed to tie in a temp sensor so I could get them to scale with that but just never got around to it. Too busy with other stuff now LOL

I have them programed in ESP Home and tied into Home Assistant, never did try to bring them into klipper or anything.

1 Like

Correct, but, here is the kicker, I have a /24 network to work with. So, I can have many rs485 master/slave lines. Then Software will connect and retrieve the values of each master.

How far can i2c go? can it travel 25 feet maybe? I have NOOO experience with i2c, but I do have experience with rs485, (our vending machines use it.)

we do inventory management (here it is for expensive cutting tools) but we were bought by a company that has many, many fastener divisions. So this was an attempt at using load cells for inventory management!

I2C is meant for shorter travel. A couple of meters, not 25 feet.

You can add line level shifters to boost the signal.

But if you prefer 485, go for it. Just pair a micro with each 1-4 ADCs and have them output whatever you want.

So this is for a warehouse. I want to communicate in the end by ip address to ip addresss, goto ipv4 (192.xxx.xxx.xxx:port) and then call scale id … for a weight. Seemed simple when I started this, but now i am in the weeds.

and I know that rs485 cand exist in very electrically noisy environments and work well.

Heck, even a print farm to keep an eye on kg’s of pla could benefit from this :slight_smile: @vicious1

I am not an expert at RS485. The quick Googling I just did shows that it is a standard that allows a lot of different implementations. You can find RS485 transceivers that convert a regular UART to 485. But those aren’t going to do any IP stuff. It seems like there is a missing piece. Maybe the magic is in the PLC you are connecting to.

If you basically had that 3D printed scale, but it was also spitting out results to RS422, would this transceiver work?

You could potentially build all of this into one PCB after you have a working prototype.

do not really need it on one board, simpler the better :slight_smile:

Typically we would use a Lantronix device to connect over TCP to RS-232/485 devices.

There are some relatively cheap ones that are not Class 1 Div 2, but that depends on the number of devices you need and whether you are funding, or your company is.

We’ve used them for communication to serial only devices, as well as to add network isolation between things with a serial break to keep separation between the industrial device network and the corporate network.

We’ve used both Lantronix brand and Red Lion brand devices for things like this, but it’s been quite a few years since I’ve had to mess with them, so I don’t really know who sells what any more…

Edit: I think these were the cheapest ones we used… Maybe $100-$130 or so a piece I think back then…https://cdn.lantronix.com/wp-content/uploads/pdf/EDS1100-2100_PB_MPB-00038_RevC_Letter.pdf

Edit 2: Sorry…wrong one… I think it was this one…

Given electrically noisy environment and want for IP addressing… Are the scales mostly/all individual spaced and separated, or, are they in clusters large enough that shielded Ethernet MCUs (e.g. raspberry pi(s)), with each MCU connected to some number of scales?