For the last month I have been trying to set up a weight scale using arduino. The requirements of the project are a little off from your typical weight scale and I having some problems. I was hoping somebody here could give me some advice. First let me explain what I'm trying to accomplish.
The idea is to monitor the weight of a boat while building it, or modifying it or anything that can affect its weight or center of gravity. The support sits on top of 4 load cells with a maximum supported load of 2000kg. This load cells are your typical 2mV/V load cell with a combined error of 0.017% By measuring the weight in each cell one can find both center of gravity and total weight. For best results, the measurement should be continuous (Referring to not having to unload the cells) and measured each hour or so. The reasons for this are long to explain.
So, with this in mind I set up a system to amplify the signal and read it using a texas instrument INA126 and a 13 bit ADC (MCP3304) with the arduino. Soon, I realized that 12bit (12 plus sign) were not enough for what I needed (or so I think). The problem is that I want to measure with stability at least to 1 kg. The load cell is specified to 3000 divisions. Although 12 bits are theoretically enough, noise and other considerations kept me from getting good results. From then on I have tried a 22bits MCP3553, and a 24bits AD7714. This last one has integrated PGA which means I do not use the INA. I have also tried with a AD620 as amplifier.
After all this, the problem that I have is temperature drift. To isolate the effect of each part I borrow a fluke 715 that can generate a signal (I have also tried a voltage divider with 0.1% resistors) to see what effect I could see in the ADC. If leaved on during the day, both MCP3553 and AD7714 drift quite a bit. In fact, more than the equivalent signal for 1 kg. I have tried everything that I can think of but can not get it to work better. Supposedly, the AD7714 can be put in background calibration (which I do) so that it would eliminate offset voltage drift. I have also tried to force a calibration before each measurement without much luck.
From where I am I can only see a couple of solutions left to try:
To measure temperature (i still have to get the sensor to try it) and compensate for it.
To set up a very precise and low drift DAC with a multiplexer and feed it to the ADC to calibrate in software
Anybody knows what may be happening here? Any other solution that you can think of that would make it easier?
Any help or comment would be greatly appreciated.
That is a lot of information to process (your post not your project.) Can you make a block diagram or at least break it down into logical blocks for explanation?
Sure, I may have made the explanation more complicated that it should. I was trying to put some context.
Right now, I have simplified the problem to the maximum. I just have an arduino connected to a AD7714. The signal I'm reading is coming from a voltage divider between arduino's 5v and gnd. The divider is made with 0,1% resistors. Anyhow, both are the same so they should track well.
The problem I'm having is that I'm seeing a drift in voltage reading with temperature. I think this should not happen. I was hopping somebody could give me a clue as to why it is. Otherwise, what would the recommended solution be for this kind of system.
I have been reading about solutions for this application but none has worked.
thank you for your time.
I just have an arduino connected to a AD7714. The signal I'm reading is coming from a voltage divider between arduino's 5v and gnd. The divider is made with 0,1% resistors. Anyhow, both are the same so they should track well.
The problem I'm having is that I'm seeing a drift in voltage reading with temperature. I think this should not happen. I was hopping somebody could give me a clue as to why it is. Otherwise, what would the recommended solution be for this kind of system.
"I think this should not happen."
So you feel the arduino's +5vdc driving your voltage divider is a stable instrumentation quality voltage source, and does not have temperature caused variation? It's only as good as your PC's +5vdc power supply specs or the on-board +5vdc regulator if your powering your board via it's external power connector. Also the .1% resistors will have specs showing their stablity Vs temperature. The data sheet for your AD7714 should provide specs on the quality of it's internal reference voltage. Anything you measure to try and determine the overal quality of your A/D system has to match the reference accuracy or better.
A nice objective to have in a instrumentation quality measurement, is to have the sensor being measured the limiting factor in the whole measurement system. Only by researching the complete chain used to measure the value can you determine if that is the case for your system.
A rule of thumb in a commercial calibration lab is that your measurement equipment and reference sources should be 10X more accurate then the equipment being calibrated. That plus the traceable calibration documentation provided is why such calibration services charge what they do for their services.
I have found these in load cell measuring service where I work. They operate well over a wide temperature range. If you look the site over I think you will find a recommended set-up for your general application.
I agree with lefty. I recommend you invest a few bucks in a really temperature stable voltage reference chip from AD or maybe LTC. I've used the AD REF19X references, for example, in designs that needed self-calibration capabilities. These chips can be purchased in 12-bit accurate over temperature versions. That way, you'll know where the error is coming from.
For a really accurate ADC, you could take a look at this thread:
It has enough dynamic range that in some applications, no signal amplification is needed. Just a suggestion.
Thank you guys for the answers, I'll take a look at those.
Right now I'm just trying to identify what should I used for the ADC since it is giving me more temperature error than the sensor.
Anyhow, I know the reference of the arduino is not a stable voltage source. However, from what I read it should not matter much if the application is ratiometric. At this point I'm not worried about noise, I'm just checking temperature stability. If the source drifts with temperature so will the reference of the ADC (or at least that is what I understood).
I have also used a fluke 715 to generate the signal with the same results (it was calibrated just weeks ago so it is working well) but I do not have access to it everyday. Besides, the way I see it (and I may be wrong) is that if I use a voltage source that is really stable but our power source from the arduino is not, therefore we are putting another variable in. That is why I'm using a divider now. The whole system should be ratiometric with respect to arduino's voltage. Creating a ratiometric system is what most of the articles that I read recommended.
Another thing that I'm doing is inverting the polarity of the divider (or the bridge when I use it), reading both values and averaging. I thought that would take care of any mismatch between the resistors of the divider.
I'm not against using a stable reference, it is just that I do not have one handy. I would also like to kept the system ratiometric so I would have to power the ADC and load cell from that reference and I don't know how easy that is without too much drop or loss of stability.
Well, I'm going to research your suggestions, thank you for your time guys.
Precision force sensors also behave as microphones, seismometers and thermometers.
To measure one parameter you have to eliminate the effect of the others.
Presumably a 2000kg boat is quite large and assuming you are in a typical workshop environment you are quite likely to be measuring the wind loading effects of air currents due to convection, drafts and air conditioning fans.
If the workshop environment is noisy, parts of the boat are quite possibly resonating at low frequencies giving strange weight variations that only go away if you average readings over many seconds.
Are your load cells really accurate to 1 part in 3000 over a period of several days, or only over a a few minutes? Does the spec even mention time at all?
Yes it does. It has an yielding error of 0,016%.
The problem that I have is that the error I'm seeing with temperature is much larger than that.
In reality I'm not trying to get down to 3000 divisions, I would like to have a 1 kg resolution which would be 2000. Being about 11 bits I thought it could be achievable with errors considered.
Right now I'm not even plugging in the load cell but just simulating it by using precision resistors.
If you look at the link I posted above, you'll see an example of a totally ratiometric system with the ADC and sensor powered from a precision reference chip. I used that circuit as part of a temperature compensated strain gauge pressure transducer conditioning system. It is similar to what you are describing. It might give you some ideas.
I read that and also the document on bridge transducers from ltc.
It has in fact given me some ideas. There are some really cool solutions in the LTC document for saving energy (which I would like to do at some point).
So, it seems that I should go the route of putting a reference in the system. What worries me sourcing enough current for the load cell from it. Since the load cell has 350 ohms resistance I would need (assuming I'm using ref196) about 10mA. With that current like that (if I'm reading the data sheet correctly) I would have a dropout of 0.8V. Excuse my lack of knowledge but I have never used one of this. Does this mean that it would have a Vout of 2.5 but with equal stability properties as with no load? That would actually be great.
Other way that I see is to limit the current to the cell in the same manner as in your circuit. What I do not like about that is that it reduces the signal to noise ratio proportionally. Of course, there is no free meal.
Other solution would be to power the bridge from a buffering amplifier taking the reference as signal. But, would it introduce also drifts and error from that amplifier. Maybe they would not affect much if the application is ratiometric.
Sorry about the rambling but I have the feeling that I know enough about electronics to get into trouble but not enough to get out of it or to make educated decisions on trade offs.
Having a stable reference I was wondering if it would be possible to use a DAC to simulate the signal from the cell. The reason to do this is that the ADC7714 has a nice feature that allows it to calibrate the whole system not just itself. This means that I can correct offset and gain if I can give it a shorted input and a full load input. I could do this by using a multiplexer in the input and simulate the full load with the DAC.
Am I getting in too deep? Should I just try to measure temperature and correct from it in software? Any comment is very much appreciated.
The dropout voltage referenced on the data sheet refers to the difference between the supply and the reference output. So, you would have to supply a minimum of 4.1V if your load consumes 10 mA. You can boost the output current without affecting the accuracy with a series pass transistor. Check AD's app notes for the circuit. I did the same in the early days when all strain gauges were 350 Ohms.
I used a self calibration technique like you are describing in an early system design. I used a MUX to switch between ground and a voltage that gave full-scale at the output of the instrumentation amplifier. Instead of a DAC I used a 3-resistor divider to get a differential voltage to feed into the instrumentation amplifier. The two outer resistors were 350 Ohms to match the source impedance of the strain gauge. The middle resistor was calculated to match the output of the strain gauge at full load. Any deviation from zero volts at ground was taken care of in software and the actual gain of the INA was calculated during the calibration routine. All one had to do in manufacturing was measure the voltage from the calibration resistive divider and write the value into EPROM.
Since strain gauges can have an initial zero offset, I measured that and wrote an equal and opposite value into a precision DAC which was then fed ito the reference of the INA to cancel the offset. This was done along with the calibration routine just prior to each use so it accurately canceled out any system drift from time and temperature. So, long story short, what you are describing is quite feasible.
I was reading about references and I found out that, as you say, I was interpreting the data sheet wrongly.
In this case, the dropout on the regulated voltage that is caused by the load is 15ppm/mA. This is just about 1mV difference in the regulation. That will not matter much in the signal/noise relation. It seems that I could run the cell directly from the regulator. Is that 1mV drop stable?
If you do not mind, could you point me at the AD notes you are talking about? I tried to find some reference but there are so many. Or do you mean the ones in the data sheet?
Thanks for all the help. It is good to at least know what pieces I have left to get to make it work.
You can buy those parts with temperature coefficients as good as 2ppm/degree C. I think that is the spec that comes into play here since your load will be fairly stable. The data sheet has an application circuit to boost the output current to about 150 mA. You can leave out the short circuit protection if you're confident that you'll never short it out. At any rate the device is internally limited to around 40 mA and all the external circuitry protects is the series pass transistor.
In all of the discussion I saw a mention of current requirements. I am not sure if it is still an issue for you but, here is an idea about that.
With the 8 amplifiers I mentioned with the link, our equipment has 8 load cells. To excite the cells a pulsing system is used. At 50Hz each cell is excited with a pulse and the output is measured one at a time. Therefore, at any one moment only one load cell is powered and measured. I believe the amplifier is powered all of the time but, the output is only measured when the pulse is sent to the corresponding cell.
The advantages are less cell heating and lower power requirement and I have read better noise rejection.
What I was doing was using a switch to turn each of the cells on one at a time. That part worked well, what I had problems with was drift. In this application the difference in time of measurement between the cells is not an issue.