Sound Sensor — Loud Sound Light
LED brightness follows the sound · quiet keeps it off
Sound
Sensor
Analog
PWM
What you will learn
- How a sound sensor outputs an ANALOG signal (0-1023 via analogRead) proportional to loudness
- How to use analogRead() to read any sensor that varies smoothly over a range
- How a noise floor plus map() turns a continuous 0-1023 reading into LED brightness with analogWrite()
What you will need
| Component |
|---|
| 1× Arduino Uno |
| 1× sound sensor |
| 1× 220Ω resistor |
| 1× red LED |
| jumper wires |
Step by step
Take it further
- Raise the noise floor from 250 to 512 — the faint glow at level 30 (307) disappears and only 70 (716) and 100 stay bright. Push it to 768 and the LED never lights at any playground level at all.
- Add a second LED on D10 that lights when the level is BELOW the threshold (quiet indicator). Use analogRead() once and two `if` branches.
- Print the level to the Serial Monitor and graph how it changes over time when you cycle the sound sensor.
- Replace the threshold with two: level ≥ 200 = LED dim (analogWrite 64), level ≥ 512 = LED bright (analogWrite 255).
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.
Related projects
LDR — Automatic Night LightThe room gets dark, the LED turns on
DHT11 — Digital ThermometerRead the room temperature on your laptop
Ultrasonic — Distance SensorMeasure how far away an object is
Servo — The Hello World of MotorsSweep back and forth forever
PIR — Motion-Activated LEDWalk past, the light turns on. Stand still, it goes off.
Servo — Two Buttons, Two PositionsPress A → go to 0°. Press B → go to 180°.
Where this project sits
It is also part of these lists, which is how a class usually finds it.
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.