1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/mirrors_trending-WLED

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Это зеркальный репозиторий, синхронизируется ежедневно с исходного репозитория.
Клонировать/Скачать
Внести вклад в разработку кода
Синхронизировать код
Отмена
Подсказка: Поскольку Git не поддерживает пустые директории, создание директории приведёт к созданию пустого файла .keep.
Loading...
readme.md

PWM fan

v2 Usermod to to control PWM fan with RPM feedback and temperature control

This usermod requires the Dallas Temperature usermod to obtain temperature information. If it's not available, the fan will run at 100% speed. If the fan does not have tachometer (RPM) output you can set the tachometer-pin to -1 to disable that feature.

You can also set the threshold temperature at which fan runs at lowest speed. If the measured temperature is 3°C greater than the threshold temperature, the fan will run at 100%.

If the tachometer is supported, the current speed (in RPM) will be displayed on the WLED Info page.

Installation

Add the compile-time option -D USERMOD_PWM_FAN to your platformio.ini (or platformio_override.ini) or use #define USERMOD_PWM_FAN in myconfig.h. You will also need -D USERMOD_DALLASTEMPERATURE.

Define Your Options

All of the parameters are configured during run-time using Usermods settings page. This includes:

  • PWM output pin (can be configured at compile time -D PWM_PIN=xx)
  • tachometer input pin (can be configured at compile time -D TACHO_PIN=xx)
  • sampling frequency in seconds
  • threshold temperature in degrees Celsius

NOTE: You may also need to tweak Dallas Temperature usermod sampling frequency to match PWM fan sampling frequency.

PlatformIO requirements

No special requirements.

Control PWM fan speed using JSON API

e.g. you can use {"PWM-fan":{"speed":30,"lock":true}} to lock fan speed to 30 percent of maximum. (replace 30 with an arbitrary value between 0 and 100) If you include speed property you can set fan speed as a percentage (%) of maximum speed. If you include lock property you can lock (true) or unlock (false) the fan speed. If the fan speed is unlocked, it will revert to temperature controlled speed on the next update cycle. Once fan speed is locked it will remain so until it is unlocked by the next API call.

Change Log

2021-10

  • First public release 2022-05
  • Added JSON API call to allow changing of speed

Комментарий ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://gitlife.ru/oschina-mirror/mirrors_trending-WLED.git
git@gitlife.ru:oschina-mirror/mirrors_trending-WLED.git
oschina-mirror
mirrors_trending-WLED
mirrors_trending-WLED
main