Posted March 21, 2017
I want to control a siren speaker (has a built-in driver) with an Arduino.
The siren needs 12V and consumes about 480mA. The Arduino output pin is 5V and can source 40mA maximum.
I would like to use a transistor to switch the siren on and off. Is this an OK application for a transistor? I'd rather not have to use a relay or a SSR because I don't have any on hand.
Based off of those numbers I calculated my load (siren) resistance to be 25 ohms using Ohms law, R=E/I. (I'm using Amps, Volts, and Ohms as units)
12V0.48A=25Ω
12V0.48A=25Ω
I have found various calculations to determine what kind of transistor I need and I'm not quite sure which is the best one. One of them is like this:
hFE(minimum)=5×LoadCurrentArduinoPinMaxCurrent
hFE(minimum)=5×LoadCurrentArduinoPinMaxCurrent
Which gives me a minimum hFEhFE of 60.
5×0.480.04=60
5×0.480.04=60
This is where I get a little confused. I have a few transistors and their datasheets but I'm not quite sure how to read them. I have read many resources and I am just as confused now as before.
I know I should probably use a NPN transistor but would it matter if I use a PNP instead? Do the same calculations apply? I understand that the circuit changes, active high instead of active low, but are there any drawbacks to PNP over NPN?
The NPN's I have are PN2222A(http://www.kynix.com/Detail/232142/PN2222A.html), BC337, BC547B and a BC517 darlington.
The PNP's I have are PN2907, BC327 and a BC516 darlington.
How would I go about choosing the right transistor for the job? I don't want to overload the transistor.
The siren needs 12V and consumes about 480mA. The Arduino output pin is 5V and can source 40mA maximum.
I would like to use a transistor to switch the siren on and off. Is this an OK application for a transistor? I'd rather not have to use a relay or a SSR because I don't have any on hand.
Based off of those numbers I calculated my load (siren) resistance to be 25 ohms using Ohms law, R=E/I. (I'm using Amps, Volts, and Ohms as units)
12V0.48A=25Ω
12V0.48A=25Ω
I have found various calculations to determine what kind of transistor I need and I'm not quite sure which is the best one. One of them is like this:
hFE(minimum)=5×LoadCurrentArduinoPinMaxCurrent
hFE(minimum)=5×LoadCurrentArduinoPinMaxCurrent
Which gives me a minimum hFEhFE of 60.
5×0.480.04=60
5×0.480.04=60
This is where I get a little confused. I have a few transistors and their datasheets but I'm not quite sure how to read them. I have read many resources and I am just as confused now as before.
I know I should probably use a NPN transistor but would it matter if I use a PNP instead? Do the same calculations apply? I understand that the circuit changes, active high instead of active low, but are there any drawbacks to PNP over NPN?
The NPN's I have are PN2222A(http://www.kynix.com/Detail/232142/PN2222A.html), BC337, BC547B and a BC517 darlington.
The PNP's I have are PN2907, BC327 and a BC516 darlington.
How would I go about choosing the right transistor for the job? I don't want to overload the transistor.