ATtiny85-based BPM Monitor Pod for MIDI BytePulse
TinyPulse Display is a standalone BPM monitor module for the MIDI BytePulse system. It receives clock pulses (1 PPQN) from BytePulse's dedicated DISPLAY_CLK output and displays real-time BPM on a 4-digit 7-segment display. Simple, accurate, and autonomous.
- Accurate BPM Calculation - Measures intervals over 4 beats (3 beat intervals)
- TM1637 4-Digit Display - Shows 0-999 BPM with running decimal point
- Running Decimal Point - Indicates beat position (0-3) within measure
- Boot Animation - Segment chase, decimal scan, and flash on startup
- Idle Animation - Chaotic pattern when no clock detected
- Clock-Only Architecture - No MIDI parsing, simplified operation
- Autonomous Operation - Self-contained BPM calculation from clock pulses
- Low Power - ~50-80mA total (display + MCU)
- Compact Design - ATtiny85 DIP-8 package
- ATtiny85 (DIP-8, 8MHz internal oscillator)
- TM1637 4-digit 7-segment display module
- Resistors: 100Ω (2x for display), 1kΩ (1x for clock input), 1.8kΩ (optional for LED)
- Decoupling capacitors
| ATtiny85 Pin | Function | Connected To |
|---|---|---|
| PB0 (pin 5) | TM1637_DIO | Display DIO |
| PB1 (pin 6) | TM1637_CLK | Display CLK |
| PB2 (pin 7) | Reserved | Future expansion |
| PB3 (pin 2) | CLOCK_IN | Clock input (INT0) |
| PB4 (pin 3) | BEAT_LED | 24 PPQN LED output |
| PB5 (pin 1) | RESET | Programming header |
| Pin | Signal | Description |
|---|---|---|
| 1 | +5V | Power supply (50-80mA) |
| 2 | GND | Ground |
| 3 | CLK_IN | Clock pulse input (1 PPQN, 5V logic) |
-
ClockMonitor - Measures clock pulse intervals and calculates BPM
- Interrupt-driven pulse capture (INT0 on PB3)
- 4-beat measurement window (3 intervals)
- Formula:
BPM = 180000 / interval_ms - Timeout detection (2 seconds) for idle mode
- 24 PPQN LED pulse generation
-
DisplayController - TM1637 display driver
- BPM rendering (right-aligned, 0-999)
- Running decimal point (beat position 0-3)
- Boot animation (segment chase + decimal scan + flash)
- Idle animation (chaotic pattern)
- Non-blocking 100ms update intervals
-
Main - Simple event-driven coordinator
- Callback-based architecture
- No blocking delays
- Auto mode switching (IDLE ↔ BPM)
- Flash: 53.5% (4,382 bytes / 8,192 bytes)
- RAM: 25.0% (128 bytes / 512 bytes)
- Libraries: AceTMI, AceSegment
# Build firmware
pio run -e attiny85
# Upload via USBtinyISP
pio run -e attiny85 -t upload
# Set fuses (8MHz internal, BOD disabled)
pio run -e attiny85 -t fusesEdit include/config.h to customize:
- Display brightness (0-7, default: 2)
- BPM update threshold (default: ±2)
- Clock timeout (default: 2000ms)
- Display update interval (default: 100ms)
- Connect power (5V) and ground to TinyPulse
- Connect BytePulse DISPLAY_CLK (pin 4) to TinyPulse CLOCK_IN (PB3)
- Power on
- TinyPulse shows boot animation, then enters idle mode
- When BytePulse receives MIDI clocks, TinyPulse displays BPM with running decimal
- When clocks stop, TinyPulse returns to idle animation after 2-second timeout
TinyPulse works with any clock source providing:
- 5V power supply
- Clean ground reference
- 1 PPQN clock pulses (5V logic level, 5ms width)
- Examples: Eurorack clock dividers, drum machines, sequencers
Display not lighting up:
- Check 5V power supply
- Verify TM1637 module connections (DIO/CLK)
- Check brightness setting in config.h
BPM not updating:
- Verify clock pulses on CLOCK_IN (PB3)
- Ensure clock source provides 1 PPQN (1 pulse per quarter note)
- Check for stable 5V logic levels on clock input
- Verify 2-second timeout hasn't triggered
Wrong BPM displayed:
- Confirm clock source is exactly 1 PPQN (not 24 PPQN)
- Check BPM formula: 180000 / interval_ms
- Verify clean clock edges (no bouncing)
Decimal point not moving:
- Check that clock pulses are continuous
- Verify beatPosition callback is working
- Ensure display update interval is set to 100ms
See LICENSE file in parent repository.
Part of the rMODS (rusaakkmods) MIDI BytePulse ecosystem.