The DFROBOT Microwave Sensor is an advanced motion detection module that utilizes microwave technology to detect movement within its vicinity. By emitting microwave signals and analyzing the reflections, this sensor can accurately sense motion, making it ideal for a variety of applications such as automatic lighting, security systems, and industrial automation.
Pin Number | Name | Description |
---|---|---|
1 | VCC | Power supply (5V DC) |
2 | GND | Ground connection |
3 | OUT | Digital output signal |
4 | NC | Not connected |
// Define the sensor output pin
const int microwaveSensorPin = 2; // Connect to the OUT pin of the sensor
void setup() {
// Initialize the sensor output pin as an input
pinMode(microwaveSensorPin, INPUT);
// Begin serial communication at 9600 baud rate
Serial.begin(9600);
}
void loop() {
// Read the sensor value
int sensorValue = digitalRead(microwaveSensorPin);
// Check if the sensor is detecting motion
if (sensorValue == HIGH) {
// Motion detected
Serial.println("Motion Detected!");
} else {
// No motion detected
Serial.println("No Motion Detected.");
}
// Wait for a short period before reading again
delay(500);
}
Q: Can the sensor detect motion through walls? A: No, the microwave sensor cannot detect motion through solid objects like walls.
Q: Is the sensor suitable for outdoor use? A: The sensor is not explicitly rated for outdoor use and may require additional protection from weather elements.
Q: How can I adjust the detection range of the sensor? A: The detection range is fixed and cannot be adjusted. Positioning and environmental factors can influence the effective detection range.
Q: What is the sensor's response time? A: The sensor typically has a fast response time, but this can be affected by the microcontroller's code and processing speed.
For further assistance, please contact DFROBOT technical support or refer to the official DFROBOT Microwave Sensor documentation.