Home > Hardware Components, Videos > Magnetic Reed Switch

Magnetic Reed Switch

Let’s have a look the definition of the reed switch from Wikipedia first:

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. You can watch the video below and see a PIC project using magnetic reed switch

In ths video PIC programmer has added a magnetic reed switch to his robot, it plugs into the ICSP header on the board and over-uses the program clock PIN. He had a small 15 tooth gear and added 5 small magnets equally spaced out, but the mag field was too strong and the reed switch did not switch off. So he reduced the number to 3 magnets which works fine. One wheel rotation is 9.6cm and with three magnets that’s one reed click every 3.2cm. In the software, programmer used the existing pulse width modulation interrupt thread, operating at about 5000 Hz to read the switch values. By using this, he is able to de-bounce the reed switch on the fly no extra code required. The code size is around 519 statements, out of a maximum program memory of 1024 statements.

  1. June 4th, 2016 at 05:06 | #1

    Looking forward to reading more. Great forum post. Much obliged. Strevel

  1. No trackbacks yet.