Hi everyone,
I am having a problem interfacing an arduino with a motorcycle gear position sensor. The sensor acts like a potentiometer outputting different voltages at different gears.
The problem is that the differences in values between different gears are TINY. the difference at 5v between the first couple of gears is only .001(5V vs. 4.999) and then the other gears are only like .005 difference. So the problem is that the analogRead() simply reads all of the voltages as 1023.
Any ideas on how to deal with a problem like this?
but i don't know how to go about reading a resistance value with a analogRead(), call. I know i cant read resistance directly, but how do i go about reading it.
but i don't know how to go about reading a resistance value
Use a pull up resistor.
Wire one of the wires from your sensor to ground and the other to the analogue input. Then put a resistor from the analogue input to +5V. make the resistor something between 10K and 20K. You should then have good reading to play with.