Filtering circuit for analog load cell signal

Thread Starter

Open Placer

Joined Dec 14, 2018
5
Hi all.

I am designing a data acquisition system that consists of an analog load cell (500-4500 mV output), incremental quadrature encoder, and an STM32 MCU. While trying to get a meaningful results of the acquired signal data, I have encountered some noise problems. There's some distance (about 2 meters) between load cell and the MCU so right now there's a voltage to current (4-20 mA) converter. Just before applying the signal to the analog pin of MCU, I've also implemented a basic RC filter and it did help a bit but there's still significant amount of noise.

What would be the best way to determine the peak point of applied force from the acquired signal with a digital or analog filter? There are some sample data below. Area marked in yellow is the approximately peak location, it's mostly reproducible on different conditions (adjusting RPM, force, etc.) but as you can already see noise is really high and it renders the data harder to process.

300-2.png 300-3.png tum-turlar-sinus-yok.png 700_tur1_2.png
tum-sinus.png
1000-tum_2.png
 

Attachments

ericgibbs

Joined Jan 29, 2010
8,876
hi Open P,
Welcome to AAC.
That is a noisy signal.
Is the load cell sensor a semiconductor type.?
Why is a 4-20mA converter required for a just a 2 mtr loop.?

Do you have a circuit diagram of the project you could post.?
E
 

Thread Starter

Open Placer

Joined Dec 14, 2018
5
Hello Eric. First of all, thanks for your reply.

Sensor is utilizing a wheatstone bridge and amplifying its' output with a TLC2274 op-amp. Therefore we can count it as CMOS, I guess?

There's an AC motor that rotates the measurement mechanism and it terribly distorts the signal. The idea of transmitting the signal as voltage rather than current along this distance (2 meters) sounded unsafe in the means of exposing it to a worse interference caused by motor so that's why I'm using a voltage-to-current converter.

Other things to note;
  • I'm using braid + foil cable.
  • Coupled ground and 0V. It made a remarkable difference on noise levels.

Diagram is basically like this. There's no proper circuit, just 3 pieces of hacked up passive components.
diagram.png
and this is the inner schema of load cell.
Sensor.png
 

Thread Starter

Open Placer

Joined Dec 14, 2018
5
I've actually implemented an average filter but it was averaging the data of an whole revolution, not time period based. I will definitely try this, thanks a lot. But I still feel like it would be necessary to cancel out this sine wave-esque noise because there're probably more than one source for distortion and their frequencies differ. When they overlap, peak points get overridden. I want to avoid this possibility by properly filtering the signal.

If you look at the last image there's an upward peak around the region 600-800, however it's not seen easily because it started at the lower edge of the sinusoidal baseline.
 

ebp

Joined Feb 8, 2018
2,332
If the load cell is producing 400 to 4500 mV, why are you amplifying it?

Have you looked at the signal directly from the load cell, right at the load cell, with an oscilloscope?
What are the units of the Y axis in your plots?
What is the excitation source for the load cell?
Are the signal reference and "ground" at the cell actually common or separate conductors?
"Coupled ground and 0V." What does this mean? Where? How?
The corner frequency for the filter (100 nF 168 ohms) is about 9.5 kHz. Is that what is intended? (when I see 100 nF in a filter, my immediate thought is a ceramic capacitor as typically used for decoupling has been used - they are terrible for signal path use for anything even minimally demanding)


Differential techniques are more likely to yield clean signals than converting to current and back.
 

ericgibbs

Joined Jan 29, 2010
8,876
hi Open,
Looking at the 700rpm, single tour, image plot, I would say that is not random noise. It appears to have a regular frequency of approx 12 times the rpm frequency
I would scope the output of the LoadCell, next disconnect the LC from the CV, short the CV input and check the CV output noise.

Basically find the noise source.
E

BTW: When I referred to a semiconductor LC, I meant the actual strain gauges, I have used that type, they have a higher output signal than a regular metal strain gauge.
 

Thread Starter

Open Placer

Joined Dec 14, 2018
5
If the load cell is producing 400 to 4500 mV, why are you amplifying it?

Have you looked at the signal directly from the load cell, right at the load cell, with an oscilloscope?

What are the units of the Y axis in your plots?

What is the excitation source for the load cell?

