Releases: moffa90/python-emc2305
Releases · moffa90/python-emc2305
v1.2.1
v1.2.0
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_SHIFTconstant 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.0v1.1.0
What's Changed
Added
set_pwm_output_mode()- Configure PWM output as open-drain or push-pull per channelset_all_pwm_output_mode()- Configure PWM output mode for all channels at onceget_pwm_output_mode()- Read current PWM output mode for a channelset_pwm_polarity()- Configure PWM polarity (normal/inverted) per channelget_pwm_polarity()- Read current PWM polarity for a channelMIN_VALID_RPM_READINGconstant (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.0Full Changelog: v1.0.0...v1.1.0
v1.0.0 - First Stable Release
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.