DIY analytical balance ( weight scale ) - Page 1
Forum section: electronics / projects

author: joey120373
author_rank: Newbie
timestamp: March 05, 2016, 05:28:27 am
content: Hello to the best electronics forum in the world!I am a hobby level electronics guy but i absolutely love surfing this forum, it has cost me many many hours of sleep but well worth it.I want to build an "analytical" class balance and before i start spending lots of time and money on development i thought it best to float my ideas here first and hopefully avoid a lot of headaches.Most "inexpencive" analytical class scales have a resolution of .0001 grams, a repeat ability of .0002 grams and a full scale capacity around 60-100 grams.This leads me to believe that most have a resolution of 20 bits give or take.from what i have found, most of these scales use an electro-magnet to balance the scale, very similar, if not identical in principal to the watt balance ( or lego watt balance, google it, its worth it ).The balance i want to build doesn't need to have 20 bits of dynamic range, I don't need to measure up to 100 grams,20-25 grams is plenty, though i would still need a resolution of <= .0001 grams, and a repeat ability <= .0002 grams. In theory, putting the daunting mechanical aspects aside for now, a true 18 bit system should fit my design criteria. However, it would be great to have some overhead.....I have 2 ideas in mind, both involve a very good voltage reference, either an lm399 or an LTC6655 as the basis for the system.The first would simply involve a high quality, and $$$ DAC, and a high quality temp sensor for the magnet coil. As current passes through the coil it will heat up, and its resistance will change, so the control system will need to take into account not only the DAC voltage, but also the temp of the magnet to calculate current through the coil, and thereby calculate the weight on the scale.My thoughts are that this design is probably not that great, as there are going to be more than just these 2 variables to take into account, i.e. long term drift, system temp, ambient temp, moon phase etc. And calibrating for all of these will most likely be a nightmare.This leads me to my second theoretical design heavily influenced by Application Note 86, (Thanks to Jim Williams and friends ).Current through the magnet coil will be measured by an ADC ( LTC2400 for example )via a high quality extremely low TCR resistor in series with the magnet. Since, correct me if i am wrong here, the magnetic force is directly proportional to the current, deviation in the resistance if the coil wont matter. The voltage applied will have to compensate for this, but there should be a direct relationship between weight and current required to balance it.The system used to generate this voltage is where i'm still waffling a bit. J Williams used 2 fairly expensive DACs, summed, to achieve both resolution and stability when used in conjunction with a good (and fairly cheep) ADC, the previously mentioned LTC2400.Those DACs, or any modern 18+ bit single DAC with similar specs are quite expensive. So i am wondering, since the only really critical aspect of my scale control system is the Vref, current sense resistor and the ADC, could i get by with a much cheaper 20+ bit DAC, or summed 12-16 bit DACs ?I don't need absolute accuracy, or "long term" stability, as the scale as a system is constantly calibrated to a standard weight. All that really matters is drift and noise. If the total system drift can be <= 1-3ppm per ~24 hour period, and i am thinking that my choice of vref, resistor and ADC can easily hit this mark, then my concern is how much noise and drift is acceptable on the DAC stage?The software will necessarily be constantly adjusting the DACs output to achieve balance ( based on feedback from a high resolution positioning sensor, but that is a topic for another thread ) and compensate for varying resistance in the coil. However, I'm wondering, if the DAC itself is not stable or is generally too noisy, then will the loop will be inherently unstable?With the BOM for this design is already quite expensive; LM399, half a dozen or so high quality resistors, a handful of moderately expensive op-amps and a $12 DAC, I would rather not have to spend $50-$60+ on a DAC..Any thoughts, input or critiques are greatly apriciated.Joe

