Electrical – What type of relay should I be using

arduinorelay

So I'm currently looking to control a lightbulb for some inefficient lighting to produce heat for a mini-greenhouse I am building. I'm looking at plugging in a wall wart 12V DC adapter and wire that to the bulb. In terms of relays/solid state relays what should I look into buying? 12V – 5V DC relay?

Best Answer

The relay selection isn't really mission critical. You rarely if ever directly drive them from a microcontroller, like your Arduino's. Most of the time, a simple npn transistor is used, unless you have a n-channel mosfet you want to use (and it has the right VGS value).

The choice of relay for these one off projects is basically cost, and what voltage you have available. Here, you have 12 Volts from the light supply, and 5 Volts from the regulated Arduino rail. Most likely, your powering the Arduino from the 12v supply. Since isolation likely isn't needed here (standalone project, no mains switching, no computer connection), then a 12v relay is fine. It would avoid taxing the limited regulator on the Arduino, and can easily be driven by a transistor on the Arduino output.

The transistor would be determined by the current needed to drive the relay, but pretty much any relay with a coil current of under 1 Amp can be driven by a standard 2N2222. Heck, a typical small relay only needs under 200 mA coil current, so a smaller 2N3904 works too.

The relay choice does depend on the light current you expect to drive, and how often you intend to switch it on or off. If your not thinking PWM to reduce the lighting, and are planning minutes or hours on, minutes or hours off, then any common relay would work. Once your switching it off and on in seconds or fractions of a second, then a mechanical relay is no longer an option.