Is a relay one way

motionnetduinorelaysensor

I'm no electrical engineer, so maybe this is a stupid question.

I want to make my own alarm system using a netduino board.
I bought a couple of motion sensors for mounting into my ceiling.

The problem I see is that these sensors are designed to directly switch a light source (they use 220v). I would like to use them to signal my arduino that something was detected.
Perhaps using this.

I know that a relay is used to switch a high voltage circuit from a low voltage circuit.

My question: Can a relay also work the other way around, meaning that the high voltage switches my low voltage circuit? Or do I need to buy another type of component for this situation?

Best Answer

The relay shield that you linked to is a device that allows the microcontroller to manage the coils of four relays. The coils then operate sets of contacts to allow the switching of external circuits. This control flow would be OUT from the microcontroller. This shield is not useful to your application.

Your application wants the motion detector to drive an INPUT to the microcontroller board. If the sensor only has provision for turning a light on and off at 220VAC then you will have to adapt the sensor with either a detector circuit that can sense the AC on from the sensor or deploy a relay. The relay would need to have a 220VAC coil that you would wire in place of the motion detector light or wire in parallel with the light. When the light would normally turn on the relay coil would energize and pull in the relay contacts. The switched contacts can be wired over to the microcontroller board to an INPUT pin so that the programmed code can detect that the motion detector has the "light" on or off.

With careful wiring to make sure that the relay coil connections are separated and insulated from the relay contacts you should be able to connect safely directly to the microcontroller (MCU) inputs with the relay contacts. Setup the INPUT with a 1K --> 4.7K pullup resistor to the VDD of the MCU and then connect the relay contact pair to the INPUT and to GND.