Interfacing a 12v siren to a arduino UNO

Hello,

I am working on a project of security alarm system using a PIR sensor. I wanted to connect a siren to a arduino UNO i have selected pin no 4 as output to the siren , I have used BC547 transistor for switching a siren ON when the motion is sensed , the code for the project is also working fine, i have tested using led instead of siren everything works fine.

when i connect the siren the siren starts to sound continuously it should work only when the output of pin 4 is HIGH .

The siren used is 12V ,300mA.

I have connected the siren between to 12V supply and emitter of transistor and to the the base the output of pin no 4 is given. the collector is connected to to the ground of 12v supply.

d to the the base the output of pin no 4 is given.

No resistor?
It needs to go through about 1K before it gets to the base.
Have you connected the -ve of the 12V power supply to the ground of the arduino?

I have used 220 Ohm resistor but it only reduces the sound

I have used BC547 transistor

The siren used is 12V ,300mA.

The maximum current for that transistor is 100mA. So it is not big enough, it is probable broken.

actually i first used the gnd of arduino but it wasn't helpfull so i directly took it from the connector which comes on the arduino

I don't think it is broken because when i switched back to led it works fine again

JairajDange:
actually i first used the gnd of arduino but it wasn't helpfull so i directly took it from the connector which comes on the arduino

I don't understand that. You NEED it to have a common ground.

JairajDange:
I don't think it is broken because when i switched back to led it works fine again

You are trying to put too much current through it, if it is not broken it is damaged. It can not work correctly with the load you have.

What solution do you think should be done ? or which transistor should be used ?

Draw us a simple schematic with Arduino output and ground and also the siren and its power supply.

I don't know how to add a schematic to forum

Click attachements at the bottom of the reply window...

The R1 is connected to pin 4 of uno instead of led a 12v siren is used . the emitter is connected to the ground of 12v .

rcorr:
Draw us a simple schematic with Arduino output and ground and also the siren and its power supply.

In what way does that show the Arduino and ground and the power supply.

As it stands that LED is round the wrong way and there is no current limiting resistor.

Actually i showed only how i have connected siren instead of led when i connect siren instead of with a current limiting resistor it only reduces the amplitude of sound. the 12v supply i have taken from the connector which is present on the arduino uno.

I don't understand what more you want from this thread. Get a proper transistor and try again.
It is pointless giving you a type because I don't know where you are or what are available to you.

As i am using a 12v adapter i have taken directly 12v from the board and used it on the breadboard.

As shown in the image red dot is +12v and Black dot is -12v or ground

board.png

I think you are not up to asking for help yet because you seem incapable of understanding it and responding correctly to any questions.

Please read the how to use this forum sticky post.