Semiconductor for You
  • Home
  • Semiconductor News
  • Semiconductor Magazine
  • Technology
    • Automotive
    • Consumer Electronics
    • IoT
    • Test and Measurement
    • Lighting
    • Power Management
    • Wireless
    • Personal Electronics
    • Hardware & Software
    • Research
    • Medical Electronics
    • Embedded Design
    • Aerospace & Defence
    • Artificial Intelligence
  • Interview
  • Industries
  • Market
  • Knowledge Base
  • Events
  • Tools
    • Resistor Color Code Calculator
No Result
View All Result
  • Home
  • Semiconductor News
  • Semiconductor Magazine
  • Technology
    • Automotive
    • Consumer Electronics
    • IoT
    • Test and Measurement
    • Lighting
    • Power Management
    • Wireless
    • Personal Electronics
    • Hardware & Software
    • Research
    • Medical Electronics
    • Embedded Design
    • Aerospace & Defence
    • Artificial Intelligence
  • Interview
  • Industries
  • Market
  • Knowledge Base
  • Events
  • Tools
    • Resistor Color Code Calculator
No Result
View All Result
Semiconductor for You
No Result
View All Result
Home Knowledge Base

MC-38 Wired Door Window Sensor: Working, Pinout, Specifications and Applications

Komal Ganvir by Komal Ganvir
October 26, 2026
in Knowledge Base
0
ADVERTISEMENT

What Is an MC-38 Wired Door Window Sensor?

The MC-38 Wired Door Window Sensor is a magnetic contact switch used to detect whether a door, window, or similar opening is open or closed. It is commonly used in home security systems, intrusion detection systems, and automatic control applications. The sensor consists of two main parts: a magnetic reed switch and a permanent magnet. One part is installed on the door or window frame, while the other is attached to the moving door or window.

When the two parts are close to each other, the magnet activates the reed switch, changing the electrical contact state. When the door or window opens and the magnet moves away, the switch returns to its normal state. The MC-38 can be connected to a compatible microcontroller, such as an Arduino, to detect door or window movement and trigger an alarm, switch a light, or perform another programmed action.

ADVERTISEMENT

How Does the MC-38 Magnetic Switch Work?

The MC-38 uses a magnetic reed switch, which contains two thin ferromagnetic metal contacts sealed inside a small glass capsule. Its working principle is based on the magnetic field produced by the permanent magnet.

1. When the Door or Window Is Closed

When the magnet is close to the reed switch, the magnetic field causes the internal contacts to connect in a normally open reed-switch arrangement. This completes the electrical circuit. A connected controller can detect this state and interpret it as a closed door or window.

2. When the Door or Window Is Open

When the door or window moves away from the frame, the magnet moves away from the reed switch. The contacts return to their normal open state, interrupting the circuit. The connected controller can detect this change and activate an alarm, send a notification, or switch an electrical device. The exact electrical state depends on the contact configuration and how the sensor is wired. The MC-38 is generally a passive magnetic contact rather than an electronic sensor that generates its own voltage.

Pinout of the MC-38 Sensor

The MC-38 is a simple two-wire magnetic contact switch. Unlike powered electronic sensors, it typically does not require a separate power supply for the reed switch itself.

Connection Function
Wire 1 One side of the magnetic switch contact
Wire 2 Other side of the magnetic switch contact

The two wires are generally interchangeable because the reed switch is a passive contact. Neither wire should automatically be assumed to be ground or signal; their roles depend on the external circuit.

Connecting the MC-38 to an Arduino

The MC-38 can be connected to an Arduino digital input using a pull-up or pull-down arrangement. A common method uses the Arduino’s internal pull-up resistor.

Example Connection Using the Internal Pull-Up

  • Connect one MC-38 wire to an Arduino digital input, such as pin 2.
  • Connect the other MC-38 wire to GND.
  • Configure the digital input using `INPUT_PULLUP` in the Arduino program.

In this configuration, the input normally reads HIGH when the switch is open and LOW when the switch closes the circuit. The program can detect a change in the input state to identify door or window movement.

const int doorSensor = 2;

void setup() {
  pinMode(doorSensor, INPUT_PULLUP);
  Serial.begin(9600);
}

void loop() {
  int state = digitalRead(doorSensor);

  if (state == LOW) {
    Serial.println("Magnetic contact closed");
  } else {
    Serial.println("Magnetic contact open");
  }

  delay(200);
}

**Note:** This example reports the electrical contact state, not necessarily the physical door state. Verify the magnet and switch alignment and test the installed sensor to determine which reading corresponds to an open or closed door.

Specifications of the MC-38 Wired Door Window Sensor

The following specifications are based on the supplied product description. Actual ratings may vary between manufacturers and product versions.

Parameter Specification
Model MC-38
Product type Wired magnetic door/window contact switch
Material Plastic housing
Colour White
Maximum switching current 0.5 A
Voltage rating 100 V, as stated in the supplied description; verify whether this is AC or DC and confirm the manufacturer’s rating
Rated power 10 W, as stated in the supplied description
Operating distance Approximately 15–25 mm, depending on alignment and the product version
Connecting cable length Approximately 30 cm
Length 28 mm
Width 14 mm
Height 8 mm
Weight Approximately 8 g

