Arduino Magnetic Reed Switch KY-021

Hello world! yep yep, i made another simple example project.
This time for the KY-021 Mini reed switch. / Arduino Magnetic Reed Switch.
It will simply turn on and off a light with a relay by using a magnetic field.
Reed switches are used allot in burglar alarms.

Schematic:
Ky-021 Arduino Magnetic Reed Switch

Parts list:
Arduino Uno, I used the robotdyn Uno.. one with 7 analog pins! Very good stuff! buy it!
KY-021 Mini reed Switch
KY-019 1 Channel Relay.
A magnetic field, can be any magnet but best to use is a small one. Or even better a magnet from a alarm.
Set of jumper wires. MM/FF/MF
Lamp + power cable (optional) dont need this! The relay itself will show you if it works by turning on a led.

Code:

What is a reed switch?
The reed switch is an electrical switch operated by an applied magnetic field. It was invented at Bell Telephone Laboratories in 1936 by W. B. Ellwood. It consists of a pair of contacts on ferrous metal reeds in a hermetically sealed glass envelope. The contacts may be normally open, closing when a magnetic field is present, or normally closed and opening when a magnetic field is applied. The switch may be actuated by a coil, making a reed relay, or by bringing a magnet near to the switch. Once the magnet is pulled away from the switch, the reed switch will go back to its original position.

An example of a reed switch’s application is to detect the opening of a door, when used as a proximity switch for a burglar alarm.
Source:wiki

facebook-profile-picture
Danny van den Brande

http://www.arduinosensors.nl

Programmer, Game Designer, 3D Designer, Web Designer, Graphic Designer. Jup this website looks crappy.. :) But enjoy the projects! Everything you need is here.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.