Application Examples - Driving Relays

This area of the Mirrorbow website provides applications information and answers some of the more frequently asked questions from customers 

Main Index - USB products resources - Ethernet products resources - Converting between 5V & 3V logic - Driving LEDs - Driving relays - Wireless Mains Control

Driving Relays

The pins of the USBIO25 can drive a small 5V (min 330R coil resistance) relay directly, however it does need a reverse biased 5V1 zener to protect the logic output. 5V relays however are expensive and it is often preferable for example to use 12V relays and a driver chip such as the UDN2981A that can drive up to 8. The EthernetIO products cannot drive relays directly so you have to use the UDN2981A or if you only need one or two relays you can also use a transistor to drive them. See the circuits below.
Note: The UDN2981A is supposed to be driven from 5V logic however 3V from the EthernetIO board has worked fine in test. Alternatively, you can use one of the Ethernet IO boards 5V tolerant ports, program the port to a logic 0, connect a 10k pullup resistor from the pin to 5V. When the output is on, the pin will be pulled to 0V logic 0, when you turn it to an input the resistor will pull the pin voltage to 5V.

Note: If you are thinking of switching mains voltage apparatus with relays consider this section first Wireless Mains Control it can be cheaper, easier and safer!