Welcome! Log In Create A New Profile

Advanced

Adding a weight scale / load cell to the printer bed!!

Posted by Simba 
Adding a weight scale / load cell to the printer bed!!
October 15, 2012 03:58PM
So, I want to verify the weight of the part as it is being built (for the sake of doing it, but also to monitor density of novel polymers).

Do do this, I took apart a kitchen scale and got the load cell. I wired it up to a OPAMP ina2126PA-ND (digikey).
I also got some backup cheap loadcells from amazon ($10 for .1 and .01 sensitivity)

I am successfully reading the signal, it is linear, and amplified towards 3 volts. Now comes the issue.

I have to average over 500,000 reads (several seconds to minutes) to get a stable enough reading to measure about 0.1 grams. Its just too slow, and not good enough over 10 or even 100 averaged reads.

Are any of the following problems here?
  1. resonance between the opamp and load cell? Add a capacitor?
  2. inherent poor performance in the load cell (it was designed for 1g accuracy and 5000g max weight)
  3. are there alternate weighting solutions that would work?
  4. how can you improve the read rates/averaging ?
  5. is there anything fundamentally different about a .01g sensitivity load cell as a 1g one? I think it is just the opamp configuration.

Thanks in advance,
Yours truly,
"The Clueless"

Edited 1 time(s). Last edit at 10/15/2012 03:58PM by Simba.
Re: Adding a weight scale / load cell to the printer bed!!
October 15, 2012 06:12PM
You try to measure the weight while printing? I don't think this is possible, acceleration forces are a lot higher than these few grams of plastics and they're not precisely in horizontal direction at all. You'd have to at least stop the printer while weighting.


Generation 7 Electronics Teacup Firmware RepRap DIY
     
Re: Adding a weight scale / load cell to the printer bed!!
October 23, 2012 07:53PM
Aside from artifacts of motion, this is a prime environment for electrical noise. Are you using shielded cable with the shield grounded at one end only? A low-pass filter? Most load-cell type devices use a bridge circuit configuration. Is the bridge built into your load cell?

Those are just starting-condition questions but they are all important.
Re: Adding a weight scale / load cell to the printer bed!!
October 23, 2012 08:26PM
These are certainly points of detail I would consider once the method is proven. Sometimes its good to just "do that damn experiment." I'm going to do it, but yes the bridge is built into the loadcell.

I had to make an op amp from scratch. The signal comes in at 4.9mV accuracy with Arduino in theory but I haven't implemented that yet. What it means though is about 0.01 g = 3.3 mV. So I can reliable measure something, maybe a few lines at a time. Unfortunately, the scale maxes out around 120g.

My math says 1.75mm*1.75mm*pi/4*1000mm to mL = 2.4. Assuming a PLA density of 1.2, this gives 2.9 grams / meter of filament.

A single layer of a one inch cube at 0.25 mm would be .25 mm * 25.4mm * 25.4mm to mL = .161 mL * 1.2g/mL PLA = .19 gram.

Therefore, a single layer will be detectible as about 12.5 "ticks" or binary increments of weight, measured absolute. However, averaged, it could be much more accurate. Nevertheless, it should give you the ability to "calbriate" nozzle flow over a few layer, faster than printing a whole part. This also allows you to measure for error and sudden changes (like the printer printing over nothing would give globs that suddenly have bursts of weight, that could result in an error mode and shutoff).
Re: Adding a weight scale / load cell to the printer bed!!
November 06, 2012 01:55PM
hmmm this would work on a fixed heater bed design wun it? ... interesting ... a mass detection system tied to the extruder ...
Re: Adding a weight scale / load cell to the printer bed!!
November 06, 2012 04:03PM
I agree that it is most likely noise in your circuit, but you can use magical 50 Ohm Monster Cable coax all you want and it wont make much of a defference.

First of all, you picked the proper amp for the application. How ever what are you powering it with? If is it the same power supply as the Arduino and in turn the same power supply as the motors, then you are introducing noise from the motor controllers. Plus what are you using as the analog reference for the ADC in the AVR. Using the internal band gap refference will help but if you are using the AREF pin on the Arduino, that would be another source of noise.

Some easy improvements you can make are:

Move the amp circtuit as close to the load cell as posible. Shorter wires are not as good of an antenna than long ones at the frequencies the noise is likely to be. Also the small signal output of the load cell has a smaller dynamic range compared to the amplified signal, you don't want to amplify noise.

Twist the wires from the cell to the amp. Twisted wires have better EM-field coupling and will reject noise better.

Use bypass caps on the amp in accending order from the power pin: 0.01 uF, 0.1 uF, 1 uF, 4.7uF/10uF

Power the amp from a battery.

Twist the amplified signal wires for the same reason as the small one.

COMMON GROUND, COMMON GROUND, COMMON GROUND!!!!!!
I can't say that enough. I have seen so many projects go all kinds of wierd because the grounds between all the components weren't connected well, let alone at all. Use THICK wires for the grounds, this is the return path for your current and they will carry just as much as your power lines. The thicker the lines the lower the impedance and the less voltage drop accross them.

In order to minimize the noise the most I would make a new circuit with the same amp and connect it to the load cell with the shortest twisted wires I can. Then I would connect the amp to a Sigma-Delta 24-bit SPI ADC connected to a high pressition voltage refference powered from a battery. This whole thing would be mounted to a at minimum two layer circuit board with a solid ground plane and the whole thing would be covered with an RF sheild. Then I would run the DIGITAL lines the long way to the Arduino.