Are the signal reference and "ground" at the cell actually common or separate conductors?

"Coupled ground and 0V." What does this mean? Where? How?

The corner frequency for the filter (100 nF 168 ohms) is about 9.5 kHz. Is that what is intended? (when I see 100 nF in a filter, my immediate thought is a ceramic capacitor as typically used for decoupling has been used - they are terrible for signal path use for anything even minimally demanding)

Differential techniques are more likely to yield clean signals than converting to current and back.
Sorry for making it unclear, aforementioned op-amp is an inbuilt component. I have just noticed it while peeking at sensor internals. I'm not amplifying the signal.

Sure, I've looked at the signal with a scope directly. Evertything was crystal clear until I start the motor up.

In Y axis, value of 2000 roughly equals to 300 grams of force. There's no standard unit but it's from 0-4096 12-bit 3.3V analog input of MCU.

Excitation source is U5V pin of development board which means it's indirectly powered from USB bus of a computer.

Signal reference and LC ground is common.

By "coupling ground and 0V" I mean shorting the GND pin on development board (which is also connected to sensor GND and converter GND) to earth cable (green/yellow) coming out of electrical panel.

I've tried broad range of resistors on RC filter and noted down the noise levels, 168 ohm seemed to perform better noise cancelling. It was not chosen on purpose nor accurate calculations. It was not intended, just trial and error. And yes, currently a ceramic capacitor is being used. I understand that I have to replace it with a better capacitor.

On "differential techniques", I'm really grateful for suggestions like this because I don't know what to look for when I don't know the right keyword. Appreciated, thanks.

Can you average many revolutions or use a long running average?
I think I can try both of them. I will update with new measurement data.

hi Open,
Looking at the 700rpm, single tour, image plot, I would say that is not random noise. It appears to have a regular frequency of approx 12 times the rpm frequency
I would scope the output of the LoadCell, next disconnect the LC from the CV, short the CV input and check the CV output noise.

Basically find the noise source.
E

BTW: When I referred to a semiconductor LC, I meant the actual strain gauges, I have used that type, they have a higher output signal than a regular metal strain gauge.
Hi Eric.
I've tried to correlate RPM-noise amount but I could not come to a conclusion. This factor of 12x makes me think I should test with RPM values too. I hope I can find some linear relation between noise and motor speed.

I'm going to check individual signal output of sensor and CV with oscilloscope again. Thanks again.
 

ebp

Joined Feb 8, 2018
2,332
5 V from USB is generally grossly unsuitable as an excitation source. The excitation should be very precisely regulated (typically a buffered voltage reference) and very low noise. The output of a bridge is proportional to the excitation voltage, so anything but a precise DC voltage contributes to error and noise. Bridges can be used with relatively poorly regulated excitation if they are read via an ADC that uses the identical voltage as a reference - the whole system becomes ratiometric. It is the "identical" part that is a problem in most crude circuitry because the voltage used is typically inconstant and there is phase differences between the ADC reference and the bridge excitation.

If the excitation is clean with the motor running and the output right at the cell is noisy, then there may be little that can be done other than filtering. If the motor is putting a lot of noise current into the system ground instead of returning it to its source or putting it into Earth ground somewhere other than via the acquisition system, things can be very difficult. As soon as USB is mentioned, the implication is that there are ground-ish connections that are ill-defined and all over the place. This isn't USB's fault - it just goes with the type of equipment in the system. It may be possible to rearrange grounding, but safety issues must always come first.

In differential techniques, the signal is transmitted via a pair of conductors with the expectation that noise will be coupled into each them equally. In this case, a twisted pair would be used, one conductor to the 0 V pin of the cell and the other to the output. These would be "received" with an "instrumentation amplifier" which, ideally, produces an output that is proportional only to the difference between the two inputs and completely rejects any signal that is "common mode" - the same on both inputs, relative to the amplifier's local reference (normally its "ground"). With practical instrumentation amps, rejection of common mode is imperfect but can be very good. Analog Devices and Texas Instruments have many good instrumentation amps that should be suitable - and all kinds of applications information. Differential techniques will do nothing for "normal mode" noise - noise that appears right at the cell between the 0 V and output pins.

What is your maximum frequency of interest from the load cell?
What can you tolerate in terms of phase lag between the mechanical input to the cell and the electrical output at the ADC input?

