After fumbling for some time with double-clutch heel-toe juggling, I decided I could help myself with a microcontroller. It starts with an IR sensor in the speedometer.
If you don't know how an old speedometer works - a metal drum spins around a permanent magnet (could be more than one) spring loaded and connected to the speed needle. The induced magnetic field (current, actually - Lenz's law) in the drum has polarity that opposes that of the magnet and subsequently, as the drum spins, it also applies a force on the magnet displacing the speed needle. The faster the drum spins, the greater the field disparity, the greater the force, and subsequently the deflection of the needle. Some energy is lost to the eddy currents, but overall it's a clever system. Anyway - it's the spinning drum which is moved by a cable connected to the differential of the car that is useful in this case. As it spins, the purple nail-polish stripes block (an then unblock) the reflection from and IR LED. A photodiode, then picks up this timing.
The ATTINY85 (the MCU in Digistump) measures the time it takes to flash through a number of stripes/spaces. The number it counts is varied based on the last measurement so that at low speed (10mph = 14 spaces to count) an acceptable refresh rate is achieved, and at high speed (60mph = 64 spaces to count) higher accuracy is attainable. This method works well with me - no jitter, temperature dependent moodiness, or other problems of the like noted. The accuracy is well within the requirement of project, although admittedly I did not attempt to determine error rate precisely.
After the speed is obtained, the precise RPM corresponding to each gear is calculated and the correct LED in a WS2812 strip (WS2812: RGB, individually addressable circuit-on-board LEDs) is illuminated with a color representing the gear. I know the code is a little dumb, but I wasn't thinking clearly when I wrote it, and it worked anyway.
But what does it do? It shows you what RPM each gear would take you, should you shift and clutch into it at each individual moment. But why? So that, when downshifting during "spirited driving" (track day, autocross, etc.) you can better guess how much to blip the throttle and when to drop the clutch as to not upset the suspension. Very nerdy? Yes, extremely. Takes the fun and art out of doing it? No, double-clutch heel-toe is challenging anyway.
The rest is details - there's an on/off switch and brightness control, a 5.0V voltage regulator that sinks the WS2812s because the on-board digistump one is tiny, and it all draws power from the dashboard so that everything is off when the ignition key is out. The LEDs are taped to a cutout from my old Minnesota license plate, and the purple nail-polish is my wife's.
VideoSorry for shaky video.
Comments