Reed Switch Module
Reed Switch Module
DESCRIPTION:
Reed switch is a kind of passive electronic switching component with contacts with a
simple structure, small size and easy to control. It consists of a sealed glass envelope
where there are two ferrous elastic reeds and is filled with inert gas called rhodium.
Normally, the two reeds are separated in the envelope. When a magnetic substance
approaches to the glass envelope, the reeds will come together due to the magnetic
field thus completing an electric circuit. When the external magnetic field disappears,
two reeds will be separated because of their elasticity, the circuit is also disconnected.
Therefore, as a circuit switching device controlled by magnetic field signals, reed
switch can also be used as a sensor for counting and limiting, etc. ( applied in the
security systems, mainly used for production of door and window magnets), and it is
also widely used in a variety of communications devices. In practice, it is common to
use the two permanent magnets to control connection of two metal sheets, thus it is
also called a "magnetron".
Specification:
● Operation voltage: 5V
● Both digital and analog output pin
● Adjustable sensitive
● Size: 42.5*15mm
● Weight: 2.964g
PIN CONFIGURATION:
1、 “A0”: Analog output pin,real-time output voltage signal
2、 “G” : GND
3、 “+” :Power(5V/DC)
4、 “D0” : Digital output pin
1/3
Example:
The example show that Reed module and the interface comes with digital 13 LED
build a simple circuit to produce a Reed warning lamp 13 comes with digital
interfaces of the LED, the Reed sensor access number 3 interface, when Reed
Code:
}
void loop ()
{
val = digitalRead (Sensor) ; // digital interface will be assigned a value of 3 to read val
2/3
if (val == HIGH) // When the Reed sensor detects a signal, LED flashes
{
digitalWrite (Led, HIGH);
}
else
{
digitalWrite (Led, LOW);
}
}
3/3