On the hardware side i've used following parts:
a Raspberry Pi Pico
Waveshare 1.3 inch OLED,
https://www.waveshare.com/wiki/Pico-OLED-1.3
two small diodes (1N4148)
Optional parts for the housing:
housing,
PicoGehäuse.STL
TPU front cover,
DeckelFolie4.STL
TPU cable outlet,
KabeldurchfPicoAssy.STL
TachoMod.jpg
Sorry, the photo is not very sharp! And i know, the "S" on the TPU front cover is "upside down"...
The wiring remains like in my post from 13.9.22 except that i have inserted the 2 diodes in the signal lines. Also there is no need to set the "input bits" because we have a menu for changing the settings.
The TachoMod starts automatically when an input signal is detected. After start, it shows the period duration and the rpm of the incoming(top) and outgoing signals(bottom). see photo above
With the "S" button you can enter the menu (only possible when no input signals are detected), the "+" button increments values in the menu.
The following settings are implemented:
Multiply/Divide Mode: “/” or “x” ; Makes output faster or slower compared to input signal
Factor (multiply or divide): 1-16
Delay time: 1-9999ms ; after which time without inputsignal the output will be switched off
Pulse per revolution: 1-16 (normally 2) ; for calculating the correct rpm values
All settings will be stored automatically to onboard flash memory after leaving the menu.
And here is the source code of TachoMod_V4.0, written in microPython with ThonnyIDE.
TachoMod_V4_0.py
The code will be far away from "perfect", but it works.
And it was a really nice project for my first steps with a Raspberry Pico and the programming language Python.
I hope this description is more or less understandable and sorry for my bad english...😰