Lost my confidence with building a circuit

Ok, the problem:

RasPi and cooling fan. (OLD SCHOOL WAY)

SKU: CE09435

I want to turn a fan ON/OFF with this.
Driving the fan directly won’t/can’t work with a RasPi.

Ideally the FET sinks the current from the fan.

So from the + rail, it is:
Fan, FET, GND. (with flyback diode in there around the … FET?)

I send the 3.3v signal to the signal pin and all should be good - in a perfect world.

But when I am looking at it and testing things with my DMM it looks wrong!

The V+ and the VIN pins have 0 ohms between them.

I don’t want to kill my RasPi, or anything else to be honest.

It also kind of annoys me that the signal input is as it is.
But that’s a mechanical problem.

This is what I believe is needing to be done.

I’m stupid. I admit it.
But could someone please double check me on what I am doing please.
(Basic version of the wiring.)

I get that there are 5 inputs if you count them as the 2 screw terminals for the load and then the 3 PIN connections for control. But I’m not sure what goes where.

1 Like

Hi Andrew
The flyback diode should be across the fan. That is if it is a brushed fan motor. Brushless I am not sure about. Maybe someone with brushless experience could jump in here and advise.
You should have about 1kΩ resistor in series between Mosfet Gate and GPIO pin.

If those pin signals on the right of your diagram are supposed to correspond to the green connections reading from top to bottom they are hopelessly wrong. When you say “connections on the board” what board are you referring to. A diagram showing everything as you have connected would be very helpful. As it stands it leaves a lot of questions.
Cheers Bob

1 Like

Hey Rob.

No the Brown names were there to show the names on the board.
I was/am wanting to confirm where they are in the scheme of things.

The connectors on the board I mean this board. Sorry.

So is this better?
Names also attempted.

1 Like

Hi Andrew
That looks better. Makes some sense.

Still does not tell me what “this board” is. But no matter this arrangement should work. I am assuming that “V+” and “V-” relate to the fan. If it relates to the board as a whole and “V-” is connected to “Gnd” then it would cause the fan to run full speed with no control.

Exactly what is that Mosfet. Is it already on this “Board”. If so the diode should already have been in the correct place.

Will this particular Mosfet switch with a 3.3V signal from the GPIO??

Complete information please. Can’t go on guessing.
Cheers Bob

1 Like

“This board”:

Core electronics:
SKU: CE09435

1 Like

Hi Andrew
Like a lot of other things no useful information at all. The only thing is this

  • Logic control voltage: 5V
    which leads me to think that if your GPIO is only 3.3V it will not be enough to switch the Mosfet.

I personally won’t purchase anything that does not provide enough information to allow me to assess if the device will do the job I require or not. The other way is to purchase one and “reverse engineer” it to produce my own circuit. Only if I am desperate which in this case I am not.
Cheers Bob
PS: Don’t even get a picture showing the screen print on the screw terminals.

1 Like


This is why I am asking.

I got tricked that it is 5v logic and RasPi is 3v logic. :frowning:

If I put the GPIO through a 3.3v to 5v level converter first?

1 Like

Hi Andrew
I understand your frustration. Personally I try to stick with 5V. When developing a circuit and start to add up all the little voltage drops like across diodes, transistors, LEDs etc it doesn’t take long to run out of volts with only 3.3V available to start with.

The level converter would fix the logic level problem but it tends to get messier and as I said I try to stay away from it.

Don’t forger all the Grounds have to be connected together for any of this logic to work.
Cheers Bob



Food for thought.

It is just the Pi does need a fan, but it doesn’t need it on 100% of the time.

I’m working on how to turn the fan ON/OFF from the Pi’s GPIO pins.

1 Like

Hi Andrew

I believe others have done just that.

Maybe one of these people could jump in here
Cheers Bob


Hi Andrew,

Motor coils are longer coils of copper wire so a reading near 0 is expected, if you supply the fan 5V straight from the supply does it spin?

Would it be possible to send through a photo of your circuit? (Instead of the diagram)

From the diagrams your circuit looks good, its just the logic voltage to turn on the MOSFET, if you connect that to 5V does the fan start spinning?

This board works at 3.3V: MOSFET Power Switch Module | Core Electronics Australia

Do you also have a link to the fan you are using? Most PC fans include a PWM input

1 Like

Hi Liam…
Do you know if 3.3v on the input would turn it on completely?
(Sorry, was in robot mode… I didn’t read your reply completely.)

That is on that board with nothing connected.
I am just wanting to be sure about what is what on the board.
Could you (would you mind) showing me on the circuit I posted where the names are?

It would be nicer if the actual schematic was available.
Though it isn’t rocket science: two components basically.

Ummm… That is the design of the circuit at this stage.
The fan is the one you guys sell…


1 Like

