Description
Tutorial: How to Use the Universal Switch Module MR-HY3612
The MR-HY3612 module is a human body movement detector that operates with a voltage range of 5V to 24V. It is ideal for home automation or security projects that require the detection of human presence.
What you need
- Arduino or compatible microcontroller
- Power Supply Connections
- Data Connections
Steps
- Connect the power supply to the module (DC5-24V)
- Connect the output signal to a digital pin on the Arduino
- Upload the example sketch to the Arduino
- Verify the proper functioning of the module using the Serial Monitor software
- Configure the sensitivity of the module according to the project requirements
Example code
const int outputPin = 2; // Collega l'output del modulo al pin digitale 2
void setup() {
pinMode(outputPin, INPUT);
Serial.begin(9600);
}
void loop() {
int sensorValue = digitalRead(outputPin);
Serial.println(sensorValue);
delay(500);
}
Mini project
Create a home security system that turns on the lights when someone approaches. Connect the MR-HY3612 module to a relay and a digital output of the Arduino. When the sensor detects movement, the Arduino activates the relay to turn on the lights.
Common mistakes
- Do not verify the correct supply voltage
- Do not properly configure the module sensitivity
- Connect the module without protection against inductive currents
- Do not test the module with the Serial Monitor software
Recommended accessories
- Relay for Arduino
- Prototype board connector kit
- AC power supply
- Electronic prototyping kit
Frequently asked questions
Does the module work with Arduino?
Yes, it is compatible with Arduino and similar microcontrollers.
How can I adjust the module sensitivity?
Check the datasheet for configuration instructions.




Reviews
There are no reviews yet.