Project P06520 - Tempo Meter

Technical Specification

I. Three Operational Modes

1. Metronome Mode

- power-up default mode

- display flashing target tempo:

- with the flash rate equal to the target tempo

- with a 50% duty cycle

- in beats-per-minute (BPM)

- as 2-digit or 3-digit decimal value, right-justified (with no leading zero)

- justified to upper left corner with each digit 20mm high

- display units:

- as “BPM”

- to the lower right of the tempo value with each character 4mm high

- persistantly (only the tempo value flashes)

- display time-of-day:

- as HH:MM (hours and minutes)

- justified to upper right corner with each character 8mm high

- right-justified (with leading zero on minutes but not hours)

- persistantly (only the tempo value flashes)

- display current mode:

- as “Metronome Mode”

- justified to lower left corner with each character 4mm high

- persistantly (only the tempo value flashes)

- metronome function:

- initializes target tempo (and display) to 120 upon power-up

- starts at current target tempo upon subsequent entry into this mode

- auto-starts (flashing) upon entry into this mode

- determines flashing rate with +/-1ms accuracy

- re-starts upon each increment or decrement of the target tempo

- supports target tempo range of 40-180BPM

- won’t allow increment past 180BPM or decrement past 40BPM

- inputs in this mode are the three buttons and the impulse detector

- tapping UP button increments the target tempo by 1BPM

- tapping DOWN button decrements the target tempo by 1BPM

- holding UP button for more than 1 second increments the target

tempo 1BPM each 100ms until released

- holding DOWN button for more than 1 second decrements the target

tempo 1BPM each 100ms until released

- any impulse detected from the trigger selects Tempo Meter Mode

- tapping TAP button selects Tempo Meter Mode

- simultaneously pressing UP and DOWN buttons selects Clock Set Mode

2. Tempo Meter Mode

- display current target tempo:

- in beats-per-minute (BPM) with +/-1BPM precision

- as 2-digit or 3-digit decimal value, right-justified (with no leading zero)

- justified to upper left corner with each digit 20mm high

- averaged over last 8 beats worth of impulses (based on current target)

- updated (with new 8-beat average) every 4 beats worth of impulses

- display units:

- as “BPM”

- to the lower right of the tempo value with each character 4mm high

- display time-of-day:

- as HH:MM (hours and minutes)

- justified to upper right corner with each character 8mm high

- right-justified (with leading zero on minutes but not hours)

- display current mode:

- as “Tempo Meter Mode”

- justified to lower left corner with each character 4mm high

- tempo detection algorithm:

- starts at current target tempo (most recent metronome setting or

tempo meter value) upon entry into this mode

- auto-starts upon detection of first impulse

- analyzes the relative durations between impulses

- ignores any durations over 2.5 seconds

- runs once for each detected impulse (unless the duration was over 2.5s)

- once 3.5 beats or more worth of impulses have been collected,

determines the highest probability match for the tempo (without

taking into account any durations less than a quarter of a beat at

the current target tempo)

- if new calculated tempo isn’t within 20% of current target tempo,

assumes initial tempo range of 75-149BPM

- new calculated tempo becomes the current target tempo

- allows borderline tempo to drift beyond initial range (e.g. an initial

tempo of 148 can drift up to 150 but won’t wrap to 75)

- inputs in this mode are the three buttons and the impulse detector

- impulses detected from the trigger are analyzed for timing

- tapping TAP button simulates an impulse from the trigger

- simultaneously pressing UP and DOWN buttons selects Clock Set Mode

- tapping UP button or DOWN button selects Metronome Mode

3. Clock Set Mode

- display minute-set instructions:

- as “UP - set minutes”

- left-justified below time-of-day with each character 4mm high

- display hour-set instructions:

- as “DOWN - set hours”

- left-justified below minute-set instructions with each character 4mm high

- display mode-restore instructions:

- as “TAP - restore mode”