Hi Liam
R your product link.
Once again very little real info is available but on this one at least the Mosfet types are published.
BUT I would question the operation with 3.3V logic. The following published graph for that Mosfet would throw some doubt on this.
This graph is a screen shot straight from the data sheet. I might add that sheet quotes gate source voltage of 10V for the published figures.

I still fail to see why people put a product up with obvious borderline performance at 3.3V then go on to say it will operate at 3.3V implying that ALL units will do this. Probably some will but I would not bet that ALL are 3.3V compatible.
Cheers Bob


Hi Andrew,

The CE09435 (red module) wont turn on, but the CE09733 (blue) will come on, I’m unsure how much but Bob looks into it in his response. Core would have done some testing to determine that one.

Sorry could you please clarify what you mean by this?

Would it be possible to get a photo? The physical connections show a much better story a lot of the time.

Bob and I are keen members of the public, Core staff have shields next to their names

Very fair, I’ve heard Core mention some parts are ‘cheap and cheerful’ I’d say this is one of them.

It may not be obvious, what isn’t mentioned on the product page is the methods Core might have used.
Checking the datasheet, sampling a batch (or multiple), asking the supplier - just a couple of the ways that information might be gathered.

Certainly better than some listings on other stores: https://www.amazon.com/IRF520-MOSFET-Driver-Driving-Arduino/dp/B07D3PZQ7P
Good discussion on the Arduino forum: IRF520 MosFET not a good choice for Arduino use. - General Electronics - Arduino Forum

While these modules ought to work, either of them shouldn’t come past an engineer seriously outside of the prototyping phase. For Hobbyist makers


I guess in Bob’s defense I was talking about the RED one…
And now it is determined I need the BLUE one.

I am drawing the circuit on paper. I then transposed that to the sketch at the top.

And as you can see I goofed where I put the diode.

The RED is the 5v from the Pi.
The ORANGE is a GPIO pin to turn on the fan.

To confirm
This is the one which will work:

The fan:
Sorry, so I posted a link with the one I have.

Sorry, my fault… Again, I really need to whack myself before posting.
I got confused when typing.
Please don’t worry about this.
I shall accept full accountability for messing that part up.

1 Like

Hi Liam
Just had a look at that Arduino Forum link. It just reinforces my statements about using Mosfets in the “might work most of the time” grey area region then marketing as if they will work all of the time.

I don’t agree entirely with the statement that Arduino will not drive these devices reliably. There are what is called “logic level” Mosfets which are designed to operate with 5V. Note “logic level” is 5V NOT 3.3V. I think that the impression that Arduino will not drive properly is due to the Gate capacitance which can be quite large sometimes, more than 1nF in some casesThis will be a short circuit at switch on and Arduino will struggle with this. The simple solution is to insert a current limiting resistor in series with the gate, only requires 1 or 2 kΩ.

This has the adverse effect of slowing down the switching time which will increase heating at high currents. Where this has to be avoided a resistor of about 10Ω is used and the gate cap driven with a transistor circuit or indeed there are ICs especially designed and marketed as Mosfet drivers. I have a couple but can’t remember what the numbers are at the moment. These are designed to source and sink multiple Amperes for short periods (switching time).

This high “inrush” charging current has to be handled by the discharge as well when the Mosfet is switched off. The transistor or IC driving circuit has to absorb (or sink) this discharge current as well.

Unfortunately with these breakout boards which seem to be designed for Arduino or Pi use appear to have overlooked this limiting resistor and not provided it on the board. A serious oversight I think. Or some mention of this requirement in the product description would help. Or maybe the designers of these boards are not fully aware of the Mosfet characteristics. Read the data sheets. this capacitance value is always quoted. With reputable brands anyway as it is most important.

This capacitance can be a problem if trying to drive a Mosfet with a logic level converter. Should be OK with a OP Amp based converter but with the common simpler types using Mosfets to switch the voltages the gate will be driven via something like a 10kΩ or larger resistor. If switching any appreciable current this slowing down of the switching time due to the 10kΩ could cause real problems with heating.
Cheers Bob

1 Like

Hi Andrew,

Another option you could look into is an off the shelf option that we stock Pimoroni Fan SHIM for Raspberry Pi. While it is definitely a bit more expensive than the mosfet board you’ve got, it would get you over the line and keep your project on track. :slight_smile:


1 Like

@Dan The Pimoroni Fan SHIM is a good idea, poorly implemented.
It would have been a good solution for what I needed except it uses the I2C SCL pin and the TX/RX UART pins. Both interfaces I was using in my project.


Hi Jim,

Sorry to hear that the Pimoroni fan isn’t quite suited to your use case, we definitely have other offerings available but sadly they lack the ability to modulate the fans speed, and would always be running.

1 Like

And as good as it is, it is sometimes nice to actually build something.

Just now my budget is somewhat limited in what I can buy.

1 Like