T ThinkEdge Learn

Arduino — Ultrasonic Radar Scanner

A servo sweeps the ultrasonic sensor to scan the room

Arduino Ultrasonic Servo Radar Serial plotter
Arduino ultrasonic distance sensor project · Tier 3 · Combined Projects · Advanced · 45 min · Arduino Uno

What you will learn

What you will need

Component
1× Arduino Uno R3
1× HC-SR04 ultrasonic sensor
1× servo motor (SG90)
1× breadboard
5× jumper wires

Step by step

Take it further

Practise it before you build it

Wire this circuit in the ThinkEdge Learn simulator first. The simulator runs a real Arduino sketch against a modified-nodal-analysis solver, so the LED on screen actually lights when the current is right — no hardware, no burnt components, and a class can try it in a browser.

Open the interactive lab See plans for your class

Related projects

Arduino — Ultrasonic Distance on SerialRead distance with HC-SR04 and print the cm on Serial Monitor Arduino Mega — 4-Servo Robot ArmDrive 4 servos at once for a pan-tilt-gripper-tilt arm Arduino — Solar Tracker with Two LDRsA servo that follows the light, like a real solar panel LDR — Light-Following Robot (Solar Tracker)It always faces the brightest spot Ultrasonic — Reverse Parking SensorBeep faster as you get closer Ultrasonic — Pitch by DistanceCloser = higher pitch

Guides that use this project

30 guides on the site build this project as part of a longer explanation. The guide says why the circuit works; this page says how to wire it.

How to Build a DroneHow to build a drone from scratch: the four subsystems every drone needs, the parts that make them work, and the Arduino projects that teach each one before you fly. How to Make a Drone for a School ProjectHow to make a drone for a school project: a classroom-safe, low-cost build with no LiPo or radio gear, and the measurements to present it with. Tesla Robot Optimus: What the Hardware Has to DoTesla Robot Optimus is a prototype, not a product. Here is what its actuators, sensors and balance problem mean, and how to build the same ideas cheaply. Robotic Lawn Mowers: Boundary, Blades and BalanceHow robotic lawn mowers find the edge of the grass, why the blade motor causes brownouts, and what a $30 ultrasonic sensor can and cannot do. Robotics and Autonomous Systems: The Four Sub-AreasRobotics and autonomous systems split into perception, planning, control and SLAM. Here is what each needs, and which parts an Arduino can reach. Autonomous Vehicles: What the Car Actually SensesAutonomous vehicles fuse lidar, radar, cameras and ultrasonics into one picture of the road. Here is what each sensor is good at, and how to build the loop. ESP32 Microcontroller: The One With the Radio OnboardThe ESP32 is a 3.3 V microcontroller with Wi-Fi and Bluetooth built in. What it really is, how it differs from an Arduino Uno, and where it fits in IoT builds. ESP32 IoT Projects: From a Single Sensor to a Live DashboardFive ESP32 IoT projects that teach sensors, MQTT publishing, deep sleep and reconnection, each staged so the logic runs in a browser simulator first. Mesh Networking: How Nodes Relay Data for Each OtherA mesh network lets nodes relay data for each other. How flooding and hop limits work, what mesh costs in latency, and when a simple star is better. Security Camera: From Light on a Sensor to a Stream You Can StoreHow a security camera turns light into a compressed video stream, what 1080p really costs in storage, and how to build a motion-triggered one. What an AI Agent Actually IsAn AI agent is a loop of model calls, tools and memory. Learn how that loop maps onto the sense, decide, act cycle of a robot you can build this term. Edge AI: Decisions Made on the DeviceEdge AI runs the decision on the device instead of in the cloud. Here is what that buys you in latency and privacy, and what a 32 KB microcontroller can really do. Physical AI: Intelligence That Has to ActPhysical AI is intelligence that drives a motor, not a cursor. Here is how models, controllers and feedback split up, and how to build the loop safely. AI Swarm: Many Small Robots, Three RulesA swarm is not a clever algorithm, it is three local rules. Learn separation, alignment and cohesion, then build them as if-statements on an Arduino. Local LLM: Your Own Model, Your Own MachineRun a language model on your own hardware: the RAM maths for a Raspberry Pi, the real token speeds, and how an Arduino can act on what the model says. DGX Spark: What the Hardware Actually IsDGX Spark packs a 20-core Arm CPU and a Blackwell GPU into 128 GB of shared memory. Here is what it buys you, what it costs, and where it does not help. RTX 5080: The Card, the Numbers, the CaveatRTX 5080 specs and price: 16 GB of GDDR7, 360 W of board power and a $999 launch price that no longer matches the street. Here is who should buy one. AGI: Artificial General Intelligence, PreciselyAGI means a system that can do any cognitive task a human can and transfer what it learns. It does not exist yet, and here is how you would know if it did. Open Code and OpenCode: A Coding Agent You Can ReadOpen code is a loop: read, plan, edit, run, read the error, fix. Here is how opencode, an open source coding agent, fits into a school project and what it costs. AI in the Classroom: What to Allow and What to StopAI in the classroom works when the policy is specific. Here is what AI genuinely helps with, the rules that keep it honest, and what a school should not upload. UAV Drones ExplainedWhat a UAV is, how the main airframe types differ, and how a drone actually stays upright. The engineering behind drones, taught the way a student can build it. Drone DeliveryHow drone delivery works in practice: the range limits, the landing and drop mechanisms, the regulatory hurdles, and why most deliveries use a van for the last mile. Air Taxis and eVTOL AircraftAir taxis and eVTOL aircraft explained: the lift configurations, why certification is the real constraint, and what the physics demands of them. FPV Drones ExplainedHow an FPV drone works: the camera, video link, goggles and flight controller that make it fly from the pilot's own point of view. FPV Drone SimulatorsFPV drone simulators let you practise the exact physics of flying before spending money on crashes. What they model accurately, what they skip, and how to pick one. Drone Inspection and SurveillanceWhere drones genuinely pay for themselves: inspection of towers, roofs, pipelines and power lines. The sensor choices, the regulation and the real economics. How a Drone Flight Controller WorksInside a drone flight controller: sensor fusion, the PID loop, the rate profile and the mixer. The algorithms behind every drone, explained from first principles. Drone Defence and Interceptor DronesHow drone defence works: why interceptors are cheaper than missiles, how the physics of the engagement works, and why airports are hardest to defend. The Shahed Drone ExplainedHow a Shahed one-way attack drone works: the airframe, the piston engine, the satellite navigation and the economics that made it effective. Sting Interceptor Drones ExplainedHow the Sting interceptor drone works: a small, fast, camera-carrying multirotor flown into a target by an operator. The physics, the engineering and the economics.

Where this project sits

It is also part of these lists, which is how a class usually finds it.

Arduino servo motor projects for students12 projects in this list Arduino ultrasonic distance sensor projects10 projects in this list

Try the full simulator with your class

103 guided circuit projects, 21 lessons and an in-browser Arduino simulator. The first 15 projects are free, no account needed. One licence covers a whole school.