We're verifying the Load Cell ADC this week in The Factory - Two episodes ago we were working on a PIO driver to read data from the ADC with a Raspberry Pi Pico. Now that the data's flowing we're testing the design holistically. As always, there's something to be learned!

Transcript

Welcome back to The Factory, the first episode of 2022.

A couple of episodes ago, Brenton was working on the Makerverse Load Cell ADC project. We were writing the PIO driver for that and just getting basically like a hello world reading out of the thing.

Now that we can actually read data off this ADC, we can finally verify the design and verify the electrical engineering. Let's do it.

So since last time we've talked about the load cell amp, we've made a lot of progress. Been putting a lot of work into minimizing the noise on the implementation we've got, and we've made a platform to weigh things on.

Taking a step back before we started measuring things in grams, we were measuring things in the raw ADC values coming out of the load cell ADC. You can see a bunch of numbers floating on the screen now. These are the raw values, which have had a zero point subtracted off.

And what you can see is the noise in the ADC. This is just the random fluctuations due to the load cell ADC. And then we've got the noise in the load cell ADC. And then the random fluctuations due to thermal noise and electrical noise and everything else in the setup we've got here. There's a non-trivial number of bits of noise.

We're going plus or minus 128 roughly. So around seven bits of noise, something like that. Now we might be thinking, well, that's terrible. We're wasting seven bits of our 24 bits, but it actually turns out not to be too bad.

I've run the numbers on this noise level that's coming out. And with the current implementation, it's got what's called an effective number of bits of about 18 bits. So in the data sheet for this device, we've got an effective number of bits specification. And for a reference voltage of five volts at 10 samples per second, it reckons 19.5 bits is about what you should be getting. Now we're getting 18, which is obviously lower than 19.5. The major reason for this is that we're using a reference voltage of only 2.5 volts, which allows us to run off a 3.3 volt microcontroller without needing a special power supply for the entire load cell assembly. However, we're losing about one bit due to the use of a 2.5 volt reference when the data sheet specifies a five volt reference. Additionally, there will be extra noise from having the load cell connected and electrical noise in the room, and we're powering it from the USB socket on a PC instead of a clean power supply.

In trying to minimize the noise seen by the load cell ADC, we started playing with the decoupling capacitor on the output of the reference. Initially, we thought 100 nanofarads would be a good place to start, since it's a value that goes everywhere and we installed it on the first prototype. However, it turned out to be complete rubbish. There was a lot of oscillation in the reference because that 100 nanofarad load capacitance actually drove the reference into oscillation.

You might be thinking, why is there oscillation when it's just a Zener diode? Well, it's not just a Zener diode - there is a Zener diode reference and an op amp inside this reference. The op amp allows for reference voltages that are different from 2.5 volts, so feedback resistors can be added to get different reference voltages such as 10 volts or 5 volts. The load capacitance can drive the op amp into oscillation, which is why we saw the oscillation in our initial testing.

If we closely examine the data sheet for our reference, we'll find its specifications for a five volt reference, which we are not currently using. Nonetheless, our measurements are still practically informative, and we continue to experiment with different ways to minimize noise and optimize performance.In this conversation, we're discussing the instability of a chip based on the plot of stability boundary conditions versus load capacitance. At 100 nanofarads load capacitance, the chip is unstable, resulting in about 100 millivolt peak to peak oscillations on the output. This creates periodic noise that goes into the input of the ADC, which is sampling extremely fast, resulting in wideband noise.

The plot shows an instability region that affects the chip, and we need to find a solution to solve the problem. The solution is either to put lots of current through the reference and waste energy or to put a large capacitance on the output or a low capacitance on the output. Numerous tests were conducted with 10 microfarad capacitors and with no capacitor at all, and the tests without the capacitor showed a slightly better outcome. When dealing with voltage references, it's essential to be careful whether you're holding a Zener diode or some more integrated device.

The problem lies in the op-amp and the Zener diode somewhere as a reference. We then delve into the actual difference in measurements with and without the capacitance, which we can see in Thonny, where we have a bunch of data coming.into the container that you want to measure the weight of, and then leave that system to settle for as long as you have got time for. Once it's fully stabilized, read the value, which now should be within a few least significant bits of the real weight.

When looking at the data and trying to measure weight, it's crucial to remove the capacitance to get a clearer reading. Comparing the output to a known reference is also necessary for converting the ADC values to a more meaningful unit of measurement, such as kilograms or grams. In this case, a water bottle was used as a weight reference since there were none in the building. The crude one data point calibration then allowed the calculation of the least significant bits per gram.

