16-button keypads have a clever method of encoding their data into 8 pins. Pins are mapped to four rows and four columns on the keypad. A user reads the keypad by bringing each row up to logic: HIGH, and reading the corresponding column values, (HIGH or LOW). Keypad scanning can be farmed out to a microcontroller with a simple finite-state machine and some button debouncing techniques. [Mario], [Glen], and [Paul] on the Netduino forums took an entirely different route: they’ve designed and implemented a Keypad Scanner using any microcontrollers SPI peripheral and a 74HC595 Shift register.
The trio’s solution is an elegant adventure into circuit design. With two diodes and a voltage divider, they devise a simple circuit that pulls the SPI MISO line LOW if a button in the corresponding circuit’s row is pushed closed. Copied four-fold, this circuit joins the rows and columns of the 74HC595 to the keypad matrix. To scan across the four columns, the microcontroller performs an SPI transfer of the key value: 0x01. To decode which button is pushed, the value received back from the SPI bus encodes which button was pushed out of the 16 possible buttons. Note: some cases for ambiguity as to “which button was pressed” do exist if multiple buttons are pushed at the same time, but for the general case where we’re punching in values one-by-one, this circuit works perfectly.
The team’s hack is a clever use of existing hardware to outsource a microcontroller’s software problem to hardware while leveraging the SPI peripheral to cleverly decrypt and retrieve data back from the keypad. Kudos to the team of three over at the Netduino Forums, and we’re always thrilled to see and idea grow from one person to the next. In case you want to take a step lower and build up the keypad itself, here’s a blast from the past that does just that.


The event has two categories that vehicles compete in: prototype vehicles that compete for the highest fuel efficiency and “urban concept” vehicles that are more focused on normal driving environments and look slightly closer to street-legal vehicles. Cars in both categories can be fully electric or powered by gas, diesel, compressed natural gas, or other alternative fuels. Vehicles drive around a 0.9 mile track that weaves through downtown Detroit and the efficiency of each vehicle is measured as they complete a fixed number of laps around the track.
Next, a jack shaft made from a bike bottom bracket and crank is installed up front in between the top tube and down tube of the frame. On one side of the jack shaft is a sprocket and the other side is a large pulley. When converting to what [Job] calls ‘power production mode’, the chain going to the rear wheel is removed from the crank sprocket and replaced with a chain connected to the jack shaft.



