# Forum: Analog Circuits Maximize longevity of Raspberry Pi and controllable fan

Rate this post
 • ▲ useful ▼ not useful
Hi, I am a total novice here, I hope I've chosen the correct category. I
have 3 questions, but I guess all of them are easily answerable for
I have a Raspberry Pi with constant output of 5 V and controllable
outputs of 3.3 V. I want to install a fan with DC 5 V and 0.10 A.
I would like to
1) limit inrush current
2) enable switching the fan on and off using a controllable 3.3 V GPIO
3) prevent unwanted voltages when the fan is switched off

I wondered what the best options are to achieve this.
- ad 1, I thought maybe a current regulation diode will do. As far as I
know, I could use an NTC or a resistor + relais, but, depending on how
I'll program the 3.3 V GPIO it might switch on and off often. I think
the NTC won't limit the current when switching off and on shortly after.
An it is not good for a relais to switch so often; also, I introduce
another coil that can induce voltages. Is this correct?
- ad 2, I could choose from NPN, MOSFET, or other transistor typed.
Which type (or model, if you happen to know) would be suited to use 3.3
V DC to switch on the 5 V DC current? I assume I'll need a resistor at
the base?
- ad 3) how can I prevent the motor from destroying the transistor when
it is switched off? Will a simple diode parallel to the fan motor do?

Rate this post
 • ▲ useful ▼ not useful
Manu wrote:
> I have a Raspberry Pi with constant output of 5 V

Which exact model do you have? Because there can be different types and
models of 5VDC voltage regulator, with different current capabilites and
exact protection schemes. Also there can be diff. typed and differently
sized (geometry and also capacitance) blocking capacitors to address it.

Maybe it simply isn't necessary to add an inrush current protection for

> a fan with DC 5 V and 0.10 A

Further question: Do you want to switch on the fan

--(maybe you simply don't know that there are many alternatives)--

- as described, with a "3.3VDC-to-5VDC level shifting circuit + high
side switch" (the latter can be a small p-channel mosfet or pnp bjt),
what maybe is also available integrated (all in a package)?

- by default, when powering the board (this could be possible, if no
inrush protection at all is required, by simply connecting it at the
5VDC output of the voltage reg)?

- and vary its speed by PWM?

And it could (or would) be necessary to name the specific type of fan.

• $formula (LaTeX syntax)$