Skip to main content
Visitor II
February 12, 2024
Solved

condition check below low level

  • February 12, 2024
  • 2 replies
  • 2429 views

Hi,

I have question, I wanted to check whether a condition has reached below threshold level. How many check do I need to do whether it has reached the level below. Does it need to be three check or do a 20 check and average out to see if it below that level. Is there better way of doing ? alogortihm perhaps.

 

    This topic has been closed for replies.
    Best answer by TDK

    Averaging 20 readings will definitely improve the accuracy of the result, if the level is stable. If you have the liberty of taking many readings, for instance if your application doesn't see fast changes in fluid level, it seems smart to average many readings together to improve accuracy.

    But it really depends on your application, maybe this improvement isn't buying you anything.

    2 replies

    Technical Moderator
    February 12, 2024

    Hello,

    Do you mean a reading from ADC?

    Super User
    February 12, 2024

    That all depends entirely on your particular situation,  application, and requirements - you haven't given enough information to make any specific suggestions.

     

    cjaya.2Author
    Visitor II
    February 12, 2024

    Thanks for the reply. I am measuring liquid level. if it below the level with sensor readings. whether it has reached low level from the sensor. 

    Super User
    February 12, 2024

    So think about the nature of the signal you're getting, and the nature of the system you're controlling:

    • How quickly does the signal change?
    • Does the signal "jitter" up and down?
    • Does it matter if you give a "low" indication a bit early/late?
    • etc, etc, ...