I am building a small electrical car and I want to be able to monitor the distance traveled and store it on a SD card. So far I have been trying measuring the distance with an encoder and a photointerrupter attached to the axis of the wheels,(by measuring the number of turns of the axis) but the errors are coming up VERY large (double distance etc.)
I have tried with different number of holes (10, 6, 3) but it doesnt seem to work well.
Would you recommend trying with a hall effect sensor and some magnets? Is it in general more accurate?
Note that the spinning of the axis is not that large (about 150 RPM)
I am building a small electrical car and I want to be able to monitor the distance traveled and store it on a SD card. So far I have been trying measuring the distance with an encoder and a photointerrupter attached to the axis of the wheels,(by measuring the number of turns of the axis) but the errors are coming up VERY large (double distance etc.)
An analog output photo-interrupter perhaps?
You need to condition the outputs from an analog photo detector by using a schmitt-trigger to avoid
multiple transistions due to noise in the signal. This could be done in hardware or software, but it
has to be done.
A hall-switch sensor would be much simpler and robust.