A Doppler radar module is an electronic device that employs the Doppler effect to determine the velocity of an object. It emits microwave signals and then receives the reflected waves from a moving target. The frequency shift between the emitted and received signals is used to calculate the velocity of the object. Doppler radar modules are commonly used in speed detection, motion sensors, and automatic door openers.
Pin Number | Name | Description |
---|---|---|
1 | Vcc | Power supply input (4.5V to 5.5V DC) |
2 | GND | Ground connection |
3 | OUT | Output signal (digital or analog, depending on the model) |
4 | CDS | Light-dependent resistor (LDR) input for controlling sensitivity based on ambient light (optional, not present on all models) |
// Define the pin connected to the Doppler radar module's output
const int radarPin = 2;
void setup() {
// Initialize the radarPin as an input
pinMode(radarPin, INPUT);
// Begin serial communication at 9600 baud rate
Serial.begin(9600);
}
void loop() {
// Read the state of the radar's output
int radarState = digitalRead(radarPin);
// If the output is HIGH, motion is detected
if (radarState == HIGH) {
Serial.println("Motion detected!");
} else {
Serial.println("No motion detected.");
}
// Wait for a short period before reading again
delay(100);
}
Q: Can the Doppler radar module detect stationary objects? A: No, it is designed to detect moving objects. Stationary objects will not cause a frequency shift in the reflected waves.
Q: Is it possible to determine the direction of movement? A: Basic Doppler radar modules can only detect the presence of motion, not the direction. Advanced modules or additional processing may be required for directional detection.
Q: How can I increase the range of detection? A: The range is typically fixed based on the module's design. However, ensuring a clear path and minimal obstructions can help achieve the maximum specified range.