I want to build a simple project for my exercise bike. I'd like show a LED speed graph for the speed indicator using WS2812B addressable LEDS which I've used before.
However I'd like to keep the existing bike computer running and unaware that I'm doing anything and keep it functioning as normal.
The bike computer seems to measure the cycle speed by using a reed switch and magnet and it delivers one pulse per rotation of the crank, so the signal rate isn't going to be that high 5 or 6Hz at maximum. The bike is sending 3V down to the switch, unsurprising since it runs on 2AAA batteries.
So I'm thinking it should be an easy matter to tap into that switch wire and connect it to a microcontroller, and a I have a few 8Mhz Arduino Pro Minis sitting unused so that should easy enough. But I'm wondering how best way to monitor the switch in a way that's hopefully invisible to the bike computer.
My first thought would be to connect the signal wire to the gate of a mosfet (with a resistor in series) since mosfets take very little current to turn on. Then use the mosfet to switch a pin on the microcontroller which I can then monitor and count the pulses in a particular time period, convert that to a speed, scale it and animate my LEDs accordingly.
Do people think that will work? Is there a better way?
Any advice is welcome.
p.s. I also have a few Pi Picos sitting around unused, but that seems overkill for this simple task?