**Electrical safety:** The voltage and current ratings must be checked against the exact product datasheet. Do not connect the contact directly to mains voltage or a high-current load unless the switch is explicitly rated for that application. For Arduino projects, use it as a low-voltage input switch.

Features of the MC-38 Magnetic Door Sensor

The main features of the MC-38 include:

  • Simple installation: Its two-part design makes it easy to mount on compatible doors and windows.
  • Magnetic operation: Detects the relative position of a magnet and reed switch.
  • Low-power sensing: The passive switch itself does not require a dedicated power supply.
  • Microcontroller compatibility: Can be interfaced with Arduino and other compatible digital input circuits.
  • Compact design: The small housing supports discreet installation on door or window frames.
  • Alarm integration: Can serve as a trigger for a compatible security alarm or monitoring system.
  • Flexible applications: Suitable for basic access monitoring and automatic control projects.

Applications of the MC-38 Sensor

1. Home Security Systems

The MC-38 can be installed on doors and windows to detect when an opening changes state. When connected to an alarm controller, it can trigger a warning if the system is armed.

2. Intrusion Detection

The sensor can serve as one input in a basic intrusion detection system. A controller monitors the contact and responds when it detects an unexpected change.

3. Automatic Lighting

The switch can be used in a low-voltage control circuit to turn a light on or off when a door or cupboard opens or closes. The required control logic depends on the desired behavior.

4. Office and Commercial Security

It can be installed on suitable doors, windows, cabinets, and storage areas in offices, shops, and other commercial premises.

5. Arduino and IoT Projects

When connected to a microcontroller or a compatible IoT device, the MC-38 can provide door-status information for logging, notifications, or home automation routines.

Advantages of the MC-38 Sensor

  • Simple two-wire connection.
  • Compact and lightweight construction.
  • Low-cost option for basic door and window monitoring.
  • No separate power supply is required for the passive contact itself.
  • Compatible with many low-voltage alarm and microcontroller circuits.
  • Can be integrated into security and automation projects.

Limitations of the MC-38 Sensor

  • Alignment is important: The magnet and reed switch must remain within the recommended operating distance.
  • Limited sensing range: It detects magnetic proximity rather than measuring the actual distance or position continuously.
  • Wiring is required: The standard MC-38 is a wired contact and needs suitable cable routing.
  • Contact ratings are limited: The switch should not be used beyond its verified voltage, current, or power ratings.
  • It is not a complete alarm system: A controller, alarm, or other monitoring equipment is needed to provide alerts.

Conclusion

The MC-38 Wired Door Window Sensor is a simple magnetic contact switch used to detect whether a door, window, or similar opening has changed position. It operates using a magnet and an internal reed switch, making it suitable for basic security systems, intrusion detection, automatic lighting, and microcontroller-based home automation. Its two-wire design makes it easy to interface with an Arduino or other compatible controller. For reliable operation, install the magnet and switch with the correct alignment, test the open and closed states, and follow the manufacturer’s electrical ratings.

Komal Ganvir

Komal Ganvir

Browse by Category

  • Aerospace and Defence
  • AI & Data Center
  • Articles
  • Automation
  • Automotive
  • Communication
  • Consumer-Electronics
  • Design & Manufacturing
  • Hardware & Software
  • Healthcare
  • Industrial Electronics
  • Interview
  • IoT
  • Knowledge Base
  • Lighting
  • Market
  • personal-electronics
  • Power Management
  • Research
  • Robotics
  • Semiconductor Events
  • Semiconductor News
  • Sensors
  • Smart Home & Building
  • Technology
  • Test and Measurement
  • Uncategorized
  • Wireless
Semiconductor For You

Semiconductor For You is a resource hub for electronics engineers and industrialist. With its blend of
technology features, news and new product information, Semiconductor For You keeps designers and
managers up to date with the fastest moving industry in the world.

Follow Us

Browse by Category

  • Aerospace and Defence
  • AI & Data Center
  • Articles
  • Automation
  • Automotive
  • Communication
  • Consumer-Electronics
  • Design & Manufacturing
  • Hardware & Software
  • Healthcare
  • Industrial Electronics
  • Interview
  • IoT
  • Knowledge Base
  • Lighting
  • Market
  • personal-electronics
  • Power Management
  • Research
  • Robotics
  • Semiconductor Events
  • Semiconductor News
  • Sensors
  • Smart Home & Building
  • Technology
  • Test and Measurement
  • Uncategorized
  • Wireless

Recent News

element14 Community launches 2026 Halloween Hackathon

element14 Community launches 2026 Halloween Hackathon

October 26, 2026
Infineon and Enphase Energy announce world’s first 900 V GaN BDS devices for solid-state transformers in AI data centers

Infineon and Enphase Energy announce world’s first 900 V GaN BDS devices for solid-state transformers in AI data centers

October 26, 2026
  • About
  • Advertise
  • Privacy & Policy
  • Contact

© 2026 Semiconductor For You

No Result
View All Result
  • Home
  • Semiconductor News
  • Technology
    • IoT
    • Wireless
    • Power Management
    • Automotive
    • Hardware & Software
  • Market
  • Interview
  • Knowledge Base
  • Tools
    • Resistor Color Code Calculator

© 2026 Semiconductor For You

Advertisement