Page 1 of 1

Weight measuring (5kg) with Raspberry Pi, MCP3008

Posted: Fri Feb 07, 2014 5:50 pm
by xtrasns
I wasn't able to find here any projects on measuring weight, so i thought i'd post my own idea and will see what you can suggest.

for the sensor i found this - ... AZDOWP300U

from the description i understood that it takes 5-10V in (that's how I understand "excitation voltage"), and what it puts out deepens on the weight. I also think that the output is analog, so I decided to buy ... UCHGRDBQ0Z (I know you can get it cheaper, but i will have ai all shipped to me at once from amazon, and i don't have to pay extra for shipping if I order for more than $35) here are the specs on it - ... 21295d.pdf

Now, are is the questions.

1. wiring. it should be pretty straight forward (in-out), or does it have to be a more complicated wiring ?
2. coding. I guess I would have install the SPI libraries for GPIO, and write some extra code. Any code samples here on how i would interface that SPI GPIO library ? Maybe somebody has done something like this before, would you share the code.

Thank you in advance for answering my questions.

Re: Weight measuring (5kg) with Raspberry Pi, MCP3008

Posted: Sat Feb 08, 2014 10:31 am
by Paul Moir
No, that won't work. The excitation voltage is 5-10v but the output from a load cell is typically very low. Like a few millivolts low. Note below it has a rating of around 1mv/v; that means that with 10v of excitation and with 5kg sitting on it, you get a whopping 10mv out. And I presume you want to get a little resolution out of your ADC on top of that!

So you need a very low noise amplifier with next to no drift and you really want a decently precise excitation voltage to go with. Fortunately you can get these baked into a chip for you already. Google "load cell adc" to see the popular ones. A bunch of these are generically 24 bit ADCs, but if you look into the details you're not going to get nearly that resolution. Between span and noise, you loose a lot.

Also, if you go this route you'll find that scales do a lot of internal processing to cope with thermal drift of the load cell itself. "Zero" tracking (drift identifying and cancellation) is a big thing.

I went for the AD7192, and even got the IIO kernel subsystem working with it on a Pi, but it was a lot of work and I really wouldn't recommend it. If you want to skip the whole ordeal, find a usb or serial load cell interface.

Re: Weight measuring (5kg) with Raspberry Pi, MCP3008

Posted: Sun Feb 09, 2014 1:36 am
by xtrasns
Thank you, Paul. I found this - ... UTF8&psc=1

based on the description here - ... rid=229466 is has serial interface and an amplifier. Looks good to me. Don't see ZERO tracking on it though ...

What can you say about this module ?

Re: Weight measuring (5kg) with Raspberry Pi, MCP3008

Posted: Tue Feb 11, 2014 1:05 am
by Paul Moir
That's more like it. That is an A/D converter and not a scale as such, therefore you'll have to code the scale functions yourself.

Note that with the gain at 128, it's +-20mV full scale with a 5v supply. Since you're only getting 1mV/V you only get 0-5mV out of it with a 5V supply. So the maximum range you get is 5/40 = 1/8th of the 24 bit ADC, so now you're down to 21 bits of data. The bottom range bits will get buried in noise, so say you'll loose 6 bits there. That leaves 15 bits which gives you a real good count range.

However, the way that one is wired up the AVdd is derived from a regulator from the digital side. And you'll likely want to power the digital side at 3.3v to make it Pi compatible. That leaves 3.3v-regulator drop (say 0.8v) left for the analog side, or a measly 2.5v. So there goes another bit of range and you're down to 14. If you want to get it back, power the bridge with an independent 5v supply and don't use the built in regulator (tied to E+ on that board by the looks of it). To disable the internal regulator you'd have to remove Q2 and probably the resistor next to it. You might be OK with 14 bits though.

Here's the datasheet, which ain't exactly great but it is OK. Looks like they implemented the "typical application": ... nglish.pdf

And here's a great resource when going from an ADC to a scale: ... scale.html

Re: Weight measuring (5kg) with Raspberry Pi, MCP3008

Posted: Thu Feb 13, 2014 1:58 am
by xtrasns
thank you very much for an explanation. I understand now that it's very hard to take all of this into consideration when I don't know all this stuff. I shell look for another one in this case.

Re: Weight measuring (5kg) with Raspberry Pi, MCP3008

Posted: Tue Feb 18, 2014 10:32 pm
by xtrasns
I think i found out how to make it easier for me. I will buy another sensor and this ADC - It might be way easier since it has unix driver.

Now, here is the question - does it use proprietary chips, or can I just put togather the same thing using the same chips. 90$ for a board sounds like a lot. If you have an answer, please share. thank you !!!!