Good luck
Re: Adding a weight scale / load cell to the printer bed!!
November 06, 2012 05:01PM
RESULTS:

I was able to build a load-cell arduino combination that works. Specifically, a loadcell from a 5000g kitchen scale with 1g accuracy, you could in theory weigh about 0.3g. However, the error of drift was SO large over time that I could not interpolate using RAMPS as a power supply for the chip.

KEYS to success: DO NOT use the arudino to power the loadcell and amplifier. IT results in feedback. Instead, get a 10-20V external isolated power supply. I connected it to the INA128 amplifier and then connected the output to analogin and the ground of the IC to the arduino ground - weird setup but it worked. Without it, drift was 3 grams. With, about 0.3g. The assumption here is that the power coming out the INA circuit is very small, sufficient that it grounds to the arudino (a larger power sink) so that the ground of the IC is forced to follow the ground of the arduino.

Anyone looking to do this in the future should buy a 100g scale with .01g accuracy. That will work better (and i rarely have a print over 1 oz plastic used).
I was not able to secure a load cell -
Re: Adding a weight scale / load cell to the printer bed!!
November 23, 2012 11:58AM
wow thats cool.

FYI i bought a 2000g china made scale for abt USD8. but im no where near to executing mods.

Simba Wrote:
-------------------------------------------------------
> RESULTS:
>
> I was able to build a load-cell arduino
> combination that works. Specifically, a loadcell
> from a 5000g kitchen scale with 1g accuracy, you
> could in theory weigh about 0.3g. However, the
> error of drift was SO large over time that I could
> not interpolate using RAMPS as a power supply for
> the chip.
>
> KEYS to success: DO NOT use the arudino to power
> the loadcell and amplifier. IT results in
> feedback. Instead, get a 10-20V external isolated
> power supply. I connected it to the INA128
> amplifier and then connected the output to
> analogin and the ground of the IC to the arduino
> ground - weird setup but it worked. Without it,
> drift was 3 grams. With, about 0.3g. The
> assumption here is that the power coming out the
> INA circuit is very small, sufficient that it
> grounds to the arudino (a larger power sink) so
> that the ground of the IC is forced to follow the
> ground of the arduino.
>
> Anyone looking to do this in the future should buy
> a 100g scale with .01g accuracy. That will work
> better (and i rarely have a print over 1 oz
> plastic used).
> I was not able to secure a load cell -
Re: Adding a weight scale / load cell to the printer bed!!
November 29, 2012 10:22PM
WiESELMan Wrote:
-------------------------------------------------------
> I agree that it is most likely noise in your
> circuit, but you can use magical 50 Ohm Monster
> Cable coax all you want and it wont make much of a
> defference.
>
> First of all, you picked the proper amp for the
> application. How ever what are you powering it
> with? If is it the same power supply as the
> Arduino and in turn the same power supply as the
> motors, then you are introducing noise from the
> motor controllers. Plus what are you using as the
> analog reference for the ADC in the AVR. Using the
> internal band gap refference will help but if you
> are using the AREF pin on the Arduino, that would
> be another source of noise.
>
> Some easy improvements you can make are:
>
> Move the amp circtuit as close to the load cell as
> posible. Shorter wires are not as good of an
> antenna than long ones at the frequencies the
> noise is likely to be. Also the small signal
> output of the load cell has a smaller dynamic
> range compared to the amplified signal, you don't
> want to amplify noise.
>
> Twist the wires from the cell to the amp. Twisted
> wires have better EM-field coupling and will
> reject noise better.
>
> Use bypass caps on the amp in accending order from
> the power pin: 0.01 uF, 0.1 uF, 1 uF, 4.7uF/10uF
>
> Power the amp from a battery.
>
> Twist the amplified signal wires for the same
> reason as the small one.
>
> COMMON GROUND, COMMON GROUND, COMMON GROUND!!!!!!
> I can't say that enough. I have seen so many
> projects go all kinds of wierd because the grounds
> between all the components weren't connected well,
> let alone at all. Use THICK wires for the grounds,
> this is the return path for your current and they
> will carry just as much as your power lines. The
> thicker the lines the lower the impedance and the
> less voltage drop accross them.
>
> In order to minimize the noise the most I would
> make a new circuit with the same amp and connect
> it to the load cell with the shortest twisted
> wires I can. Then I would connect the amp to a
> Sigma-Delta 24-bit SPI ADC connected to a high
> pressition voltage refference powered from a
> battery. This whole thing would be mounted to a at
> minimum two layer circuit board with a solid
> ground plane and the whole thing would be covered
> with an RF sheild. Then I would run the DIGITAL
> lines the long way to the Arduino.
>
> Good luck

This is fantastic advice btw. We are using a 12VDC isolation powersupply now, and connected the ground of the amplifier output to the ground of the arudino. That was the most stabilizing factor. However, a multimeter measures the voltage as consistent to sub mV levels, whereas arudino still bounces around 1-10 mV. I think it is noise and we will try adding a low-pass to the output. Would you suggest anything else?

Thanks.
Sorry, only registered users may post in this forum.

Click here to login