Skip to content

Releases: moffa90/python-emc2305

v1.2.1

25 Nov 20:33

Choose a tag to compare

Bug Fix

  • Fix stopped fan detection - EMC2305 returns near-max tach count (~1022) when no tach signal is detected. Added TACH_COUNT_STOPPED_THRESHOLD to correctly return 0 RPM for stopped fans.

Installation

pip install microchip-emc2305==1.2.1

v1.2.0

25 Nov 20:20

Choose a tag to compare

Changes

  • Fix RPM calculation formula - Add missing (edges-1) factor to numerator
  • Apply 3-bit right shift to TACH register values (bits 7:3 contain the count)
  • Add TACH_COUNT_LOW_SHIFT constant for register handling
  • Comprehensive tachometer documentation in CLAUDE.md and README.md
  • New USER_GUIDE.md with complete usage instructions

Tachometer Configuration

Fan Type Pulses/Rev edges Setting
1-pole 1 edges=3
2-pole 2 edges=5
3-pole 3 edges=7
4-pole 4 edges=9

Installation

pip install microchip-emc2305==1.2.0

v1.1.0

25 Nov 19:01

Choose a tag to compare

What's Changed

Added

  • set_pwm_output_mode() - Configure PWM output as open-drain or push-pull per channel
  • set_all_pwm_output_mode() - Configure PWM output mode for all channels at once
  • get_pwm_output_mode() - Read current PWM output mode for a channel
  • set_pwm_polarity() - Configure PWM polarity (normal/inverted) per channel
  • get_pwm_polarity() - Read current PWM polarity for a channel
  • MIN_VALID_RPM_READING constant (200 RPM) for tachometer noise filtering

Fixed

  • Critical: PWM output mode register (0x2B) logic was inverted. Per datasheet: 0=open-drain (default), 1=push-pull. Previous implementation had this backwards.
  • RPM readings below 200 RPM now return 0 (filters tachometer noise when fan is stopped)

Installation

pip install microchip-emc2305==1.1.0

Full Changelog: v1.0.0...v1.1.0

v1.0.0 - First Stable Release

25 Nov 17:09

Choose a tag to compare

microchip-emc2305 v1.0.0

First stable release of the Python driver for Microchip EMC2305 5-channel PWM fan controller.

Features

  • 5 independent PWM channels - Control up to 5 fans simultaneously
  • Dual control modes:
    • PWM Mode: Direct duty cycle control (0-100%)
    • FSC Mode: Closed-loop RPM control with hardware PID
  • Per-fan PWM frequency - Individual frequency control per channel
  • RPM monitoring - Real-time tachometer reading
  • Fault detection - Stall, spin failure, aging fan detection
  • SMBus Alert (ALERT#) - Hardware interrupt support
  • Software configuration lock - Protect settings in production
  • Cross-process I2C locking - Safe multi-process access
  • Thread-safe operation - Concurrent access protection

Installation

pip install microchip-emc2305

# With YAML config support
pip install microchip-emc2305[config]

Supported Platforms

  • Linux with I2C support
  • Raspberry Pi, Banana Pi, and other embedded Linux systems
  • Python 3.9+

Documentation

See the README for full documentation and examples.