Pico Powered DC Fan Driver
Hello everyone and welcome back.
So here's something cool: a 5V to 12V DC motor driver based around a Raspberry Pi Pico Board and a couple of electronic components.
The Raspberry Pi Pico is the heart of this project.
In order to drive the DC motor load, we have integrated the AO4406 N-channel Mosfet IC, a high-power Mosfet used in SMPS for fast switching purposes. Its Vds is 30V and it can withstand a maximum of 13A of current.
In a future project, we will use this arrangement in a PC project to control the DC fan through the Motor Driver Board. For now, we are utilizing a 12V PC fan as a test load.
As for the workings of this motor driver board, it has a few modes.
The load operates at 255 duty cycles on the first tap. The load will operate at 140 duty cycles with the second tap, and it will be turned off on the third press.
This article is about the complete construction of this motor driver board, so let's get started with the build.
Materials Required
These were the materials used in this project:
- Custom PCB
- AO4406 N-channel Mosfet IC
- 10K Resistor
- Raspberry Pi Pico
- AMS1117 3.3V
- 10uF 1206 Capacitor
- 1uF 1206 Capacitor
- SMD push button
- M7 Diode
- DC Fan 12V
- 12V Power source
PCB DESIGN
The schematic, which is divided into three sections—the AMS1117 part, the Raspberry Pi Pico portion, and the Mosfet as switch setup—is the first stage in the PCB design process.
The A04406 Mosfet, a N channel High power Mosfet IC in an SOIC8 package, is what we utilized for this project. Its source is connected to GND, its drain is attached to a CON2 port, and its other end is connected to 12V from the input side. This CON2 will be used to connect the load, in our case a 12V DC fan. The Mosfet gate is connected in series with GPIO0 via a 10K resistor.
The second section includes the AMS1117 setup, which is primarily the AMS1117 minimal setup with a 10uF CAP at the AMS1117's input and a 1uF CAP at the output. Between the input VCC and the AMS1117's input, we add an M7 diode to reduce excessive power coming from the input side.
Additionally, we added an LED that will function as an indicator and is in series with the input side via a 1K resistor.
The Raspberry Pi Pico is located in the third section. It is paired with a toggle switch that is linked to both GPIO1 and GND. When the switch is pressed, GPIO1 is connected to GND.
After setting up the schematic, we export the netlist and convert the schematic into a board file.
We model a 24 x 80 mm outline in the layout, and we arrange all of the SMD parts, with the switch in the center, on the top side. The Pico is positioned on the bottom side.
The board was finalized and then send to PCBWAY for samples.
PCBWAY
After completing the PCB design, we export the gerber data and send it to PCBWAY for samples.
An order was placed for a yellow soldermask and white silkscreen.
After placing the order, I received the PCBs within a week, and the PCB quality was pretty great. The silkscreen I used is completely random and asymmetrical, so it's pretty hard to make, but they did an awesome job of making this PCB with no errors whatsoever.
You guys can check out PCBWAY if you want great PCB service at an affordable rate.
PCB ASSEMBLY
- Using a solder paste dispensing needle, we first add solder paste to each component pad individually to begin the PCB assembly process. In this instance, we are using standard 37/63 solder paste.
- Next, we pick and place all the SMD components in their places on the PCB using an ESD tweezer.
- With extreme caution, we lifted the complete circuit board and placed it on the SMT hotplate, which increases the PCB's temperature to the point at which the solder paste melts and all of the components are connected to their pads.
- Next, we add the PICO on the bottom side of the PCB using a soldering iron.
- The Board is now complete.
FAN ASSEMBLY
- In order to supply 12V to the circuit, we first connect the DC Barrel jack on the input side of the board.
- Next, we used a soldering iron to install the DC 12V Fan to the load side.
- The setup is now ready to be tested but before that, let's have a look at the code.
CODE
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); } }
- The loop continuously checks the state of the switch using digitalRead.
- If the switch is pressed (LOW), it increments the MotorMode variable. When MotorMode reaches 4, it resets to 1.
- Depending on the value of MotorMode, different actions are taken:
- If MotorMode is 1, the motor is turned on (HIGH) for 300 milliseconds.
- If MotorMode is 2, PWM is used to control the motor speed (analogWrite with a value of 140) for 300 milliseconds.
- If MotorMode is 3, the motor is turned off (LOW) for 300 milliseconds.
This code essentially cycles through three different modes of motor operation each time the switch is pressed.
After uploading the code to the PICO, we use the DC Barrel Jack to plug the 12V adaptor into the board.
RESULT
Here's the result of this simple build- A working Motor Driver running a 12V PC Fan through a Raspberry Pi Pico connected with an AO4406 Mosfet IC.
The first tap activates the setup; the second drives the motor to run at 140 duty cycle; and the third tap deactivates the load. This is a continuous process.
The initial code is capable of including more modes, making modifications incredibly simple.
This driver can be used to power a wide range of DC loads, such as a solonoid, an array of LEDs, pumps, and other devices that run on a 5–12V voltage. It can also be used to power any type of motor that runs on 12V.
I will be using this project in an upcoming PC Project so stay tuned for that.
Leave a comment if you need any help regarding this project. This is it for today, folks.
Thanks to PCBWAY for supporting this project.
You guys can check them out if you need great PCB and stencil service for less cost and great quality.
And I'll be back with a new project pretty soon!
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);
}
}
Pico Powered DC Fan Driver
*PCBWay community is a sharing platform. We are not responsible for any design issues and parameter issues (board thickness, surface finish, etc.) you choose.
- Comments(0)
- Likes(0)
- 0 USER VOTES
- YOUR VOTE 0.00 0.00
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
More by Arnov Arnov sharma
- WALKPi PCB Version Greetings everyone and welcome back, This is the WalkPi, a homebrew audio player that plays music fr...
- Delete Button XL Greetings everyone and welcome back, and here's something fun and useful.In essence, the Delete Butt...
- Arduino Retro Game Controller Greetings everyone and welcome back. Here's something fun.The Arduino Retro Game Controller was buil...
- Super Power Buck Converter Greetings everyone and welcome back!Here's something powerful, The SUPER POWER BUCK CONVERTER BOARD ...
- Pocket Temp Meter Greetings and welcome back.So here's something portable and useful: the Pocket TEMP Meter project.As...
- Pico Powered DC Fan Driver Hello everyone and welcome back.So here's something cool: a 5V to 12V DC motor driver based around a...
- Mini Solar Light Project with a Twist Greetings.This is the Cube Light, a Small and compact cube-shaped emergency solar light that boasts ...
- PALPi V5 Handheld Retro Game Console Hey, Guys what's up?So this is PALPi which is a Raspberry Pi Zero W Based Handheld Retro Game Consol...
- DIY Thermometer with TTGO T Display and DS18B20 Greetings.So this is the DIY Thermometer made entirely from scratch using a TTGO T display board and...
- Motion Trigger Circuit with and without Microcontroller GreetingsHere's a tutorial on how to use an HC-SR505 PIR Module with and without a microcontroller t...
- Motor Driver Board Atmega328PU and HC01 Hey, what's up folks here's something super cool and useful if you're making a basic Robot Setup, A ...
- Power Block Hey Everyone what's up!So this is Power block, a DIY UPS that can be used to power a bunch of 5V Ope...
- Goku PCB Badge V2 Hey everyone what's up!So here's something SUPER cool, A PCB Board themed after Goku from Dragon Bal...
- RGB Mixinator V2 Hey Everyone how you doin!So here's a fun little project that utilizes an Arduino Nano, THE MIXINATO...
- Gengar PCB Art Hey guys and how you doing!So this is the GENGAR PCB Badge or a Blinky Board which is based around 5...
- R2D2 Mini Edition So here's something special, A Mini R2D2 PCB that speaks ASTROMECH.Astromech is a fictional language...
- C-3PO Blinky Board Hey guys and how you doing!So this is the C3P0 PCB Badge or a Blinky Board which is based around 555...
- WALKPi Breadboard Version Greetings everyone and welcome back, Here's something loud and musical.Similar to a traditional walk...
-
-
kmMiniSchield MIDI I/O - IN/OUT/THROUGH MIDI extension for kmMidiMini
74 0 0 -
DIY Laser Power Meter with Arduino
86 0 2 -
-
-
Box & Bolt, 3D Printed Cardboard Crafting Tools
120 0 2 -
-
A DIY Soldering Station Perfect for Learning (Floppy Soldering Station 3.0)
416 0 1 -
Custom Mechanic Keyboard - STM32
243 0 3