Wednesday, July 17, 2013

The First Thing

Sometimes I get a yearning desire to build something, and this was the first time I had enough knowledge to build something complete.

This project started as an LED shift light. I'd seen videos of people's instrument clusters changing colors at a preset RPM, and wanted to build one for myself. This evolved into a programmable shift light.

Here are several iterations of the shift light:




Realizing that the microcontroller had access to all the signals required for an entire tachometer, I decided to make that instead. If I could get it to read speed, I could calculate the gear as well.

The RPM signal is derived from a fuel injector (one pulse = two RPM) and the speed signal from the speedometer.

The microcontroller measures frequency by triggering interrupts from the rising edges of the input signals and running a counter between interrupts. Instead of spending time driving my car around to debug the firmware, I used a square wave audio generator and a simple comparator circuit to simulate the signals in the car.



Around the same time I completed this perf-board prototype, I had a course assignment to design a printed circuit board, and I had just the circuit! I spent many hours positioning the 0805 LED footprints instead of studying for my more important finals. This was my first PCB and first time using surface mount components.



It fit in the car! The simple 7805 voltage regulator is mounted on the rear of the board with a heat sink, though with the LED controller only lighting 8 LEDs at a time, it doesn't really use much power.

It's been in the car two years now, and I get to see it working almost every day.