DIY Handheld Fan

by Arnov Sharma in Circuits > Arduino

5001 Views, 52 Favorites, 0 Comments

DIY Handheld Fan

DIY HANDHELD FAN 3D printed and custom PCB
28 (17).gif
31 (12).gif
IMG_1790.JPG

Hello Everyone and here's something COOL, a DIY Handheld Fan completely made from scratch.

The goal here was to make a small portable fan that I could use daily when going outside.

I prepared a 3D Printed body and made a custom PCB that holds all the essential electronics on it that drives the main motor, I'm using Micro Brushed DC Motor here which is generally used in Micro Drones, It's loud and super powerful.

As for the brain of this project, I used an Attiny13A to control a Mosfet IC that drives the DC motor.

Its operation is simple, we first turn ON this setup by pressing the ON-OFF Switch.

next, we press the toggle switch to start the FAN.

It has two modes that can be triggered on single and double pressing the toggle switch, on the first press this setup runs at 100% Speed, 50% on the second press, and OFF state on the third press.

This Instructables is gonna be about the whole built process of this Fan, so let's get started.

Supplies

following are materials I used in this project-

  • Custom PCB
  • Attiny13A
  • TP4056
  • AO4406A
  • 10K Resistor 0805 Package
  • M7 Diode SMA
  • 1uF capacitor 1206
  • 1K Resistor 0805 Package
  • RED 0603 LED
  • BLUE 0603 LED
  • ON OFF Switch
  • Toggle switch
  • Type C Port
  • 3D printed body set
  • DC micro brush motor
  • drone fan
  • 10uf 16v capacitor
  • Lithium Cell 3.7V 1200mAh

Basic Concept

IMG_20220616_230928.jpg
33 (9).gif

I started by preparing a simple setup that utilizes an A04406 IC that is connected with a DC Motor that we control via an Arduino Nano by pressing a toggle switch.

I used this setup to create a sample board that uses a Micro Drone motor that is controlled via an Attiny13A and powered by a 3.7V Lithium Cell.

I prepared a 3D model of a handled fan first to hold the motor during testing.

After checking the motor operation and practicality of this setup, I started working on a schematic that will utilize a smaller MCU instead of an Arduino nano.

3D Printed Design

04.PNG
21 (48).gif

First, I prepared a simple 3D Model that consisted of two parts.

The TOP Part holds the motor and MID Part holds the circuit and lithium cell.

Instead of preparing a single model, I divided the design into two main parts and one net that converge the airflow towards the user.

TOP Part holds the motor and has a channel through which motor wires get neatly enclosed, Then there's a MIDDLE part that holds down the TOP Part and NET through screws and the MIDDLE part also holds the electronic circuit with Li-ion battery.

I model the PCB in Fusion360 first and then used its outline measurements to create a PCB design that will control the fan blade.

Schematic

SCH_page-0001 (22).jpg
Image1.jpg
Image80.jpg

Here's the schematic that I prepared and it consist of three parts that include a TP4056 IC Setup for charging Lithium cell properly, an Attiny13A MCU Setup that is the brain of this project, and the A04406 IC Setup that is configured in mosfet as a switch setup for controlling the load which is in our case the DC Motor.

TP4056 contains two indicator LEDs, RED and BLUE, red is for low battery and Blue is for full charging.

I also added a Type C Port for charging input.

Attiny13A is connected with the Gate of A04406 IC through a 10K Resistor, we control motor speed by providing the gate a PWM Signal through the Attiny MCU.

As for Flashing the Attiny, I've added a CON6 Header Pin with ISP Pins of Attiny so I could connect a programmer with it to burn the bootloader and upload code in it.

PCB Design

03.PNG
pcb.PNG

I finalize the Schematic and then converted it into a Board file, then I started working on the PCB File.

As for the shape of the PCB, I used measurements from fusion360 and prepared the board outline first, then I placed all the componenets in their place and connected them all by tracks and shapes from both layers.

At last, I added a few random round shapes (Silkscreen layer) on board to increase its aesthetic as they would look great on the RED soldermask that I will order from PCB Manufacturer.

Getting PCBs From PCBWAY

IMG_20220714_083433.jpg
01 (79).gif
02 (79).gif
03 (75).gif

I finished the PCB Design and exported the Gerber data which I uploaded on PCBWAY's Quote page for placing an order.

I choose RED Soldermask for this project as I already printed stuff with RED PLA and RED PCB Color will complement the aesthetics of the fan, all stuff RED.

I received the PCBs in a super fast week.

As for the quality of the PCBs, I was Blown away by how each board was top-notch and great with no errors whatsoever.

Overall quality was super and I recommend you guys for checking them out if you need great PCB service for less cost.

PCB ASSEMBLY

the PCB Assembly Process will have the following steps.

  • Solder Paste Dispensing
  • Pick & Place Process
  • Hotplate Reflow
  • THT Components

Solder Paste Dispensing Process

04 (79).gif
IMG_20220714_191944.jpg

The first step is to apply solder paste to each component pad.

We use Regular Sn-Pb solder paste that has a melting temp of 140 to 270 °C.

Pick and Place Process

05 (78).gif
IMG_20220714_192509.jpg

I then used an ESD Tweeaser to carefully pick and place each SMD component in their assigned place one by one which took like 30 Seconds tops but the result was a perfect PCB with all the components placed in their location.

