BC517 Transistor to operate a 12V fan

Hello,

I'm engaged in this project where I want to switch on a fan whenever the humidity in a room crosses a threshold.
My main issue here is that I have never user a transistor.

I believe the BC517 Darlington one is very suitable to drive this 12V/.6A fan from a pin of my uC/arduino.

The problem is that while I have a vague understanding of what a transistor is supposed to do, I am quite hopeless when trying to make it work.

The issue is that I clearly don't understand how should I wire my circuit. Probably I'm having trouble even identifying the correct pins of the transistor. So far, I have been counting them as in this order: collector, base and emitter, viewed from where the flat side of the transistor is facing me (you'll excuse my being naive here). Collector goes to +12V, base goes to some resistor connected to the arduino pin, and emitter goes to + of the fan, while the ground of the fan goes, well, to ground.
When playing with this configuration (=replacing the arduino pin with a potentiometer), apparently I got to spin the fan at what seemed close to 12V, to then witness the transistor start smoking real bad -> and that's when I turned to this forum :slight_smile:

So basically I would like to know if I'm doing the wiring wrong and what resistor should I choose to be able to modulate a 0-5V signal in and obtain a 0-12V out. Also, it'd be even greater if someone could explain me how to calculate this.

Here is a -excuse me again for this monstruosity- picture to explain.

Imgur

Thank you to whomever will help me understand a bit more.

edit: switch off -> switch on

Oh. Should I perhaps flip the transistor before trying anything else?
I guess so.

Here's the datasheet btw http://www.sunsphere.co.uk/datasheet/bc517.pdf

you wired it as an emitter follower - it didn't saturate the transistor -> too much power dissipated -> magic smoke

you should instead wire it as common emitter, that means that +12V is connected to one side of the load, which other side is connected to the collector.
the transistor emitter goes to GND and the base is like you did : connected to a resistor, which other side goes to arduino output .

instead of the BC517, which has a high Vce Sat value (1,4V), you should find a transistor with an Ic of about 1A continuous and a low Vce Sat.
I've read here that the ZTX851 is OK ( and its datasheet confirms that :wink: )

have a look here for a schematic example (there are a lot of them on the net :wink: ) :
http://hyperphysics.phy-astr.gsu.edu/hbase/electronic/transwitch.html#c4

(you won't connect the base resistor to the +, but to the arduino output)

don't forget a reverse diode across the fan motor, like here : Transistors | Arduino Lesson 13. DC Motors | Adafruit Learning System

hth :slight_smile:

Thank for your answer.

Can you please elaborate a bit more oin some parts?
You say this BC517 has a high Vce Sat Value of 1.4V. But how is this too high when I have 5V coming out of Arduino?
Also, what is the diode for?

It has nothing to do with the 5V from the arduino .VceSat is the voltage between collector and emitter when the transistor saturates.
If the Collector-Emitter voltage is 1,4V , then the remaining voltage for the fan is 12-1,4 = 10,6 V .
And the power dissipated in the transistor is 1,4x0,6 = 0,84W
It will work, but it's not the best choice

About the diode, to make it simple, when the power is disconnected from an inductive load, there is a high reverse voltage across the inductance. This doesn't last long, but it can be very high and destroy other components. The diode limits this voltage peaks and thus protects the components.

Ok I'm starting to understand. And to understand that I didn't understand anything about transistors.
Can you explain me how did you calculate the CE saturation voltage under my conditions? I see that on the datasheet they show a different value, under different test conditions.

Thank you for your help so far.

sorry, I made a mistake in reading the VCE(Sat) for the BC517 , it will be less than that.
If you look at Fig.9 (the Ic=500mA curve) , you can see that VCE(Sat) is less than 1V if Ib > 60µA
Fig.10 shows a VCE(Sat)curve for Ic/Ib = 1000 . It stops at IC = 500mA with VCE(Sat) =0,9V but the curve
rises quickly, IMO, it will be about 1V if IC=600mA and Ib = 0.6mA and won't change a lot if Ib increases .

Let's suppose Ic = 600mA , VCE(Sat) = 1V --> power = 0,6W ! You reach the maximum rating of 625mW at 25°C

Edit : and remember that darlingtons are designed to give a high current gain (you don't need that here :wink: ) , but they are not very good as switches
(they are slower to switch than simple transistors)

I'm sorry but I lost you completely here. Fig.9 and 10 of which document?
I'm sure that it's because it's late here but I don't understand were to look these figures for.

Also, can you tell me what is wrong with a circuit built like this? :

Imgur

for fig.9 and fig.10 , the document is the bc517 datasheet

about the circuit ... hmmm it won't work : the 5V batteries are connected "-" to "-" , that won't make a 10V !
if you need 10V and you have 2x5V , then the "-" of the 1st battery will be the GND, the "+" will be connected to the "-" of the 2nd battery, the + of this 2nd battery will be +10V .

-[bat1]+-[bat2]+
GND 10V

also, the base shouldn't be always connected to the "+" .
And, what is the adjustable resistor for ? We want the transistor ON or OFF, a switch is enough.
if you want to control the current in the motor, it is a little more complicated :wink:
have a better look to the links I posted before, I'm sure you'll understand.

I meant to have to power sources, one 5V and one 12V, to share the ground.
I don't know which bc517 datasheet are you looking at. The one I posted up here has only 4 figures :o

the datasheet is there : https://www.google.com/url?q=http://www.onsemi.com/pub/Collateral/BC517-D.PDF&sa=U&ei=RVpDUtKmKcig4gT3noHICA&ved=0CAoQFjAB&client=internal-uds-cse&usg=AFQjCNEY1pMRp9SpNh-JzLKr0utaqqsfLg

if you need 2 power sources, say 5V and 10V, you must connect the batteries like that :