--
I suspected your Y axis was in counts. The noise looks truly horrendous, but if your Y axis ran from zero to full scale it wouldn't look as bad. Which of course doesn't make it acceptable, just gives a better eyeball notion of magnitude.

Running average can be quite useful with moderate bandwidth signals as long as you have the memory space to keep the required array of values. With the processor you are using, I don't imagine that will be an issue at all. If you use a sensible number of samples (power of 2 so division is a shift), store them as ADC readings and use the subtract-oldest, add-newest, move-pointers method, it is not burdensome. The length must be long enough that there is a reasonable expectation that the mean of the noise over the sample period is approaching zero.
 
Last edited:

Thread Starter

Open Placer

Joined Dec 14, 2018
5
5 V from USB is generally grossly unsuitable as an excitation source. The excitation should be very precisely regulated (typically a buffered voltage reference) and very low noise. The output of a bridge is proportional to the excitation voltage, so anything but a precise DC voltage contributes to error and noise. Bridges can be used with relatively poorly regulated excitation if they are read via an ADC that uses the identical voltage as a reference - the whole system becomes ratiometric. It is the "identical" part that is a problem in most crude circuitry because the voltage used is typically inconstant and there is phase differences between the ADC reference and the bridge excitation.
I see. Then I will use a precision 5V regulator as excitement voltage.

If the excitation is clean with the motor running and the output right at the cell is noisy, then there may be little that can be done other than filtering. If the motor is putting a lot of noise current into the system ground instead of returning it to its source or putting it into Earth ground somewhere other than via the acquisition system, things can be very difficult. As soon as USB is mentioned, the implication is that there are ground-ish connections that are ill-defined and all over the place. This isn't USB's fault - it just goes with the type of equipment in the system. It may be possible to rearrange grounding, but safety issues must always come first.
I have looked at excitation voltage with an oscilloscope before creating this thread but the point I hold the probe was most likely too close to MCU board, maybe it made the signal look clean. Keeping measurement point closer to the signal output may show the actual noisy signal, will measure it again. I will try to rearrange grounding. It's quite messed up.

In differential techniques, the signal is transmitted via a pair of conductors with the expectation that noise will be coupled into each them equally. In this case, a twisted pair would be used, one conductor to the 0 V pin of the cell and the other to the output. These would be "received" with an "instrumentation amplifier" which, ideally, produces an output that is proportional only to the difference between the two inputs and completely rejects any signal that is "common mode" - the same on both inputs, relative to the amplifier's local reference (normally its "ground"). With practical instrumentation amps, rejection of common mode is imperfect but can be very good. Analog Devices and Texas Instruments have many good instrumentation amps that should be suitable - and all kinds of applications information. Differential techniques will do nothing for "normal mode" noise - noise that appears right at the cell between the 0 V and output pins.
Found an example detailed in-amp application by TI. I will probably try to integrate it to system if signal is still indistinguishably noisy after utilizing a precision regulator and software averaging.

What is your maximum frequency of interest from the load cell?
What can you tolerate in terms of phase lag between the mechanical input to the cell and the electrical output at the ADC input?
It's at most ~20 KHz, nominal frequency is 5 KHz. Any duration is tolerable as long as the rotation information is not lost/misaligned. Even if its misaligned, it's mostly recoverable if deviation is linear (e.g., fixed 3 pulse per round) and generally, it was the case.

I suspected your Y axis was in counts. The noise looks truly horrendous, but if your Y axis ran from zero to full scale it wouldn't look as bad. Which of course doesn't make it acceptable, just gives a better eyeball notion of magnitude.

Running average can be quite useful with moderate bandwidth signals as long as you have the memory space to keep the required array of values. With the processor you are using, I don't imagine that will be an issue at all. If you use a sensible number of samples (power of 2 so division is a shift), store them as ADC readings and use the subtract-oldest, add-newest, move-pointers method, it is not burdensome. The length must be long enough that there is a reasonable expectation that the mean of the noise over the sample period is approaching zero.
Code is almost ready. I have to tweak a few lines. But I'm unable to test it right now. I will update it with new measurements.

I can't thank you guys enough. Thanks a million. I'm designing a filter circuit and will post it there when it's done.
 
Top