Hotplate Reflow

06 (76).gif
IMG_20220714_193744.jpg

After the "PICK & Place Process", I carefully lifted the whole circuit board and place it on my DIY SMT Hotplate which is also homemade just like this project.

After a Few mins when the hotplate reaches the Solderpaste melting TEMP, all the components will get soldered by this Hot Reflow process.

THT Components

07 (79).gif
08 (74).gif
09 (70).gif

In the end, we add THT Components to the PCB. (Switch, Button, and capacitor)

Flashing Attiny13A With Main Sketch

05.PNG
01.PNG
02.PNG

Attiny13A is an AVR MCU that can be flashed via an ISP Programmer like USBASP, or we can make a simple ISP Programmer by using an Arduino Uno or Nano board.

  • We go to Example sketches> Arduino as ISP and upload it into the Arduino Nano board.
  • Next, we add a 1uf Capacitor between RST and GND Pin, this will stop Arduino to reset during the flashing process (Add capacitor after uploading the Arduino as ISP Sketch)
  • Now go to this link and download the Attiny13 Core files- https://github.com/MCUdude/MicroCore
  • Next, we wire Attiny13A's SPI Pins with Arduino Pins according to the attached wiring diagram.
  • we then go to tools and change the MCU and choose Attiny13.
  • We select the right port and change the programmer to "Arduino as ISP"
  • Next, we click on Burn Bootloader, if the wiring is correct, you will see a "Done burning Bootloader" message.
  • At Last, we go to the sketch menu and select "upload using programmer" and the board will get flashed with the sketch which was opened at that moment.

Main Code and Arduino As ISP

10 (76).gif
11 (76).gif

For flashing the MCU, I used my existing AVR Flasher which is an Arduino Nano that runs Arduino as ISP Sketch.

To connect the programmer with Attiny's SPI Pins, I used a makeshift Header pin socket that connects the SPI Pins of Attiny with Arduino Nano.

Here's the main code I used-

const int switchPin = 4; 
const int FANPin = 0;
int FANMode = 1; 

void setup() 
{
    pinMode(FANPin, OUTPUT);
    pinMode(switchPin, INPUT_PULLUP);
    digitalWrite(FANPin, LOW);
     
}
void loop()
{ 
    if (digitalRead(switchPin) ==LOW) 
    { 
        FANMode = FANMode + 1;
        if (FANMode == 4)
        {
            FANMode = 1;
        }
    }
    if (FANMode == 1)
    {
        digitalWrite(FANPin, LOW);
        delay(200);
    }
    else if (FANMode == 2)
    {
        digitalWrite(FANPin, HIGH);
        delay(200);
    }
    else if (FANMode == 3)
    {
        analogWrite(FANPin, 50);
        delay(200);        
    }
    //delay(200); // see text
}

Adding Lithium Cell

12 (71).gif
13 (73).gif
14 (64).gif

Next, we add a battery connector UC2515 to the circuit and then solder it with its pads.

We then connect a 3.7V 1200mAh Lithium Cell with the circuit so we can test the output and a few other things in the next step.

Testing the Board

15 (65).gif
34 (8).gif
35 (8).gif

Next, we turn ON the main switch and then measure the voltage across the Diodes connected with the motor and the GND of the battery.

We get 3.6V which is the accurate voltage for driving the Micro DC Motor.

As for another test, we check if the TP4056 is working or not by plugging in a charger. RED LED glows and keeps glowing for a while, RED LED Turns off and Blue LED starts glowing when the battery voltage reaches 4.2V which means the battery is charged and the TP4056 was working properly.

Adding Motor to TOP Part and Final Checking of Circuit

22 (40).gif
16 (62).gif
17 (61).gif
18 (58).gif

Next, we add the Micro Motor to the 3D printed TOP body by placing the motor in its place.

To test if this setup was working or not, I added the Motor with the circuit temporarily by soldering its wires to the connector on PCB.

Then I checked the working by first turning the circuit ON by pressing the main switch, we then click once on the push button.

On the first Tap motor runs at 100% Speed, the second Tap reduces the speed by 50% and the third tap turns OFF the motor completely.

Assembly Process

23 (36).gif
24 (33).gif
25 (29).gif
26 (27).gif
27 (21).gif

After testing the board working, we move on to the next and final step which is to put together the fan.

  • We first place the wires of the motor in the MID Body and then add the TOP Part and MID Body together by using screws from the bottom side.
  • Next, we place the Net in its place and use two screws to hold it in its place as well.
  • Then we solder motor wires with circuit and then connect Lithium cell to circuit
  • Next, we place the circuit in its place and secure it with three screws that hold the circuit and battery in their place, and the assembly is completed.

Result

DIY HANDHELD FAN 3D printed and custom PCB
29 (15).gif
31 (12).gif
32 (10).gif

Here's the result of this built, a working handheld DC Fan that works!

It's loud and super awesome, also practical as well. We can take it outside and counter heat with it.

This is the first and final edition of this project, so far I haven't encountered any problem with it but if anything does come up then I'll start work on V2 of this project.

Till then, stay tuned. Special thanks to PCBWAY for supporting this project, do check them out for getting great PCB Service for less cost.

Peace out