Posts: 2
Joined: Sat Jan 24, 2015 8:41 pm

Powering a 12v motor

Sat Jan 24, 2015 8:48 pm

I have a 12v computer case fan that I wanted to use for a project that uses a temperature sensor, and when it detects a temperature higher than a set value it will turn on the fan, and when it get cool enough it will turn back off. Pretty simple. I already have the temperature sensor set up, and now all I need is to hook up the fan and do some programming. I wanted to use [thisl][/ ... r/overview] guide, but it is for a 6v motor. I have all of the other equipment (except the motor controller) and have checked that the motor controller does support way more than 12v, and was wandering if there is any reason that I can't use a 12v fan with this guide.

BMS Doug
Posts: 4043
Joined: Thu Mar 27, 2014 2:42 pm
Location: London, UK

Re: Powering a 12v motor

Sat Jan 24, 2015 9:51 pm

You certainly can use the guide for a 12v fan.
Building Management Systems Engineer.

Posts: 2
Joined: Sat Jan 24, 2015 8:41 pm

Re: Powering a 12v motor

Sat Jan 24, 2015 10:09 pm

thank you

Posts: 230
Joined: Sun Jan 25, 2015 2:44 pm

Re: Powering a 12v motor

Sun Jan 25, 2015 2:50 pm

If you only need to turn the fan on or off, then just give it 12V or not, i.e. use a relay. There is no need for complicated motor control unless you need to control its speed.
Submarine communication systems engineer and amateur robot enthusiast.

Posts: 118
Joined: Wed Oct 24, 2012 9:15 pm
Location: Cheltenham, UK

Re: Powering a 12v motor

Sun Jan 25, 2015 11:58 pm

Rock, all you need is a power transistor capable of handling the voltage and current that the fan/motor needs and driving it via one of the pulse width generator outputs.

If you drive a 50% duty cycle into the motor driver circuit then the 'average' voltage will be half the supply. Vary the duty cycle to control the speed. You'll need a a simple common emitter configuration and possibly a darlington pair type transistor to keep the necessary base drive current low enough not to tax the Pi output. Worth including a current limit resistor to limit the current from a 3.3v source into the base to give a base current sufficient to drive the transistor full on. You need to know the current gain of the transistor you're using and current you want for the motor plus a bit. A look at the data sheet will tell you typical base currents required. On the face of it current limit (series) resistor is simply R=3.3v/I-base-current. BUT... a darlington needs approaching 1.2volts to overcome the two semiconductor junctions in the two series base/emitter junctions and turn the thing on so R=(3.3-1.2)/i-base-current). A non-darlington transistor would need around 0.6volts to turn on.

Adding a diode across the motor in the collector circuit would help absorb any back emf from the switching. Must be loads of circuits out there for this sort of thing.
Share and Enjoy.

Return to “Automation, sensing and robotics”