I am using a SCA121T-D03 sensor and the values I am getting from analogRead are all over the map. How should I hook this up so I can get stable readings? I am able to get stable readings from my multimeter no problem but not in arduino. Since this sensor takes 7-35 volts I am powering the sensor w/ an external 12v battery, the arduino is powered via USB and I have the input wires hooked to A1 and A2. Simply doing this,
int xVal = analogRead(1);
int yVal = analogRead(2);
float volX = xVal*5.0/1024;
Serial.print("volX = ");
Serial.println(volX);
in a loop produces,
volX = 0.81
volX = 0.90
volX = 2.30
volX = 3.31
volX = 3.93
volX = 3.82
volX = 2.98
volX = 1.64
volX = 0.79
volX = 1.09
volX = 2.54
volX = 3.57
volX = 4.01
w/ a delay(1000) between. How can I have this produce 2.5 when sensor is a rest (0*) like my multimeter? I have tried averaging 10 samples over 1 second and that didn't help much still produced very high highs and very low lows.
Thanks,
Chad