Yahoo Groups archive

AVR-Chat

Index last updated: 2026-04-28 22:41 UTC

Message

Re: Weigh - Scale Firmware

2007-10-09 by kernels_nz

Hi Roy, generally you don't need a particularly accurate reference,
just one that doesn't vary with time and environmental factors. All
measurement is done relative to a "calibrated test weight", so scales
are calibrated and do not rely on the accuracy of the reference.

In practice the weigh scale manufacturers are trying to look at 1.5uV
changes in strain-bridge output with a 5V reference, so unfortunately
you do require around 3 million counts or 22 bits.

At low sample rates (10 s/s) and good analogue design 22 bits is not
too hard to achieve, it's all about using the right parts for the job.

All that stuff is comparatively easy, the bit thats got me a bit
worried is migrating the code from the existing 32-bit processor to a
baby AVR. I was hoping someone had done something similar and could
give me some advice on how to do the calibration routines without
using floating point math!

Cheers
Hein B
Auckland, New Zealand. 

--- In AVR-Chat@yahoogroups.com, "Roy E. Burrage" <RBurrage@...> wrote:
>
> Is it 24 bit accuracy or 24 bit resolution?  At 24 bits, 1 part in 
> almost 17 million...where do we get a reference that accurate with a 
> reasonable cost suitable for a weigh scale product?
> 
> I suspect 12 bit accuracy would be plenty accurate for your application 
> and you wouldn't have the thermal emf problems as with 24 bits.  Just 
> throw the lower bits away after you average them into your equations.
> 
> On a regular basis here, we take data points and store them in a moving 
> average filter.  There's a very good application note both from Atmel 
> and at AVRFreaks which describes the process.  If it were me I'd use
the 
> upper 16 bits of your A/D converter, store those in 2 8 bit registers, 
> add that to the 2 registers you have already set up for your averaging 
> filter, add the overflow bit to another register set up for that 
> purpose, and then after your predetermined number of sample points take 
> an average.  It's as simple as that.
> 
> You'll also have to adjust the limits of your filter to allow for wind 
> gusts or other vibration sources so they don't drive your gizmo wild.
> 
> 
> REB
> 
> kernels_nz wrote:
> 
> >Hi there, this one is out of left field a bit (Baseball phrase ???)
> >but im working on a weigh-scale project that uses a 24-bit ADC and I
> >was just wondering whether anyone had ever written a weigh-scale
> >module for a 8-bit micro controller.
> >
> >Im just interested to see how all the calibration etc. for finding the
> >actual displayed weight from having 32 bit numbers representing the
> >Calibration Zero and Span values and the current ADC value. Is there a
> >way to do all the calculations without using floating point math? 
> >
> >Cheers for any information!
> >Hein B - Auckland, New Zealand
> >  
> >
>

Attachments

Move to quarantaine

This moves the raw source file on disk only. The archive index is not changed automatically, so you still need to run a manual refresh afterward.