Magnetic Contact Switch Sensor with Arduino.

Do you know how magnetic contact switch sensor works and how to use it?

Introduction

A reed switch is an electromagnetic switch used to control the flow of electricity in a circuit. They are made from two or more ferrous reeds encased within a small glass tube-like envelope, which become magnetized and move together or separate when a magnetic field is moved towards the switch. The switch effectively works like a gate, or a bridge, in an electric circuit so when the two reeds are in contact, electricity can flow around the circuit operating a device. Unlike mechanical switches they do not require something or someone to physically flick them on or off, they are controlled completely by invisible magnetic fields.

Video

This video will show you how magnetic contact switch sensor works and simple project that can be made using it.

Hardware Preparation

This is the hardware connection and the components needed.

Photo 2019 08 09 11 54 57
Figure 1 : Hardware connection.

Sample Code

Arduino

References :

  1. What is a reed switch and which magnets operate them?

Thank you

Thank you for reading this tutorial and we hope it helps your project development. If you have any technical inquiry, please post at Cytron Technical Forum.

Leave a Comment

Your email address will not be published.

Share this Tutorial

Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest
Share on facebook
Share on whatsapp
Share on email
Share on print
Share on twitter
Share on pinterest

Latest Tutorail

Dot Matrix Clock With NTP Server Using ESP32
Safe Box Using I2C LCD and 4×4 Keypad On Arduino.
Send Sensor’s Data to ThingSpeak Using Raspberry Pi
Getting Started with Raspberry Pi 4B-1GB Beginner Set
5 Major Upgrades on Raspberry Pi 4 Model B
Scroll to Top