I partially solved the problem with a voltage reducer module
but it’s not convenient because I have a severe disability and I need to get help to change the speed every time
I already have a wemos d1 mini and thought it would be awesome if I could use it to control fan speed via home assistant
If it was working with that “manual” PWM controller, you likely can do it with d1 mini as well. But you need mosfet driver or motor driver module as well.
actually I don’t have any preference because honestly I don’t even know what those are. I live in Iran and I have limited options
these are available in an online shop
I use it at a very low speed. fan speed is related to the mA it’s going to use .right? I mean 800mA is enough for powering the fan at low speed
it’s a cheap Chinese fan so no manual/datasheet but it think I can know the wattage using a multimetere . I soon ask my friend to help me get it
that was exaxty the idea I thought of at first but because I have very little information about Electronics I can’t understand how it works
in my case, using a usb fan, should I provide different voltage to each relay? or d1 mini somehow does that? how exactly does it change the speed?
I could find Dual MOSFET Switch Module (hw-517) you suggested and for a quick test I used the code below :
int motorPin =5;// pin to connect to motor module
int mSpeed = 0;// variable to hold speed value
int mStep = 15;// increment/decrement step for PWM motor speed
void setup() {
// Robojax.com demo
pinMode(motorPin,OUTPUT);// set mtorPin as output
Serial.begin(9600);// initialize serial motor
Serial.println("Robojax Demo");
}
void loop() {
// Robojax.com tutorial
analogWrite(motorPin, mSpeed);// send mSpeed value to motor
Serial.print("Speed: ");
Serial.println(mSpeed);// print mSpeed value on Serial monitor (click on Tools->Serial Monitor)
mSpeed = 100;
}
it works ok at higher speed but in lower speed there is a loud squeaking buzz coming from the fan motor
is there anyway to fix that?
I think I made a big mistake, considering I know almost nothing about yaml and esphome, I installed it on my esp8266 and now I can’t go back program it via arduino ide
I’m reading and watching youtube videos and wrote some code but still couldn’t make it to work .
Initially I need to be able to control fan speed, three levels, 10% and 50% and 100%
if it’s not to much to ask, could you please write that code for me?