AnalogRead sample difference in values


I have a project with 6 temperature sensors, type k amplified with the PlayingWithFusion board.

Each of the sensors is mounted in a exhaust manifold reading the temperature outlet from each cylinder in a six cylinder diesel engine.

The problem is that A0 reads 750 degree celcius (pretty sure this is correct). but A1 reads 30 less, and then A2 another 30 less. Ending out with a difference in aprrox 150 degree celcius between A0 and A5.

How is this possible?

They are all made with the simple AnalogRead function.

Should i add a delay or?

best regards Bastian Gaardahl

If your using several analogue pins then when you switch between them I think it is worth reading and discarding the first result but better still is to take several readings and average the results.

I'd read every channnel 3 times in sequence, then discard the max and min values.

you can also use runningAverage or runningMedian

Just for curiosity, try this.

exaust.ino (532 Bytes)


void getADC ()
  for(int k =0;k < 6;k ++) accu[k] = 0;

  for(int j = 0;j  < 6;j ++){    // <<<<<<<<<< this and next line switched
    for(int i = 0;i < 16;i++){
      accu[j] += analogRead(j);

Note that switching between analog channels do influence the reading so looping the above way has only 6 channel switches where your original proposal switches 16x6 times.


OK, just curious if that helped.