12 volt fan speed control


Hi Folks

I have been doing some research on the forum, but can´t really find any solution for this.
Setup: Rpi 3 B, Debian Jessie, MyDevices, hooked up with 4 relays, a light sensor and 2 temperature sensors. System will be running on a romote location off a 12 volt solar system.
The room needs to be ventilated with a 12v fan (computer fan w/pwr output). I need a fan that can move some air, so powering off the Rpi is no option.
Is there any way of ontrolling the 12v fan rpm via the Cayenne dashboard? What kind of electronics would I need? It would involve regulateing the 11.5-15v up or down from, let´s say 4v to 12 v, thereby increasing or decreasing the speed.
I have a Arduion motor shield ( https://www.adafruit.com/products/1438 ). Can this be used with the Pi to control the fan on/off and fan speed. In that case, where can I find the apropriate code, working with a slider i Cayenne dashboard?

Very greatfull for help on this one.



Hello @ivar, as I am not able to answer you exactly the question, you can see this post here

First Identify your Fan. As I read in the network, the four wires fan are more difficult to control, as also brushless fans.


The problem with most fans is that you really need that 12V to get it moving. This is why I wouldn’t recommend equating voltage to speed.

A better way to do this is by using a PWM output on the Arduino through a transistor to your fan. That way the fan is always getting 12V pulses, but you vary the duty cycle to adjust speed.

You can certainly use your motor shield instead of a transistor. A fan is a motor :stuck_out_tongue:

You can use the Arduino PWM example, and just use your motor shield instead of an LED. https://www.arduino.cc/en/Tutorial/PWM




Thanks @ognqn.chikov and @kreggly
I will be connecting the motor shield.
So next stage, is to get the Pi talking with the shield, Then get Cayenne to set up a nice slider, talking to the shield through Pi. Any idea where I get the code, integrate it up ang get spinning.



Look at my Smoker or Jukebox project…