[ 3 / biz / cgl / ck / diy / fa / ic / jp / lit / sci / vr / vt ] [ index / top / reports ] [ become a patron ] [ status ]
2023-11: Warosu is now out of extended maintenance.

/diy/ - Do It Yourself

Search:


View post   

>> No.801040 [View]
File: 97 KB, 810x954, mosfet.jpg [View same] [iqdb] [saucenao] [google]
801040

Yo.

I'm trying to control a simple 3-pin computer fan using PWM on arduino and a N-MOSFET. I know it can be easily controlled using potentiometer without Arduino or PWM, but I would like to control it remotely.

It kinda works, but if I do analogWrite(0), which means always off, it picks up the pace and rotates faster. analogWrite(255) which is always on, slows down the fan, but doesn't stop.

What am I doing wrong? Why can't I stop the fan completely using PWM and why is analogWrite vice-versa?

Navigation
View posts[+24][+48][+96]