Skip to content

Latest commit

 

History

History
225 lines (185 loc) · 6.84 KB

README.adoc

File metadata and controls

225 lines (185 loc) · 6.84 KB

ATtiny85 PWM Fan Controller

PWM fan controller for the ATtiny85 written in Rust. This fan controller just sets the fan speed to 40% speed to reduce noise from the Noctua NF-P12 redux-1700 PWM Fan.

ATTiny85 PWM Fan Controller Protoboard Top View

ATTiny85 PWM Fan Controller Protoboard Side View

ATTiny85 PWM Fan Controller Protoboard Top Angle View

Hardware

How it Works

This is a dead-simple PWM fan controller that simply lowers the speed of the Noctua NF-P12 redux-1700 PWM Fan to a quiescent 40% speed. The microcontroller simply sets the fan speed and then does nothing. Since the ATtiny85 is a 5V microcontroller and the Noctua fan uses 5V logic, no logic-level shifter is necessary. The ATtiny85 draws 2.17 mA of current in this particular configuration. The fan setup might evolve in the future to take into account temperature sensing and dynamic speed adjustment.

Circuit

  1. Gently place the ATtiny85 in the breadboard.

  2. Connect pin #4 to ground.

  3. Attach pin #8 to 5V.

  4. Wire pin #5 on the ATtiny85 to the 4th pin on the Noctua fan header. This should be the pin opposite the one attached to ground on the fan header.

  5. Connect the following pins on the ATtiny85 to the associated pins on the 6-pin ISP breakout.

    ATtiny85 pin ISP Breakout pin

    1

    RST

    4

    GND

    5

    MOSI

    6

    MISO

    7

    SCK

    8

    VCC

  6. Set the USB µISP’s slider to 5V to power the ATtiny85 microcontroller for testing.

  7. Attach the USB µISP programmer to the 6-pin ISP breakout board.

  8. Connect the 12V power supply to the 2nd pin in the fan header, the one immediately next to ground.

Program

  1. Install rustup.

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Install the AVR GCC toolchain, AVR Libc, and avrdude.

    sudo dnf -y install avr-gcc avr-libc avrdude
  3. Install cargo-binutils.

    cargo install cargo-binutils
  4. Install the LLVM tools preview Rust component for cargo-binutils.

    rustup component add llvm-tools-preview
  5. Clone the repository.

    git clone https://github.com/jwillikers/pwm-fan-controller.git
  6. Change to the project’s directory.

    cd pwm-fan-controller/boards/attiny85
  7. Build the executable.

    cargo build
  8. Convert the executable to the file pwm.hex in the Intel hex format.

    cargo objcopy -- -O ihex pwm.hex
  9. Flash the pwm.hex file on the ATtiny85 with avrdude.

    avrdude -c USBtiny -B 4 -p attiny85 -U flash:w:pwm.hex:i

Todo

  • Add GitHub CI actions.

  • Add pre-commit hooks?

  • Include pictures in README.

  • Add a wiring diagram.

  • Describe using the USB-C breakout.

  • Measure power consumption.

  • Investigate lowering power consumption.

Contributing

Contributions in the form of issues, feedback, and even pull requests are welcome. Make sure to adhere to the project’s Code of Conduct.

Open Source Software

This project is built on the hard work of countless open source contributors. Several of these projects are enumerated below.

Code of Conduct

Refer to the project’s Code of Conduct for details.

License

Licensed under either of

at your option.

© 2022-2024 Jordan Williams

Authors