This is a bicycle computer, designed to count wheel revolutions using a cyclocomputer wheel sensor. It stores two trip meters and a speed histogram; the trip meters are reported in Morse code via a speaker, and the histogram can be saved to EEPROM and later printed over the serial connection.
(Mouse over text like this for elucidatory tooltips.)
See photos and a video along with discussion concerning the hardware construction (sewing) and use.
This work is licensed under a Creative Commons Attribution 3.0 Unported License; it is written by Mark Fickett. (Do let me know if you find it interesting or useful! Or, should you find bugs, a report or a pull request would be welcome.)
The interface was designed for the LilyPad Arduino ATmega328 (Leah Buechley, arduino.cc). All peripheral hardware has one lead connected to the specified pin, the other to ground.
PIN_REV_SENSOR
(12) — connected to a commercial cyclocomputer's sensor (chosen only because it was already on the bike)PIN_SPEAKER
(3) — a buzzer, originally the ringer on a cordless touch-tone phonePIN_BUTTON_REPORT
(2) — a momentary switch, easily triggered without looking (similar on sparkfun), originally from a VCR's circuit boardPIN_BUTTON_A
andPIN_BUTTON_B
(11 and 12) — LilyPad Button Boards, difficult to trigger accidentally- and
PIN_STATUS
(13) — the built-in status LED
The status light blinks K
(dah-dit-dah, -.-) when setup
completes, then a short blink each time the wheel sensor is triggered. The trip meters are named (in Morse output) dit
or dit-dit
. Button inputs are either a tap (quick press and release), or a hold:
- Tap
PIN_BUTTON_REPORT
to hear the trip meters' values in Morse onPIN_SPEAKER
. - Tap
PIN_BUTTON_A
orPIN_BUTTON_B
to reset the associated trip meter; the name of the trip meter andSK
are sent as confirmation.
- Hold
PIN_BUTTON_REPORT
to write the histogram values to serial output, formatted for R (seemakeGraph.R
). - Hold
PIN_BUTTON_A
to save the histogram to EEPROM. Before writingS
is sent; then the status LED is lit during writing, and finally adit
is sent after writing is complete. The histogram is always read from EEPROM on startup. - Hold
PIN_BUTTON_B
to clear the histogram. (This does not write the cleared histogram to EEPROM.) AnX
is sent as confirmation.
The Morse code output uses a Morse library for Arduino, the key feature of which is to allow monitoring an input (PIN_REV_SENSOR
) while sending Morse.