I have connected the arduino to the 0-360 degree hall sensor, i am trying to read values from it. this is my simple code
void setup() {
Serial.begin(9600);
}
void loop() {
// read the input on analog pin 0:
int sensorValue = analogRead(A3);
// print out the value you read in the Serial Montitor:
Serial.println(sensorValue);
delay(50); // delay in between reads for stability
}
when i rotate the knob of the encoder, i get values from 0 to 1023. But at this 1023 the value remains constant for sometime until it changes to 0 back again.
I also tested it with the multimeter, and it shows when the voltage is between 4.7V to 5V , the value is 1023 and it remains constant.
I want to eliminate this issue of having a constant value even though the knob is rotated for precise measurements.
I moved your topic to an appropriate forum category @aparna97.
In the future, please take some time to pick the forum category that best suits the subject of your topic. There is an "About the _____ category" topic at the top of each category that explains its purpose.
What sort of Arduino are you using?
It sounds like you are using a 3V3 processor with a 5V A/D reference voltage. Which would explain what you are seeing.
Yes, I measures using multimeter. I can see the voltage changing in a linear way from 0 to 5V. and in the arduino output , I can see when the voltage is from 4.7 to 5 V the output from arduino is 1023 and not changing.