Editor Version ×
Standard

1.Easy to use and quick to get started

2.The process supports design scales of 300 devices or 1000 pads

3.Supports simple circuit simulation

4.For students, teachers, creators

Profession

1.Brand new interactions and interfaces

2.Smooth support for design sizes of over 5,000 devices or 10,000 pads

3.More rigorous design constraints, more standardized processes

4.For enterprises, more professional users

Ongoing

STD ATtiny10 / DS18B20 Fan Controller

License: Public Domain

Mode: Editors' pick

  • 1.6k
  • 0
  • 3
Update time: 2024-01-29 11:38:37
Creation time: 2022-02-06 23:24:56
Description

Features


Intelligent 2- 3- 4-wire Fan Controller based on ATtiny10.

 

  • Uses DS18B20 digital temperature sensor.
  • Automatically detects the presence of PWM control (4th fan wire).
  • Operates in On/Off or PWM mode.
  • Step-down DC-DC converter for fan power supply (up to 18 V at the input).
  • 25 kHz PWM.
  • Rotation control with an attempt to restart in case of rotor stop.

 

The controller regulates the fan speed using PWM, and the full PWM range (0 - 100%) fits into the temperature range of 25°C - 40°C. In the case of connecting a fan without PWM control or without a speed sensor (2- 3-wire fans), the control is carried out for a temperature threshold of 30°C: if sensor's temperature below this limit, then a logical 0 is set at the 6th pin of the chip, and if higher, then 1. This pin is used to control the EN pin of the DC-DC converter.

The module was designed to improve the cooling efficiency of various household and professional equipment.
See the detailed review of the project on my YT-channel (English subtitles): https://youtu.be/6zM7jxHXjjU

 

Details

 

To power the module, two sources will be required: 5V and Vfan = 4-18V.

For MCU Flash ROM programming you will need a USBasp programmer (or any other that supports the TPI - Tiny Programming Interface), which is connected according to this schematic:The programming itself is performed from the Arduino IDE, with the ATtiny10 core installed in it (see the links below).


Please note that by default, the 6th pin of the microcontroller is used for the RESET signal (active level is low). To use this pin as a GPIO pin, you must rewrite the microcontroller's fuses (see the commands below). After you do this, you will no longer be able to flash the chip with a regular programmer. To program such a chip, you'll need 12V to be applied to the RESET pin.

 

Also note that the code is written for the MCU clock frequency of 10 MHz. This means that in the Arduino IDE, in the Tools->Clock menu, you should set the value to 8MHz, and then preferably calibrate the value of the OSCCAL register in the code for your specific exemplar of the chip. This can be done, for example, by measuring the duration of the 1-wire reset pulse using an oscilloscope. Its duration should be as close as possible to 480 microseconds.

 

Links

 

Code - https://github.com/DmitryMuravyev/ATtiny10-DS18B20-Fan-Controller

Datasheet ATtiny4-5-9-10 - http://ww1.microchip.com/downloads/en/DeviceDoc/atmel-8127-avr-8-bit-microcontroller-attiny4-attiny5-attiny9-attiny10_datasheet.pdf

Tips and Tricks to Optimize Code for 8-bit AVR - https://ww1.microchip.com/downloads/en/AppNotes/doc8453.pdf

Datasheet DS18B20 - https://datasheets.maximintegrated.com/en/ds/DS18B20.pdf

1-Wire protocol (Book of iButton standards) - https://pdfserv.maximintegrated.com/en/an/AN937.pdf

USBasp firmware - https://www.fischl.de/usbasp/

USBasp firmware update guide - https://www.electronics-lab.com/project/usbasp-firmware-update-guide/

ATtiny10Core for Arduino IDE - https://github.com/technoblogy/attiny10core

Programming the ATtiny10 - http://www.technoblogy.com/show?1YQY

ATtiny10 Thermometer - http://www.technoblogy.com/show?2G8A

 

Commands

 

Fuse programming (0xFE - set RSTDISBL bit):
 avrdude -C ..\etc\avrdude.conf -c usbasp -P usb -b 115200 -p attiny10 -v -U fuse:w:0xFE:m 

 

Fuse reset:
 avrdude -C ..\etc\avrdude.conf -c usbasp -P usb -b 115200 -p attiny10 -v -x section_config -e 

 

Components

 

DS18B20 Temperature Sensor - https://ali.ski/Alu_j-

SMD Capacitor Sample Book - https://ali.ski/l-lE9

SMD Resistor Sample Book  - https://ali.ski/6YxlCV

KF2510 3+1P Fan connector - https://ali.ski/kyrey

 

Design Drawing
schematic diagram
1 /
PCB
1 /
The preview image was not generated, please save it again in the editor.
Project Members
Target complaint
Related Projects
Change a batch
Loading...
Add to album ×

Loading...

reminder ×

Do you need to add this project to the album?

服务时间

周一至周五 9:00~18:00
  • 0755 - 2382 4495
  • 153 6159 2675

服务时间

周一至周五 9:00~18:00
  • 立创EDA微信号

    easyeda

  • QQ交流群

    664186054

  • 立创EDA公众号

    lceda-cn