Redlining Your CPU Via Automotive Tachometer

Many CPU-usage widgets have stylistically borrowed from vehicles, displaying something mimicking the tachometer found in the dashboard. [Pat] took it a step further and tried his hand at re-borrowing this style. He figured, why not use an actual physical tachometer to display how hard the CPU on his Raspberry Pi was revving?

With the goal of tuning 0-100% CPU usage to 0-8000 RPM on the tach, the first step was diagnosing the range of PWM input frequencies that moved the needle across the tach’s full arc. Using his Tektronix 3252C function generator he quickly determined 0-440 Hz would be needed and graphed a handful of intermediate points. The response curve was not linear, so he drew up some fudging guidelines to make all the datapoints match.

Next, he wrote a few lines of Python (he shared) to make the Pi to poll its CPU usage and translate it to the proper frequency. The Pi makes outputting easy, GPIO pin 11 carried the signal to a 7404 for buffering, then out to the tach. The automotive tach itself ran on 12V, but its input signal required only 5V so he pulled a 7805 from his parts bin.

Once it was all put together it worked beautifully using just the one extra component. Some might see this as more clever than USB dependent or Arduino bloated based tachometer hacks.

See the video after the break of the tach twitching even when the mouse moved, and pegging the red when opening a browser. No more need to use up valuable screen real-estate (or use a screen at all) if you want to see at a glance when your Pi is putting in work.

Continue reading “Redlining Your CPU Via Automotive Tachometer”