3
\$\begingroup\$

I'm using four of these load cells wired in parallel and connected to an ADS1232. Overall the device (scale) is working well, but I am seeing a strange signal over a period of a few minutes after I turn the scale on. I have the ADS1232 hooked as in this schematic: ADS1232 schematic

I have the ADS1232 wired to output 10 sps which go to a MCU that does a moving average over 32 samples (3.2 s window). When I start the scale and record the output from this filter I see the following signal (purple line): enter image description here

I have seen the same signal a few times now. It seems to go away after appearing once on startup.

Does anyone have any ideas as to what could be causing this signal?

Edit: Here is the code for the moving average filter (N = 32 in this case). The Input method is passed a new sample every 0.1 s.

**

template<size_t N>
class MovingAverageFilter {

    double samples_[N];

    size_t write_;

    double sum_;

    double average_;

public:

    /*initialize a filter with the necessary parameters*/
    MovingAverageFilter(double init = 0) 
        : samples_{0}, write_(0), sum_(init * N), average_(init) {
        Reset(init);
    }

    /*clear buffers*/
    void Reset(double init = 0) {
        for (auto &i : samples_) {
            i = init;
        }
        sum_ = init * N;
        average_ = init;
    }

    /*input a new value*/
    double Input(double input) {
        auto oldest = samples_[write_];
        sum_ -= oldest;
        sum_ += input;
        samples_[write_] = input;
        write_++;
        write_ %= N;
        average_ = sum_ / N;
        return average_;
    }

    /*get the last output*/
    double LastOutput() const {
        return average_;
    }

    /*get the last input*/
    double LastInput() const {
        auto index = (write_ - 1) % N;
        return samples_[index];
    }
};

**

\$\endgroup\$
8
  • \$\begingroup\$ What is the green line in your graph? What does the raw data look like? When do you turn on the scale, at [0] minutes or at the left edge of the graph? What does your code for the filter look like? \$\endgroup\$ – Elliot Alderson Jun 28 '18 at 13:47
  • \$\begingroup\$ Is that raw data? Also after it has started, when you change the load, what does the change look like? \$\endgroup\$ – Spehro Pefhany Jun 28 '18 at 14:28
  • \$\begingroup\$ How long is your shielded (hopefully) twisted pair? What is 1 lb pk-pk in terms of full scale? Anything with a 1 minute cycle blips followed by a 2 minute cycle then silent is weird since self heating is only 50mW or so \$\endgroup\$ – Tony Stewart EE75 Jun 28 '18 at 15:02
  • \$\begingroup\$ I suspect 10 sps aliasing with 60Hz \$\endgroup\$ – Tony Stewart EE75 Jun 28 '18 at 15:10
  • \$\begingroup\$ @ElliotAlderson The green line is another filter taking its input from the first filter. I don't have the raw data handy but I can experiment with that tomorrow. The scale was turned on within a minute or two of the left edge of the graph. I have added the filter code to the question. \$\endgroup\$ – cholz Jun 28 '18 at 17:48
0
\$\begingroup\$

This may very well be a thermal stabilization of the strain gauges in the load cells as the excitation gets applied. Since you have four devices in parallel there may even be a difference of stabilization characteristics between them that makes this problem more apparent.

I can suggest an experiment to help isolate if what I suggested above is true or not. Try leaving the excitation on to the load cell strain gauges all the time and then just turn on the electronics subsystem. If the problem does not re-occur then you know it is the load cells stabilization.

On the other hand you could run a second experiment where you leave the electronics powered all the time and then just switch on the load cell excitation. This will give you some additional data.

Lastly I would suggest running an experiment where you just run one load cell and see if you see the problem in this single condition. If a single unit behaves nicely then you know it is the parallel combination effect.

\$\endgroup\$
2
  • \$\begingroup\$ I was thinking it might be a thermal thing. Thanks for your ideas I will try these experiments soon. \$\endgroup\$ – cholz Jun 28 '18 at 17:57
  • \$\begingroup\$ I ran the product again today with excite+ disconnected and didn't see the strange behavior (it was a solid zero output as expected for 45 minutes). About 30 minutes after I reconnected excite+ I began to see strange and different behavior. At this point I think there is some thermal or other issue on the board that houses the ads1232. I am using a new board now and I haven't seen any sign of the problem. \$\endgroup\$ – cholz Jun 29 '18 at 15:36
0
\$\begingroup\$

The moving average filter is showing suspicious behavior, based on the code you have provided. All of the stored values, as well as the computed average, are initialized to zero. Therefore, the output of the MAF should be zero when it is first initialized and then gradually increase to the long term average of the input data. If you have the filter running with the scale turned off then the inputs to the ADC should be at ground, shouldn't they? I can't understand why the filter produces the shown output with the scale off or just after it is initialized.

\$\endgroup\$
3
  • \$\begingroup\$ The filter window is only 3.2 seconds long so any ramping up/down is very brief. \$\endgroup\$ – cholz Jun 28 '18 at 18:40
  • \$\begingroup\$ But why is the MAF output equal to 114.7 when the scale is turned off (you said for "a minute or two") at the left side of your graph? \$\endgroup\$ – Elliot Alderson Jun 28 '18 at 19:52
  • \$\begingroup\$ Sorry, I meant the scale was turned on prior to the left edge of the graph. \$\endgroup\$ – cholz Jun 28 '18 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.