Microcontroller PWM Controller: A Design Based on ATtiny25 and MOSFET

I recently designed a PWM controller based on a microcontroller and MOSFET, which can control high-current loads. It’s a bit like a PWM controller based on a 555 timer, but now using a microcontroller and MOSFET instead of a 555 IC and transistor.

I made two versions, one with acceleration and deceleration switches, and another with a potentiometer. The controller uses an ATtiny25 microcontroller, running at 31.25KHz (8MHz internal RC/256 prescaler), powered by 3.3V. I used an STP36NF06L MOSFET, with a maximum 0.045Rds and 2.5Vgs, which is suitable for 3.3V power supply. The MOSFET produces only ~180mW of heat at 2A, which doesn’t require a heat sink.

In the circuit diagram, if using a 5V power supply, R1 should be changed from 100R to 150R to keep the current below 40mA. Zener diodes D1 and D2 are used for ESD protection, requiring a voltage rating above the uC power supply voltage and below the maximum gate voltage of the MOSFET. The STP36NF06L MOSFET can easily switch ~8A, but requires some heat sinks. The potentiometer selection also needs to consider the microcontroller ADC reading and current consumption.

Update – July 10, 2013

I recently designed a new SMD version, using an ATtiny5/10 microcontroller and DMG6968U MOSFET (with built-in Zener diodes for ESD protection), which can switch 2-3A without any issues.

Downloads

LATESTfanController_20130710.zip (203 KB)
fanController_20130710.zip
MD5: 4C794E8C2CAB0CE65C79DDAF65E04CC2
OLDfanController_20120803.zip (179.94 KB)
fanController_20120803.zip
MD5: A862B6D96A8FCF6A0CE9C9DF90B749EB
OLDfanController_20120802.zip (179.69 KB)
fanController_20120802.zip
MD5: 680379F31E75CB81A86E62E2B5727786
OLDfanController_20120729.zip (179.02 KB)
fanController_20120729.zip
MD5: C0BDAD5FBF993473E65380AFB7F87193