Low-friction treadmill with a very compact design. It is manually driven. A rotary encoder tracks belt movement. An encoder interface based on a teensy microcontroller reads the encoder and calculates speed and direction. Speed is updated every time it changes. If no changes are detected over a set time (typically 50 milliseconds) the speed is set to 0. Distance is also accumulated. The USB-serial connection sends distance and speed on every change. The analog output gives a voltage proportional to speed. With the sketch provided 100 mm/sec are 2.5V. These values can be changed in the sketch as you wish.
Calibration of speed, distance, and ouput voltage can be customized. The treadmill also functions without the encoder connected.
Jackson J, Karnani MM, Zemelman BV, Burdakov D, and Lee AK. (2018). Inhibitory control of prefrontal cortex by the claustrum. Neuron 99: 1029–1039.