Build it step by step
0 of 9 doneWire the radar
VIN to 5V, GND to GND and OUT to D2.
Wire the buzzer
Positive through the 1 k resistor to D8, negative to GND.
Wire the button
One leg to D3 and the other to GND.
Upload the sketch
The monitor says Hall chime ready.
Wait half a minute
The sensor settles, so keep still.
Wave your hand 1 m in front
The monitor prints Motion and the two-note chime plays.
Keep waving
No second chime for 10 seconds.
Press the button
The monitor says Muted, and waving now does nothing.
Press it again
A short blip tells you the chime is back.
How do you build a hallway motion chime?
A small microwave radar sensor notices someone walking into the hall and plays a short two-note chime. A button mutes it for quiet hours, and a lock-out stops it chiming over and over while someone stays in view. You need Arduino Nano, RCWL-0516 microwave radar motion sensor, Passive buzzer, Resistor 1 kΩ, Tactile push button 6 mm, USB A to micro-USB cable (data), Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm). It takes 9 steps and about 100 minutes.
- Level
- Beginner
- Time
- About 100 min
- Parts
- 8
Parts list
- Development BoardsBuyArduino Nano × 1
- SensorsBuy
- Motors & ActuatorsBuyPassive buzzer × 1
- PassivesBuyResistor 1 kΩ × 1
- SwitchesBuy
- Cables & WiresBuy
- PrototypingBuy
- PrototypingBuy
Tick what you already own. It saves to My Garage, so “Build with what I have” knows.
Wiring
| From | To | Why |
|---|---|---|
| RCWL-0516 VIN and GND | Nano 5V and GND | Power, it needs 4 to 28 V |
| RCWL-0516 OUT | Nano D2 | Goes HIGH for about 2 seconds when it sees movement |
| Passive buzzer + | 1 k resistor to Nano D8 | The resistor keeps it from being too loud |
| Passive buzzer - | Nano GND | Return |
| Mute button | Nano D3 and GND | Press to switch the chime off or on |
Code
The RCWL-0516 is a small Doppler radar. It sends out a weak microwave signal and listens for changes in what comes back, so it notices movement even through a plastic box or a thin wall, which a PIR sensor cannot do. When it sees something move it raises its OUT pin to HIGH for about two seconds, and the sketch only reacts to the moment the pin goes from LOW to HIGH. This is called edge detection, and it stops the chime from playing again and again for as long as the signal stays high. After a chime, a lock-out of ten seconds keeps the hall quiet while someone walks about. The chime itself is two notes, A at 880 Hz and then D at 1175 Hz, played with tone(). A passive buzzer is used because it plays whatever frequency you give it, while an active buzzer can only make one fixed sound. The button toggles mute, and it plays a short blip when you switch the chime back on, so you know where you stand. Mounting matters a lot: the radar sees through thin walls and sometimes catches fans, people next door, even a passing car, so point it away from those and try putting a bit of foil behind it. The sensor also needs about 30 seconds after power-up to settle before it is steady. If it chimes too easily you can reduce its sensitivity by adding a small capacitor, but start by moving it.
Runs on a virtual Arduino Nano in your browser, with sliders for the sensors. Happy with it? Verify and upload to your real board from the same page (Chrome or Edge on a computer).
const uint8_t RADAR = 2;
const uint8_t BUZZER = 8;
const uint8_t MUTE_BTN = 3;
const unsigned long LOCKOUT = 10000; // after one chime, stay quiet for 10 seconds
bool muted = false;
bool prevBtn = false;
bool prevRadar = false;
unsigned long lastChime = 0;
bool chimedOnce = false;
void chime() {
tone(BUZZER, 880, 180);
delay(220);
tone(BUZZER, 1175, 350);
delay(400);
noTone(BUZZER);
}
void setup() {
pinMode(RADAR, INPUT);
pinMode(MUTE_BTN, INPUT_PULLUP);
pinMode(BUZZER, OUTPUT);
Serial.begin(9600);
Serial.println(F("Hall chime ready (radar needs about 30 s to settle)"));
}
void loop() {
bool b = (digitalRead(MUTE_BTN) == LOW);
if (b && !prevBtn) {
muted = !muted;
Serial.println(muted ? F("Muted") : F("Chime on"));
if (!muted) { tone(BUZZER, 1000, 80); } // a short blip shows it is back on
}
prevBtn = b;
bool radar = digitalRead(RADAR);
if (radar && !prevRadar) { // a new detection, not a continuing one
Serial.println(F("Motion"));
if (!muted && (!chimedOnce || millis() - lastChime >= LOCKOUT)) {
chime();
lastChime = millis();
chimedOnce = true;
}
}
prevRadar = radar;
delay(20);
}What the serial monitor should show
Open the serial monitor at the baud rate in the code. This is what our simulator prints for a virtual Arduino Nano with its sensors at their default values. Your numbers will follow your real readings, but the format should match.
Hall chime ready (radar needs about 30 s to settle)
Test checklist
What you should see at each check. If a reading is far off, stop and use the troubleshooting list.
| Check | Expected |
|---|---|
| Wave once at 1 m | Motion printed and one chime |
| Walk in and stand still | One chime only, not a stream |
| Wave again within 10 s | Motion printed but no chime |
| Press the button then wave | Motion printed, no chime |
| Press the button again and wave after 10 s | A blip, then a chime |
| Sit completely still for a minute | Nothing is printed |
If it does not work
Chimes by itself
The radar sees through the wall, so turn it or put foil behind it.
Never detects
Check VIN has 5 V and OUT goes to D2, and wait 30 seconds after power-up.
Buzzer is too quiet
Make sure it is a passive buzzer on D8 and try a 220 ohm resistor.
Chime plays twice
Your hand moved in and out, so raise LOCKOUT.
Mute button does nothing
Check it goes to D3 and GND and is pressed across its legs.
Upload fails
Choose the Old Bootloader option for the Nano.
Still stuck? Find the fault step by step with your multimeter →
Common questions
What parts do I need for the hallway motion chime?
Arduino Nano, RCWL-0516 microwave radar motion sensor, Passive buzzer, Resistor 1 kΩ, Tactile push button 6 mm, USB A to micro-USB cable (data), Breadboard 830 Tie Points and Jumper wires male to male (40 pcs, 20 cm).
How long does the hallway motion chime take to build?
About 100 minutes for a beginner maker, in 9 steps.
How do I know the hallway motion chime works?
Wave once at 1 m: Motion printed and one chime. Walk in and stand still: One chime only, not a stream. Wave again within 10 s: Motion printed but no chime.
Chimes by itself: what should I check?
The radar sees through the wall, so turn it or put foil behind it.
Never detects: what should I check?
Check VIN has 5 V and OUT goes to D2, and wait 30 seconds after power-up.
Buzzer is too quiet: what should I check?
Make sure it is a passive buzzer on D8 and try a 220 ohm resistor.
Chime plays twice: what should I check?
Your hand moved in and out, so raise LOCKOUT.
