Reading the continuously changing voltage

There are changes in the voltage I measure.
I want to see that the measured voltage is as stable as possible at the end of the time.

  1. I want to display the stable voltage end of this period
  2. I want to display this period (0-9 Seconds)
  3. I want to display this gap.

Could you please guide me

Please explain what this means.

Please explain what you mean by "gap".

Post some time/voltage examples, or a graph, so that people might have some idea what the real problem is.

Hi,
Have you written any code yet to read your analog input?
What level is the voltage?
What model Arduino are you using?

Thanks.. Tom.... :smiley: :+1: :coffee: :australia:

Thank you vey much for your quick interest.

  1. I read a temperature fluctuation. At the end of a certain period of time, I want to see the point where the fluctuation reaches the minimum.
  2. The difference between minimum and maximum reading (fluctuation level)(gap)
  3. Time is 9 second maximum. Max temperature measuring is 5V and 0.05V for the gap.

It sounds like you should collect an array of temperature readings for 9 seconds, then search for the minimum and maximum values in the array.

Example:

int max = 0, index_max = 0;
for (int i = 0; i < array_length; i++) {  //search for max value
if (temp[i]>max) {
 max = temp[i];
 index_max=i;
 }
}

Hi TomGeorge,
Thanks a lot.
Yes, I have a code for reading the analog input with averaging. And measure 5V in three digit display
I am using Arduino Uno

If you are only interested in the extremes, no array is needed.

Thank you so much @jremington,
I am not expecting such quick response.

Hello @jfjlaros ,
I am not interest with extremes, I want to see steady state level and also average of min and max value (gap)

I am not sure what you mean by "steady state level", but min and max are the extremes. You can calculate the average of these values without using an array.

Hi,
I gather that @glamo is not interested in the overall average, what he or she is interested in is after 9 minutes the current temperature fluctuations are within a certain "gap".

So you only need to measure the fluctuations continuously over say the previous minute and at the 9 minute stage use the final fluctuations, of that last minute, as the data to be analysed for stability.

I hope that is not as clear as mud, I'm off to bed, 2:26am here.

Tom... :smiley: :+1: :australia: :sleeping: :sleeping: :sleeping: :sleeping: :sleeping:

Hi @TomGeorge .
Exactly, Have a good night with happy dreams

Ah I see.

Do you expect the temperature to behave like this?

Or rather like this?

Hello @mancera1979,
Thanks a lot. Actually, my diagram is below.
temp_level

Hello jremington,
I want to try your code, would you please add some comments such as "array_length", I am trying to learn, your each word is important for me.
Best regards

array_length is the declared size of the array temp[], e.g.
int temp[10]

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.