How to control fan with Blynk?

I have two things:

  1. ESP-32 Board
  2. Two Wire (black and white wire) Fan which i took out from my cooling pad controlled via USB power
    Specification on the box of cooling pad:
    i) Voltage 5V DC
    ii) Fan Speed(adjustable) 750-1500rpm
    iii) Power Input 2W
    iv) Curent: 0.4(MAX)

So here are my questions:

  1. Can i connect my fan to my board because it is 5V and esp-32 can provide 5V
  2. How i will connect two wires of fan with my esp32 board
  3. How i will control fan speed with Blynk

Thanks Blynk.

  1. NOT directly (even if it is a low current fan), use a transistor/mosfet circuit (Google for that)

  2. See #1

  3. Most likely PWM will work with the proper circuit. But for that in the ESP32 you need to use some different code as the ESP32 Arduino Core doesn’t support analogWrite() yet. Check out this link for a bit more info…

1 Like

Thanks for your help.
I googled to use transistor with my fan and i think it is idea of some kind of switch and i have to provide external power source.
So how i will connect these 4 things

  1. Arduino
  2. Two wire fan
  3. Transistor
  4. External 5v Supply

The physical hookup is not what we teach here in the forum… the Internet for full of actual tutorials for that.

Besides, the actual controlling code will not be Blynk itself, rather … well Arduino code similar to what I have shown… then once you know that it all works with your code, then Blynk can be added in for the GUI interface… that part we can help teach.