Skip to content

Latest commit

 

History

History
238 lines (195 loc) · 9.77 KB

README.adoc

File metadata and controls

238 lines (195 loc) · 9.77 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

ATTiny85 PWM Fan Controller Breadboard Top View 1

ATTiny85 PWM Fan Controller Breadboard Top View 2

ATTiny85 PWM Fan Controller Breadboard Side View 1

ATTiny85 PWM Fan Controller Breadboard Side View 2

Hardware

All the hardware components in my particular build are enumerated here.

The compact protoboard omits the AVR breadboard adapter, incorporates a socket to ensconce the ATtiny85, and adds a DC/DC converter along with an electrolytic capacitor to convert 12V power down to 5V for the ATtiny85.

Unfortunately, the small protoboard doesn’t make it possible to program the ATtiny85 directly, unlike the breadboard circuit. So, you’ll still need to put together something for that. That can be pretty easily accomplished by using the breadboard layout with only the necessary components to program the ATtiny85. These components are enumerated separately below.

Programming will also require a USB-C cable and a computer, of course. If you don’t already have one, you’ll probably want a fan, too. This circuit is meant for a 12V fan. I use this controller for the Noctua NF-P12 redux-1700 PWM Fan.

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 shifting is necessary. The ATtiny85 draws 1.61 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.

Permissions

  1. Create a udev rule to allow access to the USB µISP programmer without requiring root access.

    /etc/udev/rules.d/60-USBmicroISP.rules
    SUBSYSTEM=="usb", ATTR{product}=="USBmicroISP", ATTR{idProduct}=="0c9f", ATTRS{idVendor}=="1781", TAG+="uaccess"
  2. Unplug the probe, and plug it back in for the new udev rule to take effect.

Develop

  1. Change to the board’s directory.

    cd pwm-fan-controller/boards/attiny85
  2. Connect the USB µISP to your computer.

  3. Build and flash the executable.

    nix run ../..#attiny85.flash.avrdude

Todo

  • 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