To find the scooter’s speed, he installed a magnet on the front wheel and a hall effect sensor on the fork to detect each time it passed by. Since the wheel is of a known circumference, timing the pulses from the sensor allows calculation of the current speed. A GPS receiver could be used if you wanted fewer wires, but the hall effect sensor on the wheel is simple and reliable. With the speed of the scooter now known, he needed to turn that into a signal the speedometer understands.

Speedometer controller potted with resin.

[James] wrote a program for an ATmega that would take the input from the wheel sensor and use it to create a PWM signal. This PWM signal drives a transistor, which alternates the speedometer sensor wire between low and floating. With a bit of experimentation, he was able to come up with an algorithm which equated wheel speed to the gearbox speed the speedometer wanted with accuracy close enough for his purposes.

While the software side of this project is interesting in its own right, the hardware is an excellent case study in producing robust electronic devices suitable for use on vehicles. [James] 3D printed a shallow case for the circuit board, and potted the entire device with black polyurethane resin. He even had the forethought to make sure he had a debugging LED and programming connector before he encapsulated everything (which ended up saving the project).

While the specific scenario encountered by [James] is unlikely to befall others, his project is an excellent example of not only interfacing with exiting electronics but producing rugged and professional looking hardware without breaking the bank. Even if scooters aren’t your thing, there are lessons to be learned from this write-up.

Classical electronics Hack job. I onced used a 2 digit frequency counter kit as a Two digit speedo in my car Much the same way, except Micros Were expensive, so the conversion Was done with CMOS logic to get 0.1 acuracy.

Very nice hack, this is what we expect on HaD. A bit of trial and error, fail, but working device.
I still don’t understand why people print with neon color and not grey or black, as a fix, you should not see a thing.

It’s really what you just have on hand… I have like 4 spools of neon colors that were gifted to me.. and yet only one of black. Add that to the frustration of changing filaments, and you get funky colors in useful things.