If you only want to turn it On or Off then use a relay, speed control can be done with a Mosfet and PWM and the H-Bridge that Daryl suggested will give you reversal of direction of air flow (if the blower supports that)
At least 6A. The cold start current of the motor will be higher. I used something like this H-Bridge for a Halloween prop where a battery powered drill motor was used to twitch a dragon’s tail.
Hey @stevemann , I’ve just bought the board you suggested in attempt to control some 80w DC fans and struggling with it bogging down when I set the speed over 89%.
As the board doesn’t have 2 directional pins, I’ve set it up as an gpio for the directional and pwm for the pwm but it just doesn’t seem happy. I also get different speed behaviours when running the different directions.
This is my esphome config. Could you possibly give me some pointers or share the code you used for your setup? Thanks very much!
Looking at your Arduino code, you’re pulling the direction high and low which I believe is as I’m doing.
Then you’re sending a pwm for a fast paced and slow which whilst mine is spread over 0 to 100 percent, it’s basically the same.
I did wonder about the frequency, anything lower than 20k and I get the expected digital noise from the motor which I’ve come to learn is expected at those lower ends. I must say I’m not sure what the specs of the board are, I’m not overly sure where to look to get them.
I do find it odd that the speed reacts differently on when changing ghe direction of the motor and keeping the frequency the same.
I’m just a little lost on the next steps to make it work.
I can think of several reasons for this. I would guess that the shape of the PWM waveform isn’t symmetrical. I recall that when working with a prop a few years ago, reverse wasn’t as fast as forward. But nothing was overheating and the speed did not have to be symmetrical.
Ah ok, much the same as the OP this is for fan control so I wanted as much throughput both ways.
So you suggesting that when the direction is set, it’s modifying the waveform further to achieve the reversed polarity?
I guess I really need to be using 2 relays to flip to polarity after the output of the board to maintain the same speeds then?
Do you have any ideas why it would be bogging down after 89%? I have 12v input to the board and on the output it gets up to 10.9v on the motor output at 89% then gradually drops back to 7v the further past 87% that I get?
Ah! I see, you were wondering if it was capable of the load. Yeah, I did think that too, the fan is supposedly rated at 80w 12v so around 6.6amps, however it’s just the high 6 amps for the hard start then levels off at around 3amps when up to speed. I was using a 5amp 12v supply initially when using a a manual speed controller pwm to DC and it was fine as long as I didn’t start it at 100%.
I switched out to this beast of a PSU before I posted as I wondered if it was to do with it being incapable of the load in this configuration.
I want to be able to control the fans with home assistant as I want them be engaging automatically based on the environment temp. I may just go with some relays to switch the polarity off the output. A bit more involved in terms of components but I really want to have the flexibility of full pelt in both directions.
Not intentionally. I doubt that the builder of the bord was concerned with matching the power mosfets. The forward mosfet could be a little faster than the reverse mosfet. The Vgs is not likely the same for the mosfets- one may turn on earlier than the others.
In the H-Bridge, in the forward direction, the PWM signal turns on Q1 and Q4. Remember that the PWM signal is a square wave and the speed of the motor is determined by the PWM Duty Cycle:
If you replace the H-bridge with a DPDT relay, you would effectively have a 100% duty cycle. If the forward and reverse performance of the fan is different using a relay, or switches, the issue is with your fan.
I just had another thought. Swap the +/- wires from the motor. If the directional anomaly doesn’t change, then the motor is the problem.
That’s the first thing to verify when you have voltage going down while increasing power. Another thing I could think is that those motor drivers usually have quite big voltage drop. Maybe your motor is not happy with that 10V at high pwm. If you are using atx PSU there is usually trimpot inside to increase voltage little bit.
Or you could use those 2-ch relay modules, not increasing component count.
So after a fair amount of messing around but refusing to give up, I actually worked out a solution.
In the lower end speeds I would get the audible noise on the motor with any frequencies from 0-20khz so I thought bumping the frequency to 25k+ was the solution. Sure it solved the noice but I’d constantly have the drop off in the higher speeds.
For some ignorant reason, I tried the lower frequencies with the lower speeds and didn’t think to try insanely low frequencies in the high end until I made a mistake in my code which set the frequency to the speed step percent so 100% also became 100hz, all at the same time, instead of trying to be nice to my power supply and setup and easy the power up using the slider in HA, I hit the power button causing a hard start at 100%.
What followed was a full speed, full 12v, no noise, no interference smooth run of the fan. I played around a little and backed the speed off until I got the digital sound interference from the motor and noted that as 70%, and my spot to switch over to the much higher frequencies. Now I just have a simple if speed setting below 70%, use 25khz, else use 100hz and it all works pretty much perfectly.
I want to optimise it a little more as I’ve played around with calculating the frequency based on the speed percent as I’m still getting a little hopping around on the speed at the 70% switch over but it’s working almost perfectly with the directional options too.
Once I have it sat nicely, I’ll post the esphome yank config for others if ever useful.
Thanks @stevemann and @Karosm for you input and help. You both ultimately steered me to a solution!
I’ll post the tidied up code over the coming days.