- left-justified below hour-set instructions with each character 4mm high

- display current mode:

- as “Clock Set Mode”

- justified to lower left corner with each character 4mm high

- display time-of-day:

- as HH:MM (hours and minutes)

- justified to upper right corner with each character 8mm high

- right-justified (with leading zero on minutes but not hours)

- updated per adjustments

- only inputs in this mode are the three buttons:

- tapping UP button increments the minute by one

- tapping DOWN button increments the hour by one

- tapping TAP button selects Metronome Mode

- trigger inputs are ignored (no impulse detection)

- time-of-day clock is 12 hour display only (no AM/PM, no date)

II. Hardware Specifications

1. Trigger Device(s)

- no internal trigger device

- one external trigger input

- 1/8” female mono (two-conductor) phono jack

- device connection via standard patch cable (plus 1/4-to-1/8 adapter)

- connect any commercially available piezo-element drum trigger or pad

- trigger inputs low-pass filtered at a cutoff of 4.8kHz

- filtered trigger input signals processed by ADC at a sampling rate of 10kHz

- average magnitude over a 10ms period which exceeds two times the average

magnitude over the previous 10ms period is considered an impulse

- maximum detectable impulse frequency of 50Hz

- capable of detecting impulses as low as 0.25Vp-p

- impulses from both inputs (trigger and TAP button) are logically combined

into one set of impulses to be processed by the Tempo Meter algorithm

2. Power Supply

- 4 AAA cells in series

- push-on/push-off POWER button completely isolates supply when off

- POWER button connects supply to a dual-output DC-DC switcher when on:

- Vin = 5V

- Vin(max) = 7V

- Vout = +/-5V

- Iout(max) = +/-100mA

- Pav(max) = 1W

- +5V (Vcc) powers the microcontroller, the RTC, and the LCD controller

- -5V (Vee) powers the LCD display

- maximum total power consumption = 0.25W

- approximately 15 hours of battery life

- AAA cells replaceable via back cover removal

- no auto-on or auto-off (metronomes can’t auto-off)

3. Real-Time-Clock (RTC)

- Dallas DS1307

- keeps track of time-of-day with or without Vcc present

- automatically switches between Vcc and Vbat

- Icc(max) = 1.5mA

- Ibat(max) = 300nA

- uses BR1225 3V watch cell for backup (Vbat)

- Vbat = 3.0V

- 50mA-H

- approximately 10 years of RTC backup

- I2C 2-wire interface with microcontroller

- requires one external 32.768kHz crystal

4. LCD Display

- Microtips MTG-S12864BRGHS

- 128x64 pixel dot-matrix graphic LCD display

- STN gray background reflective type

- active viewing area 55x27.5mm

- dot pitch 0.43x0.43mm

- dot size 0.40x0.40mm

- no backlight (to conserve battery life)

- Icc(max) = 1.0mA

- Iee(max) = 1.8mA

- 8-bit parallel data bus with five control signals

- built-in Samsung KS0108 controller

- 10kOhm potentiometer for contrast adjustment

5. Buttons

- POWER button (push-on/push-off)

- TAP button (momentary)

- UP button (momentary)

- DOWN button (momentary)

- momentary switches debounced in software

6. Microcontroller

- PIC18F2515

- 28-pin package

- 25 general purpose I/Os (including I2C)

- Vcc = 2.0-5.5V

- Icc(max) = 40mA

- four timer modules

- 25MHz operation

- 10 channel 10-bit ADC

- in-circuit programming

- 48kB Flash program memory

- 4kB RAM

- internal pull-ups for momentary switch inputs

7. Packaging and Mounting

- overall dimensions: 100mm wide by 77mm high by 40mm deep

- two-piece case constructed from aluminum billet

- detachable mounting bracket:

- attaches via two pivot points and one thumb screw

- mounts to drum shell via 3M DualLock recloseable two-piece fasteners

J.E.Gifford Page 1 5/11/2006