Once calibrated, the measurement system's usable resolution was approximately 0.1 grams when averaging out the noise. However, the equipment's long-term stability, affected by factors such as thermal drift and silicon aging, could become a limiting factor if trying to take a very precise measurement over weeks and months time scales. It's recommended to place the equipment in a temperature stable environment for a few hours, to ensure accurate readings, and let it settle for as long as possible before attempting to take a measurement.You want to measure on there, then take measurements for minutes or hours and then take an average. Sure, in theory, you could get a more precise measurement, but it's 0.1 grams. Like, we're not measuring dosages of medication on this thing.

At this point, I don't know if it's possible to give this number to everyone. I don't know how much variation there is between load cells and how much variation there is between ADCs. I don't want to make promises until we've got 50 load cells and 50 load cell ADCs and we can go and get some estimate of what the variability is.

So to actually test just the ADC board, I don't think we really actually need a real load cell and a calibration weight and any of that stuff. All we really need is some sort of dummy voltage divider and a bunch of measurements to see if the actual device under test has a low enough noise for it for us to be happy with it.

So in the actual test jig here, we've got our pogo pins here to plug the device under test, and we've just got a whetstone bridge, basically, just a full bridge there made out of 1K resistors. And we're just using that fake whetstone bridge as some input, some dummy input for the load cell ADC, taking a bunch of measurements and making sure that the noise on those measurements is low enough.

There we go. So this one's only saying about 15. Yeah, this one's got an oscillating reference on it. It's got an early prototype with 100 nanofarad cap, and the noise is just too big on this one.

So you have a bit of a deep dive into vetting. What is a pretty simple electrical design? But I guess that's the beauty of it is, the simpler you make it, the more reliable it can be. And so who would have thought that just removing a decoupling capacitor would actually make this design more stable? That was quite surprising for me.

If you like what we do on the factory, So we're not just building a new device, we're actually building a new device that's going to be able to do a lot of things. We're not massively exceeding the rating of this load cell. I'm going to repeatedly put 300% of rated load on that, and we're at zero. It's a one kilo load cell, but I guess they have to be overspec for shock loading and stuff, right?

As we increase the load, it's at about the same point despite not compensating for thermal drift. Looking at the design, it seems like it should matter where you put your weight on this, but it doesn't seem to. Where you put the battery on the scale doesn't matter if you put it on the left or the right side. It's counterintuitive because the bar is supported on the right side and it's holding the top plate on the left side. But these are just the design use cases for these kinds of load cells. They only bend in one axis, so it doesn't matter where you load it. The way this is drilled out and the way measurements are taken, it's always going to give you the same reading.

We reached seven kilos, and the reading seems to have a bit of positive bias, about 0.1 grams of bias in it. Even when I tried to stretch it out to minus six kilograms, it was about the same point. I'd probably snap the perspex before I got there. If you want to see something a little bit closer, let us know on the Core Electronics forums. Thanks for watching, and until next time.Still just a vertical force. Yeah, yeah. Look, this is beyond my formal training, but it does seem that it's very resistive to pure torque, for example. So putting torque on it over here or over here in the middle is not gonna change the downward force measurement. Can we try that with your water bottle?

Yeah, yes. I mean, I guess we could kind of like- It's a little bit unbalanced, but we can go from here. We've got 766 and at the other end, we've got seven, okay, it's about one gram of error. Maybe, maybe half a gram of error. I actually saw the whole thing like lift up. Look, this is getting a little bit unbalanced. If we try and put this on the left side, I'm going to, it's gonna tip over, there we go. That's 766 again, just- There you have it. And going the other way.

Yeah, it really just doesn't seem to matter where you put the weight under test. So that's literally all it takes. You just need two plates bolted to either side of this bar. You need a Z shape. Although I guess the last thing, which is probably a little bit optional, I'm just gonna try them out, would be linearity.

Like we've got this battery, we've got 21.8 grams. And if we put the drink bottle and then reset, re-zero. Just by rerunning the script? Just rerun the script. The script does a zero, you know. It's a very crude zero, single data point zero. We're engineers, not scientists. 21.6-ish, 21.7. And that drink bottle was like nearly 800 grams. Yeah, it's almost at the rating of the load cell.

That's great.

Feedback

Please continue if you would like to leave feedback for any of these topics:

  • Website features/issues
  • Content errors/improvements
  • Missing products/categories
  • Product assignments to categories
  • Search results relevance

For all other inquiries (orders status, stock levels, etc), please contact our support team for quick assistance.

Note: click continue and a draft email will be opened to edit. If you don't have an email client on your device, then send a message via the chat icon on the bottom left of our website.

Makers love reviews as much as you do, please follow this link to review the products you have purchased.