MC-38 Wired Magnetic House Security Alarm Sensor for Door and Windows
MC-38 Wired Magnetic House Security Alarm Sensor for Door and Windows
The MC-38 is a wired magnetic sensor designed for house security systems to monitor doors and windows. It provides reliable detection of opening and closing events, triggering alarm notifications to ensure home safety and security.
| The MC-38 sensor consists of two main components | a magnet and a sensor. The magnet is attached to the moving part of the door or window, while the sensor is fixed to the frame. When the door or window is closed, the magnet is in close proximity to the sensor, creating a magnetic field that signals the sensor to send a "closed" status to the security panel. When the door or window is opened, the magnet moves away from the sensor, breaking the magnetic field and triggering an "open" signal. |
12V DC 10%
10mA
1mm
-20C to 50C (-4F to 122F)
-30C to 70C (-22F to 158F)
5% to 95% RH (non-condensing)
1 meter (3.3 feet)
Works with most security panels that support wired sensors
CE certified
FCC compliant
RoHS compliant
UL certified (optional)
1-year limited warranty
Dedicated customer support team for technical assistance and troubleshooting
Comprehensive documentation and installation guides available for download
MC-38 Wired Magnetic House Security Alarm Sensor for Door and WindowsOverviewThe MC-38 Wired Magnetic House Security Alarm Sensor is a reliable and compact sensor designed to detect open or closed states of doors and windows. It provides a wired connection to a security system or microcontroller, emitting a digital signal when the magnetic sensor is triggered. This sensor is ideal for home automation, security systems, and DIY projects.Technical SpecificationsOperating Voltage: 5V - 12V DC
Operating Current: 10mA
Output Signal: Digital (0V or VCC)
Detection Range: Up to 1.5 cm (0.6 inches)
Cable Length: 1.5 meters (4.9 feet)
Dimensions: 43 x 25 x 13 mm (1.7 x 1 x 0.5 inches)Example 1: Arduino-based Security SystemIn this example, we'll connect the MC-38 sensor to an Arduino board to create a basic security system that triggers an alarm when a door or window is opened.```c
const int sensorPin = 2; // MC-38 sensor connected to digital pin 2
const int alarmPin = 13; // Alarm output connected to digital pin 13void setup() {
pinMode(sensorPin, INPUT);
pinMode(alarmPin, OUTPUT);
}void loop() {
int sensorState = digitalRead(sensorPin);
if (sensorState == LOW) { // Sensor triggered (door/window open)
digitalWrite(alarmPin, HIGH); // Trigger alarm
} else {
digitalWrite(alarmPin, LOW); // Alarm off
}
delay(50);
}
```Example 2: Raspberry Pi-based Home AutomationIn this example, we'll connect the MC-38 sensor to a Raspberry Pi to integrate it with a home automation system.```python
import RPi.GPIO as GPIO# Set up GPIO pins
GPIO.setmode(GPIO.BCM)
sensor_pin = 17 # MC-38 sensor connected to GPIO 17
GPIO.setup(sensor_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)def sensor_callback(channel):
if GPIO.input(sensor_pin) == GPIO.LOW: # Sensor triggered (door/window open)
print("Door/Window Opened!")
# Send notification to home automation system or take further actionGPIO.add_event_detect(sensor_pin, GPIO.FALLING, callback=sensor_callback, bouncetime=200)while True:
# Monitor sensor state
pass
```Example 3: Microchip PIC Microcontroller-based Security SystemIn this example, we'll connect the MC-38 sensor to a Microchip PIC microcontroller to create a custom security system.```c
#include <pic.h>#define Sensor_PIN RB0 // MC-38 sensor connected to RB0
#define Alarm_PIN RB1 // Alarm output connected to RB1void main() {
TRISB = 0x01; // Set RB0 as input, RB1 as output
while (1) {
if (!Sensor_PIN) { // Sensor triggered (door/window open)
Alarm_PIN = 1; // Trigger alarm
} else {
Alarm_PIN = 0; // Alarm off
}
__delay_ms(50);
}
}
```These examples demonstrate how to connect and use the MC-38 Wired Magnetic House Security Alarm Sensor in various contexts. By adapting these code examples, you can integrate this sensor into your own IoT projects, such as home automation systems, security systems, or DIY projects.