Arnov Sharma
Published © MIT

Pico Powered DC Fan Driver

Made a Raspberry Pi Pico powered DC 12V-5V FAN Driver

BeginnerFull instructions provided1 hour130
Pico Powered DC Fan Driver

Things used in this project

Hardware components

Raspberry Pi Pico
Raspberry Pi Pico
×1
PCBWay Custom PCB
PCBWay Custom PCB
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Custom parts and enclosures

Circuit FAN Holder

Schematics

SCH

Code

code

C/C++
const int switchPin = 1;  
const int MotorPin = 0; //PWM Pin 
int MotorMode = 1; 

void setup() 
{
    pinMode(MotorPin, OUTPUT);
    pinMode(switchPin, INPUT_PULLUP);
    digitalWrite(MotorPin, LOW);
     
}
void loop()
{ 
    if (digitalRead(switchPin) ==LOW) 
    { 
        MotorMode = MotorMode + 1;
        if (MotorMode == 4)
        {
            MotorMode = 1;
        }
    }
    if (MotorMode == 1)
    {
        digitalWrite(MotorPin, HIGH);
        delay(300);
    }
    else if (MotorMode == 2)
    {
        analogWrite(MotorPin, 140);
        delay(300);
    }
    else if (MotorMode == 3)
    {
        digitalWrite(MotorPin, LOW);
        delay(300);        
    }
   
}

Credits

Arnov Sharma

Arnov Sharma

269 projects • 280 followers
Just your average MAKER

Comments