control a 12V/1A siren?

I need to use an arduino output pin to control a 12V/1A siren (I'm not sure it's 1A yet, but it's unlikely more)

I have one restriction... the "siren controller board" has the following inputs:

  1. arduino's output pin
  2. arduino's power supply GND
  3. another power supply +12V
  4. another power supply GND
    (it wouldn't be simple to grab arduino's power supply +5V too... to activate a relay, for instance)

would an optoisolator be my best choice?

Well, the 4 connections you're describing are the only connections to a DC solid-state relay. No board required (unless you want to put it on one and not solder right to the pins).

An optoisolator solution would work too though would need a secondary driver on the isolated side, like a MOSFET or BJT, because optoisolators are not designed to carry 1A of current. So probably a cheaper solution, but more parts and more design.

Your call.

The Quick Shield: breakout all 28 pins to quick-connect terminals

thanks for the answer!

I'm afraid I won't be able to find a cheap SSR where I live, so I have a couple questions:

  1. in case I do it with a MOSFET, I'd need to connect the grounds of the 5V and 12V power supply, wouldn't I? is it dangerous?

  2. is MOC3020 a valid substitute for the SSR, even though I want to power a using 12VDC siren (and not an AC circuit)?

If you do use a MOSFET, you need to connect the grounds together, unless you want to keep them isolated. You can use an optoisolator in that case to keep the grounds separated.

It is not dangerous to connect grounds together, but switching large currents can cause "ground bounce" on the Arduino if you do not wire the grounds properly (i.e., keep the high current power traces separate from the low current power traces). Ground bounce can cause the Arduino to reset itself when you switch the siren on.

A MOC3020 is not a valid subsitute for an SSR at the current levels you are working with (1A). It is only designed to carry a few milliamps on the output side.

The Gadget Shield: accelerometer, RGB LED, IR transmit/receive, light sensor, potentiometers, pushbuttons

Maybe I just didn't read the whole conversation carefully enough, but why isn't this just a dirt-simple transistor switching application?

I was afraid to connect the 5V and 12V grounds together
but if it isn't a problem, I guess a NPN which can handle 1A would solve the problem

practicing my mspaint habilities:

If you don't need isolation then you can just use a transistor, but you need to put the load on the collector ("high") side rather than at the emitter pin.

Here's a basic circuit for using a MOSFET to control your siren (it's for a fan but it will work just as well for any DC load):

The MOSFET will dissipate less power than a transistor at 1A.

Need a custom shield? Let us design and build one for you.

I just checked and SSR are too expensive here (the cheapest I found was $25)

since I'm trying to learn electronics, and I have never done an insulation, I tried here. Could anyone tell me if it makes sense?


  1. You have not revealed any reason why you need to use an opto-isolator?

to be honest, I don't know... I was just trying to be safe
Can I always connect grounds of circuits? Sometimes I see people saying it's not a good idea, so I'm not sure when it's ok and when it's not
is there any rule of thumb?

  1. A 2N2222 will not handle a 1A load.

R4 will limit it to 12/15 = 800mA (I'm guessing it will be enough for a loud siren, but of course I'll check before)