author: joey120373
author_rank: Newbie
timestamp: March 05, 2016, 09:44:22 am
content: Thanks for the quick reply! QuoteYes, absolutely, I should have mentioned that. First off, as this will be a precision device, it will live on a bench in a fairly controlled environment. The prototype/dev board i am designing is borrowing heavily from the 399Ah thread on this forum, the board has the 399 mounted with large cut outs so that it is somewhat isolated from board flext and also to minimize thermal loss. I also plan to further insulate the 399 with foam and an enclosure. As far as controlling humidity.... I would love to do that,but how ? I ultimately envision a somewhat sealed aluminum enclosure that would allow some level of thermal control, i am even entertaining the thought of a heater system that would keep the cavity holding the electronics at a constant set point, say 80-85F. Just like high end multi-meters, high end scales require some warm up time, i am guessing this is to let the voltage reference to warm up and the overall system to and stabilize. So why not add a fairly simple heating system that maintains a set temp for everything, not just the Vref? But how does one controll humidity? Desiccant will degrade over time, Maybe completelly seal the enclosure and fill it with an inert gas?" If your coil will not be 'air' cored but will have ferromagnetic core.... "My plan is to use an air core, I have done some "quick and dirty" bench testing. I already have an analytical balance, with specs similar to what i indicated in the original post. I tore apart a faulty 24v relay and pulled the metal core out of the coil.What i was left with was a coil wound around a plastic bobbin. I set a small magnet on the tray of my scale and mounted the coil over it in such a way that the magnet was centered in the coil, but the coil was supported outside the measuring tray. I powered up the coil and was able to measure the force generated on the scale. Dont have the numbers in fron of me, but with that ~350 ohm coil i was able to generate a usable force (around 3 to 4 grams, if memory serves me correctly ) with only ~10ma current. In every similar scale i have looked at or studied online, there is a large mechanical multiplication ( a lever ) that multiplies the magnetic force, my design will be no different. I think this is to reduce the current, and heating of the coil. So magnetic force will only need to be, probably, 1/10 - 1/20 of the maximum weight to be measured ."Actually in a really crude "analog" implementation you might not even need a MCU in the DAC/ADC feedback loop, if you had something like a (semi-)analog loop closed around the movement so that it adjusted the current to stay balanced with some damping to stabilize it at the balance point (say PIDish) and then you could just ADC sample the current once stability was achieved. I can't think of a good reason to do that other than to maybe save cost on the DAC but DSPDM would do that and still preserve digital control."Yes, I have been thinking the same thing since i started planning this project...for sake of argument.. If the level position sensor was strictly analog, and at the null ( or level ) position out put ~0v, but any deviation from level would rapidly swing to a positive or negative voltage ( i have another scale that does exactly this ) that signal could be fed back as part of an op-amp control loop. This would indeed greatly simplify things, but I think tuning that loop to avoid oscillations and overshoot would be no small task.... A PID loop, weather software or analog will almost surely be required for best performance. Im pretty much a novice at op amp stuff, i got my head wrapped around basic buffer, amplifier and summing circuits etc . But to me implementing a PID loop in software seems a whole lot easier than designing one using opamps...

author: Kleinstein
author_rank: Super Contributor
timestamp: March 05, 2016, 10:30:14 am
content: Using a µC and DAC for the control loop is a good idea, as the mechanical system will vary with load. So you may end up with something more complicated than a simple fixed PID, e.g. using the measured load to adjust the PID settings. With a mechanical well damped system, you can also just use a more simple PI regulator and thus analog circuitry.As the current is set by the control loop, the DAC does not need to be low drift or highly linear. So audio grade DACs should be OK. If some glitches are acceptable one could even get away with two ADCs combined as coarse and fine. Also as the system will be rather slow also a PWM type DAC (or 1st order sigma delta) is an option.Still measuring the current with true 18 bit accuracy / stability is difficult, if you compare this to typical 6.5 Digit DMMs - the current specifications are usually not that good. There also is the question of the stability of the fixed magnet / core : magnetic materials are also temperature sensitive an can show drift / hysteresis. The heat from the magnet also make things complicated.

author: AndyC_772
author_rank: Super Contributor
timestamp: March 05, 2016, 10:40:12 am
content: Measuring current is one problem, but how will you actually detect the point of balance with the same degree of repeatability? How does your control loop know that the current in the coil at any given time is the "right" current?

author: joey120373
author_rank: Newbie
timestamp: March 05, 2016, 02:48:00 pm
content: Measuring current is one problem, but how will you actually detect the point of balance with the same degree of repeatability? How does your control loop know that the current in the coil at any given time is the "right" current?Good question. there will be some form of non contact sensing at the extreme end of the lever that the magnet is pulling on.Exactly what this sensor will look like i don't know yet. Possibly an IR LED on one side of the arm and 2 IR photo transistors (one atop the other) . A small hole would allow IR light to pass through the arm and act on the two photo transistors.At the balance point, both transistors would put out equal voltage, however as the arm deviates from the balance point, one transistor will get more IR light than the other as the hole in the arm moves closer to to the respective photo transistors center line. which photo transistor that would be will depend on weather the arm is above or below the balance point.feeding the ouputs of both photo transistors into a diferential opamp with a fairly high gain, that way even the slightest deviation from balance, where both voltages are equal, would cause the opamp to swing to one rail or the other.lots of variables with this design, IR distance from Photo transistors, photo transistors distance from each other, hole size in arm...I just need to build up a jig to test the theory...

author: Kleinstein
author_rank: Super Contributor
timestamp: March 05, 2016, 07:46:27 pm
content: Position detection is one of the more simpler parts, especially if the mechanical system is rather compliant. Such a simple optical system can give better than µm resolution. Though some simple optics might be needed. The difficult part are more getting a stable stationary field and stable current measurement.For the stationary field one could use the trick some old high end speaks used: the current driving the coil is also used to support the permanent magnet, so that a current though the coil will not weaken the permanent field.

author: joeqsmith
author_rank: Super Contributor
timestamp: March 05, 2016, 11:56:32 pm
content: I'm interested in reading how far you get with this project. I had a Sartorius apart and the machining was a work of art.

author: sarepairman2
author_rank: Frequent Contributor
timestamp: March 06, 2016, 12:13:13 am
content: this is a question of mechanics not electronics imo.look at an old mettler scale.

author: PointyOintment
author_rank: Frequent Contributor
timestamp: March 06, 2016, 07:10:36 am
content: You will probably find Ben Krasnow's microbalance interesting: