July 11, 2020, 01:15:13 pm


Have you visited the Allwinner Chipset wiki? - http://linux-sunxi.org/

Powering a cooling fan

Started by rckburn, January 08, 2014, 01:01:21 am

Previous topic - Next topic


January 08, 2014, 01:01:21 am Last Edit: January 08, 2014, 01:19:50 am by rckburn
Very simple question form a noob who doesn't know one i/o pin from the next. I am looking to plug in a fan. Where would I plug the wires in so that it will turn on? All I need to know is the number associated with the two pins I would be using, but having the numbers of all the pins that would do the job would be helpful. Also, can I send more or less power to these pins so i can control the airflow? I am trying to make spin speed based on the CPUs frequency in order to always keep the device at a set temperature, but also save as much power as possible by spinning slower when intense cooling is not needed.

Edit: Before anyone asks, or says "You don't need a cooling fan!" Yes I am overclocked, and have need for such cooling as I do not like the heat that the CPU puts off when running at 1.4 G


January 08, 2014, 02:15:18 am #1 Last Edit: January 08, 2014, 02:17:30 am by Jojo

in your case two solutions seem useful:

1. you take a 5V-fan that has an PWM pin for speed control. Then you connect the supply cabels to board-5V and board-GND. The PWM pin has to be wired to a GPIO with PWM functionality. Then you write your software that sets the duty cycle in dependence to the CPU speed.

2. you take a fan that can directly be controlled with PWM (without a PWM pin, just supply). BUT: many BLDC fans are known NOT to be really good for that purpose. The you take a small mosfet and put it in the supply branch of the fan. Then you connect the gate of the mosfet to the PMW GPIO already mentioned in 1. . Write your software :) .

Of course, there are many many more possible solutions, but these two seem good to me ;) .

Good luck!
Don't think that anyone will take more pains for his answer, as you took for your question.


Thank you for the quick reply! Both options 1 and 2 seem a little out of my league in terms of speed controlling the fan, though I will surely use them for future reference when i have the skill level required to. In regards to using the 5v port, I have a HDD mounted so that is in use already, and it is not removable as i have my root filesystem mounted on it. The schematics I downloaded from the official Cubieboard website might as well be written in Chinese for all the good they do me. So, with that said, if you could point me in the direction of where I would just simply plug in the fans wires to make it spin, that would be sufficient for now. I was under the impression that the four pins sticking up from the middle of the board near the cpu could be routed to a usb type connection, could I potentially use those to solve my problem?


Hi again!

Well, the complicated thing is, that the CPU is not able to supply enough current for driving loads like a fan. So you have to "amplifie" the current by a transistor. But where is the problem with solution 1?

The 4-pin-header near the CPU is for serial communication (RX and TX). The "power" lines there are only 3,3V and GND.

What schematic did you look at?! As you can see here
and here
you can get easy access to +5V via the expansion headers. Since the pin numbers are not really clearly on the wiki page, you can take a look in the schematic to see that there are +5V on the expansion header U14.43 and U15.1 . The GND pins could be U14.9 or U15.25 . But please have a look by yourself. I might have twisted pin numbers  :o .

If there are questions, please ask :) .

Don't think that anyone will take more pains for his answer, as you took for your question.


Thank you for the links to those schematics, the ones I was looking at were not from the Google page, but from here http://dl.cubieboard.org/hardware/cubieboard_schematic_2012-08-08.pdf and here http://ubuntuone.com/52QFl1FUCrAJ26KopIkR1w. They look like garbage compared to the clear layout of the ones you have a link to. I will try to see if I can get a working solution, and update on what I used to get the best result. Thank you so much for your help so far, I will comment back if I have any further questions.