I need help on building a measuring wheel using a small rotary encoder and raspberry pi or Arduino (most probably raspberry pi).
This circuit, would be a good starting point for your project: https://www.circuito.io/app?components=97,512,11021,417986,774824
it consists of:
- an Arduino Uno (RPI is a bit over kill for this matter)
- a Pushbutton - for resetting the reading before starting a new one.
- LCD display for displaying the current read
- a Wheel Encoder - this sensor measures how much the wheel has turned. Use this data to calculate the distance passed. This can be done using a rotary encoder using as you suggested but a wheel encoder is more suitable.
Feel free to modify these components with ones which suit you best.
The general idea:
you will have a measuring device with a rod and a wheel.
The wheel encoder sits on the shaft of the wheel, while the photoelectric part of it is attached to the rod (stationary), in a way that the wheel can move relatively to the photoelectric part.
The sensor will produce a square wave that can be read by the Arduino, it will count the number of “ticks” passed in front of the sensor.
This count is used to calculate the overall distance passed - the formula takes into consideration the radius of the wheel.
The calculated distance will be displayed on the display screen.
Pressing the button will reset the reading.
Ohad from circuito.io