Skip to content

rusaakkmods/TinyPulse-Display

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

rMODS TinyPulse Display

ATtiny85-based BPM Monitor Pod for MIDI BytePulse

Overview

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.

Features

  • 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

Hardware Requirements

Core Components

  • 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

Pin Connections

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

J101 Interface (optional header)

Pin Signal Description
1 +5V Power supply (50-80mA)
2 GND Ground
3 CLK_IN Clock pulse input (1 PPQN, 5V logic)

Software Architecture

Modules

  1. 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
  2. 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
  3. Main - Simple event-driven coordinator

    • Callback-based architecture
    • No blocking delays
    • Auto mode switching (IDLE ↔ BPM)

Memory Usage

  • Flash: 53.5% (4,382 bytes / 8,192 bytes)
  • RAM: 25.0% (128 bytes / 512 bytes)
  • Libraries: AceTMI, AceSegment

Building and Uploading

PlatformIO

# 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 fuses

Configuration

Edit 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)

Usage with MIDI BytePulse

  1. Connect power (5V) and ground to TinyPulse
  2. Connect BytePulse DISPLAY_CLK (pin 4) to TinyPulse CLOCK_IN (PB3)
  3. Power on
  4. TinyPulse shows boot animation, then enters idle mode
  5. When BytePulse receives MIDI clocks, TinyPulse displays BPM with running decimal
  6. When clocks stop, TinyPulse returns to idle animation after 2-second timeout

Standalone Usage

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

Troubleshooting

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

License

See LICENSE file in parent repository.

Credits

Part of the rMODS (rusaakkmods) MIDI BytePulse ecosystem.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors