A smart house that sees an approaching object, lights up, and sounds an alert.
APPROACH→MEASURE→DECIDE→ALERT
First, meet the finished design. Then we build this exact house together.
Generating concept image…
MISSION SIMULATION
Watch the smart house in action
This is a visual simulation, not a live hardware connection.
DISTANCE100 cm
VISITOR DETECTED!
THE LOGIC LOOP
01APPROACHVisitor moves toward the door.
02MEASUREUltrasonic echo returns a distance.
03DECIDEThe program checks the 50 cm rule.
04ALERTLED stays on; one short beep marks a new approach.
THE BUILD KIT
Meet the components
Every part has one clear job in our smart house.
UNO
Arduino Uno
The brain: it reads the sensor and controls the alert.
HC-SR04 sensor
Sends a sound pulse and measures the returning echo.
LED
A visual alert that glows near the door.
Buzzer
Makes one short sound for each new approach.
Breadboard
A reusable platform for tidy connections.
Jumper wires
Electrical pathways between the parts.
Ω
220–330 Ω resistor
Protects the LED by limiting current.
Cardboard or foam board
The affordable house body and stable base.
PLAN BEFORE YOU CUT
Design the house blueprint
The sensor must face outward and stay clear of the cardboard.
SENSOR faces outward
LED
ELECTRONICS access compartment
WALLS
ROOF
FRONT DOOR
STABLE BASE
01Leave a doorway for the visitor.
02Mount the HC-SR04 above or beside the entrance.
03Keep Arduino and wiring accessible, not sealed inside.
BLUEPRINT → BUILD
CONSTRUCTION BAY
Build the cardboard house
Build the same simple, sturdy design shown in the reveal.
01
Measure and mark
Mark walls, a door opening, and a roof on cardboard.
✓
02
Cut the panels
Cut carefully, leaving clean edges for joining.
✓
03
Join the walls
Make a square body and attach the front panel.
✓
04
Attach roof and base
Fix the roof to a stable base; leave the electronics accessible.
✓
!Safety first:use cutting tools carefully and under adult supervision.
WIRING 01 / INPUT
Connect the ultrasonic sensor
One wire at a time. Match every label to the correct Arduino pin.
ARDUINO UNO5VGNDD9D10
HC-SR04VCCGNDTRIGECHO
Sensor pin map
Sensor pin
Arduino Uno
VCC
5V
GND
GND
TRIG
D9
ECHO
D10
)))
Echo idea The sensor sends a sound pulse and measures how long the returning echo takes.
WIRING 02 / LIGHT
Connect the LED
The LED sits beside the door so a visitor can see the alert.
LED near door
D13
220–330 Ω
GND
D13 → resistor → LED long leg → LED short leg → GND
The resistor must remain in the circuit to limit current and protect the LED.
WIRING 03 / SOUND
Connect the buzzer
A short beep announces a new approach, not every sensor reading.
+−
Buzzer inside / beside entrance
+Buzzer positive (+)D8
−Buzzer negative (−)GND
One approach = one short beep
The memory variable stops repeated beeps while someone remains close.
PRE-FLIGHT CHECK
Check the complete circuit
Trace the full path before connecting USB power.
UNO
✓Sensor power checked
✓Sensor pins checked
✓LED polarity checked
✓LED resistor present
✓Buzzer polarity checked
✓All grounds connected
POWER OFF WHILE WIRINGDisconnect USB power before changing a connection.
THE SOFTWARE LAB
Enter the PictoBlox lab
Visual blocks first: students build the logic without typing the program.
PictoBlox • Stage Mode
BLOCKS
STAGE MODE
when green flag clicked
forever
read distance
01Open PictoBlox.
02Select Block Coding and Arduino Uno.
03Connect the correct COM port.
04Select Stage Mode.
05Upload the required firmware if prompted.
06Keep Arduino connected while Stage Mode runs.
Interface shown as an illustration. PictoBlox block names can vary by version and extension.
BLOCK TOOLBOX
Find the required PictoBlox blocks
Look for the function, then match the closest supported label in your version.
EVENTS
when green flag clicked
CONTROL
forever
if then
if then else
wait
OPERATORS
< less than
= equals
VARIABLES
create someoneNear
set someoneNear to 0
ARDUINO / EXTENSION
ultrasonic distance in cm
digital pin HIGH / LOW
play tone, if available
VERSION CHECKBlock labels vary. Do not invent a block: if the tone block is unavailable, use the compatible Arduino-code backup or a documented supported alternative.
THE MEMORY SWITCH
Create the someoneNear variable
This tiny memory switch makes the alert feel intelligent.
someoneNear0
READY FOR A NEW APPROACH
0No current approach has beeped. A new visitor may trigger the buzzer.
1This approach already beeped. Keep LED on, but stay quiet.