Interfacing With A Digital Speedometer

After swapping the engine out in his scooter, [James Stanley] made an unfortunate discovery. The speedometer was digitally controlled, and while the original engine had a sensor which would generate pulses for it to interpret, his new engine didn’t. Learning that the original sensor would pull the signal wire to ground each time it detected a tooth of one of the spinning gears, [James] reasoned he needed to find a way to detect the scooter’s speed and create these pulses manually.

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.

For all you two wheeled hackers out there, we’ve covered similar projects designed for bicycles, as well as some very slick digital speedometer mods for motorcycles.

5 thoughts on “Interfacing With A Digital Speedometer

  1. ” Since the wheel is of a known circumference, timing the pulses from the sensor allows calculation of the current speed.”

    Kind of like those bike computers. Main concern is how close the magnet and sensor needed to be.

    1. 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.

  2. 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.

    1. Yeah, if it was printed in gray/black you wouldn’t even know it wasn’t OEM hardware.

      Maybe some people like to see the hardware they made or hacked in contrast with the original? I’m with you though, I would try to blend it in.

    2. 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.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.