Project Files of Sound Sensor Library for Proteus V3.0 (KY-038 + Arduino)
sound-sensor-tep-v3-0-7a1a821e2e68413fb95c1d158e896065.zip

Sound Sensor Library for Proteus V3.0
Sound Sensor Library for Proteus V3.0 comes as a ZIP archive of 12 files (1.4 MB, 3.0 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, an Arduino sketch and compiled HEX firmware.
- LIBProteus library
- IDXProteus library index
- DLLProteus model
- DSNProteus simulation
- INOArduino sketch
- HEXHEX firmware
Description
Looking for the files of Sound Sensor Library for Proteus V3.0 (KY-038 + Arduino)? Sound Sensor Library for Proteus V3.0 is the ZIP package (1.4 MB) you need. It holds the Proteus library files (LIB and IDX), the simulation model (DLL), a ready Proteus simulation, an Arduino sketch and the compiled HEX firmware. Below are the file structure, the README and the installation steps, so you can go from download to a working Proteus simulation in a few minutes.
What this library is
Sound-Sensor-Library-for-Proteus-v3.0.zip with Sound Simple and Advance (TEPSOUND.LIB and TEPSOUND.DLL), the TEP Serial Monitor and Arduino UNO libraries for Proteus, the Arduino clap switch simulation with its HEX file, the demo sketch Clap_Switch.ino and a README.
This is version 3.0; older or newer releases, when they exist, are listed in the Development tab.
What is inside the ZIP file
- ArduinoV3TEP.LIB – Proteus library, 95.6 KB
- TEPSERIALMON.LIB – Proteus library, 11.1 KB
- TEPSOUND.LIB – Proteus library, 108.7 KB
- ArduinoV3TEP.IDX – Library index, 830 B
- TEPSERIALMON.DLL – Simulation model, 978 KB
- TEPSOUND.DLL – Simulation model, 410.5 KB
- and 6 more, all listed in the File Structure tab
The archive unpacks to 3.0 MB and carries its own README (README.txt), shown in the README tab above.
How to download
Use the download panel at the top of this page: after the counter (30 seconds for guests, 10 for members) the black button unlocks and the ZIP file comes straight from our content network. If the browser opens it instead of saving, use Save as; extract the whole archive before using anything inside it.
How to install
- Step 1: Extract the ZIP file with Windows (Extract All), 7-Zip or WinRAR, keeping its folders.
- Step 2: Close Proteus and copy ArduinoV3TEP.LIB, TEPSERIALMON.LIB and TEPSOUND.LIB and ArduinoV3TEP.IDX into its LIBRARY folder (Proteus 8: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY).
- Step 3: Copy TEPSERIALMON.DLL and TEPSOUND.DLL into the MODELS folder next to it, so the part simulates.
- Step 4: Start Proteus, press P and search for "ArduinoV3TEP"; place and wire it as in the tutorial.
- Step 5: Open Clap_Switch.ino in the Arduino IDE, pick board and port and Verify (Export Compiled Binary gives the HEX).
- Step 6: In Proteus set the controller's Program File to Clap_Switch.hex; on hardware, flash the same file.
- Step 7: Open Sound-Sensor-ArduinoUnoV3.pdsprj in Proteus and press Play.
Read the detailed guide
This page is for the files. The full tutorial, Sound Sensor Library for Proteus V3.0 (KY-038 + Arduino), explains the circuit and the code step by step and shows the working results and the simulation; read it before you build. Questions about the download or the installation go in the comments below; more Proteus downloads are listed further down this page.
File Structure
8.9 KB830 B95.6 KB11.1 KB108.7 KB978 KB410.5 KB16.5 KB33.1 KB978 KB410.5 KB29.9 KBGallery12 images from the tutorialOpen the tutorial
The circuit, the board and the results as they appear in Sound Sensor Library for Proteus V3.0 (KY-038 + Arduino). Open an image for its full size.












README
SOUND SENSOR LIBRARY FOR PROTEUS - V3.0
Designed by The Engineering Projects
www.TheEngineeringProjects.com
IMPORTANT LINKS
Article (read it first - pictures, step by step, every feature explained):
https://www.theengineeringprojects.com/2026/10/sound-sensor-library-for-proteus-v3-0.html
Report a bug or suggest a feature (our forum):
https://www.theengineeringprojects.com/forum/category/sound-sensor-proteus-library
The demo uses our TEP Serial Monitor Advance (included) instead of Proteus's
Virtual Terminal - its own article:
https://www.theengineeringprojects.com/2026/10/serial-monitor-advance-proteus-library.html
Support us (the libraries are free):
https://www.theengineeringprojects.com/donate
FILE STRUCTURE
SOUND-TEP-v3.0/
|-- Proteus Library Files/
| |-- ArduinoV3TEP.IDX 0.8 KB its index -> LIBRARY folder
| |-- ArduinoV3TEP.LIB 95.6 KB TEP Arduino UNO (demo) -> LIBRARY folder
| |-- TEPSERIALMON.LIB 11.1 KB TEP Serial Monitor Advance -> LIBRARY folder
| |-- TEPSOUND.LIB 108.7 KB Sound Simple + Advance (2 devices) -> LIBRARY folder
|-- Proteus Model Files/
| |-- TEPSERIALMON.DLL 978.0 KB Serial Monitor model -> MODELS folder
| |-- TEPSOUND.DLL 410.5 KB sound sensor model -> MODELS folder
|-- Proteus Simulation/
| |-- Clap_Switch.hex 16.5 KB both UNOs (demo sketch v3.0)
| |-- Sound-Sensor-ArduinoUnoV3.pdsprj 33.1 KB demo: UNO 1 + Sound Simple, UNO 2 + Sound Advance
| |-- TEPSERIALMON.DLL 978.0 KB copy of the monitor model
| |-- TEPSOUND.DLL 410.5 KB copy of the model so the demo runs as is
|-- Arduino Code/
| |-- Clap_Switch/Clap_Switch.ino 8.9 KB the demo sketch (source of the .hex)
|-- README.txt ~30.6 KB this file
Total: 3.01 MB (unzipped). The C++ source code of the model is not included.
WHAT IS IT?
A simulation model of the KY-038 sound sensor module for Proteus 8 - the blue
board with the electret microphone at one end, the blue multi-turn sensitivity
pot, the LM393 comparator, a PWR LED and a D0 LED - with its two outputs:
A0 an analog voltage: the microphone's sound WAVE riding on a DC level that
the pot sets (about 2.59 V = ADC 530 at 5 V in a quiet room). A louder
sound makes a bigger swing: a clap 10 cm away swings A0 by more than 100
counts, normal talking by only a few;
D0 a digital output: HIGH while the sound's wave dips below VCC/2 - so a loud
sound makes D0 PULSE many times (the D0 LED flickers); LOW when quiet.
The model is a real ANALOG part in Proteus's simulator (SPICE): A0 is the
microphone node of the board (4.7 k output resistance, ratiometric to VCC), D0
is the LM393's open-collector output with its 10 k pull-up - your Arduino reads
the node voltages exactly as on a real board (analogRead / digitalRead). You set
up the scene: the sound (a quiet room, talking, music, an alarm clock, a clap
or a double clap), how far away it is (10, 25 or 60 cm) and the pot.
The part looks like the real module: the blue board in its real proportions
(about 35 x 15 mm, portrait), the silver microphone capsule with its black mesh,
the blue multi-turn trimmer (its brass screw turns with the pot), the LM393, the
PWR and D0 LEDs and the 4-pin header A0 G + D0. While the simulation runs sound
rings pulse around the microphone (blue: a sound below the trip level, orange:
D0 pulses, red: a clap that was heard) and a "SOUND" window above the board
shows what the microphone hears - the source (a moon in the quiet room, a
person talking, a loudspeaker, an alarm clock, clapping hands), the sound waves
and a 60 ms mini scope of A0. TEP additions on the board (the real board has
only the PWR and D0 LEDs): the CLAP LED (lit for 0.3 s after a clap that tripped
D0), the SOUND LEVEL bar (P-P: the peak-to-peak of A0 over the last 50 ms, 10
segments, with the pot's trip mark in red), the sound rings, the SOUND window
and the PANEL / OPEN PANEL button with a SIMPLE / ADVANCE badge.
TWO DEVICES IN ONE LIBRARY (search "Sound" in Pick Devices):
Sound Simple device SOUNDTEP "Sound Sensor KY-038 (TEP) - Simple"
On-Sheet Panel: the KY-038 SOUND SCENE panel on the schematic
next to the sensor - the source and a small KY-038 on a stand
on a floor with a distance ruler (60 / 25 / 10 cm), the sound
waves, a banner (QUIET / SOUND BELOW THE THRESHOLD / SOUND
DETECTED / CLAP! / POT TOO FAR / NO POWER), a scope "A0 -
LAST 100 ms" (every 1 ms column the min / max of the A0 node
as Proteus solved it, the VCC/2 line, a D0 lane), the readouts
SOUND LEVEL / A0 / ADC / D0 / CLAPS and two rows of buttons
(QUIET ROOM, TALKING, MUSIC, CLAP, DOUBLE CLAP, ALARM; NEAR 10
cm, MID 25 cm, FAR 60 cm, POT - / POT + and the pot's text).
The red X in the panel's header closes it, the PANEL button on
the board (PANEL: SHOWN / CLOSED) opens it again. Before Run
every button looks unselected; the selection lights at Run.
Sound Advance device SOUNDADVTEP "Sound Sensor KY-038 (TEP) - Advance"
Pop-Up Panel: only the sensor board on the schematic; at Run a
TEP pop-up window "TEP Sound Sensor Advance" opens - the same
look as the TEP Serial Monitor (move it by its header, resize
it, minimise it). The tabs Sound and Test sit in the header;
the gear and ? icons open Settings and Help; the palette icon
switches the theme:
Sound the scene live with the 100 ms scope, SET THE
SOUND (source, Clap / Double clap, a level slider
40 - 110 dB for the chosen source with a marker of
the level now, the distance, the pot - / + 5),
WHAT THE BOARD DOES (MEASURED) (supply, A0 and its
ADC count, the A0 level and peak-to-peak with the
demo sketch's 50 ms formula, D0 and its pulses in
100 ms, the last D0 burst, the LEDs, the VCC/2
reference and the margin, the level that makes D0
pulse), a live chart of the last 20 s (A0 min /
max per 100 ms, D0 pulses) and the PIN / EVENT LOG
(power, every scene change, every D0 burst with
its pulses, length and lowest A0, every clap heard
or too quiet)
Test four tools measured on the running circuit: Level
sweep, D0 threshold, Clap timing, Scope capture
(see THE TEST TOOLS below)
Settings theme (TEP Dark / Light), text size, open at Run,
window size - remembered for your Windows user
Help Help & Support like the TEP Serial Monitor:
report a bug, suggest a feature, article, user
guide, updates, donate, website, forum; Copy
diagnostics (sensor, scene, board, the event log,
the test results) for a bug report
The OPEN PANEL button on the board opens the window again
after you close it.
Both devices use the same model (TEPSOUND.DLL) and the same scene properties.
NEW IN V3.0
* Two devices: Sound Simple (the scene panel on the sheet, close / open) and
Sound Advance (pop-up window with the scene, four test tools, settings and
help) - see above.
* Board: the real module's shape (portrait, about 35 x 15 mm) drawn clean and
bold, sound rings around the microphone, the SOUND window above the board,
the CLAP LED, the SOUND LEVEL bar with the trip mark, a PANEL / OPEN PANEL
button and a SIMPLE / ADVANCE badge. LEDs: PWR and D0 (red) are the module's
own; the CLAP LED and the bar are TEP additions.
* Everything shown is MEASURED: the panels' scope, A0, ADC, peak-to-peak and D0
pulses come from the A0 and D0 node voltages of the running circuit (every
simulation timepoint), not from the model's own numbers. The ADC count is the
UNO's own conversion (round(1024 x A0 / 5 V), 0 - 1023) and the level /
peak-to-peak is the demo sketch's formula (50 ms mean / max - min).
* Faster simulation: the time steps follow the sound - 1 ms in a quiet room,
50 us during a clap, 80 us for the alarm and the test tone, 125 us talking,
200 us music (v1.0: 50 us for every sound) - about 5 000 - 6 800 timepoints
per simulated second while a sound plays instead of 20 000. The board and the
panel redraw only when something visible changes, at most 12.5 times a second.
* A pin / event log and a 20 s A0 history (Advance).
* A double clap's two claps are each judged with the scene of their moment; a
test tone (1 kHz) for the tools; a level for every source (Advance slider).
* Four test tools (Advance, Test page) - every number measured at the A0 and D0
pins of the running circuit.
* The demo: ONE project with two UNOs - UNO 1 with Sound Simple, UNO 2 with
Sound Advance - each with the TEP Serial Monitor Advance instead of the
Virtual Terminal (U3 = UNO 1, U4 = UNO 2, quick buttons) and a green "lamp"
LED on D13.
* The demo sketch (Clap_Switch v3.0) keeps every line of the first version
("Clap! A0 peak-to-peak: 137 (1 of 2) - clap again within 0.8 s", the level
line every 2 s) and adds the commands HELP, STATUS, READ, EVERY ms, IGNORE ms,
GAP ms, CLAPS 1 / 2, LAMP ON / OFF.
* Version 3.0 everywhere; the C++ source code is not included (and neither is
the Arduino AVR core archive - its GitHub link is below).
TEP published earlier versions of a sound sensor library for Proteus; V3.0 is a
new model with its own parts and files (TEPSOUND.LIB / TEPSOUND.DLL).
TEST STATUS
V3.0: verified in Proteus 8.5 on 9 Oct 2026. The demo project loads and starts
cleanly: U3 / U4 print the start lines, then "A0 level: 530 sound
peak-to-peak: 1 D0: LOW lamp: OFF". DOUBLE CLAP: "Clap! A0 peak-to-peak:
134 (1 of 2) ..." and "Clap! A0 peak-to-peak: 135 (2 of 2) -> lamp ON";
the event log shows 2 bursts of 9 pulses in 18.1 ms, A0 down to ADC 464. On the
sheet MUSIC (75 dB) shows "SOUND BELOW THE THRESHOLD - D0 STAYS LOW", ALARM
"SOUND DETECTED - D0 PULSES HIGH, D0 LED FLASHES" (its beeps toggle the lamp);
no rim around the buttons, every caption readable, the red X and PANEL work.
The four tools in Proteus:
Level sweep D0 from 85 dB (predicted 83.8), the swing doubles every 6.0
dB; P-P 25 / 45 / 77 / 137 / 241 at 80 / 85 / 90 / 95 / 100
dB; quiet floor P-P 3.
D0 threshold pots 515 / 520 / 530 / 545 / 560: D0 from 67 / 77 / 84 / 89
/ 93 dB, 1.00 pulse per cycle, 272 - 350 us wide, duty
27 - 35 %.
Clap timing NEAR 9 pulses in 18.1 ms, P-P 138; MID 3 pulses in 4.4 ms,
P-P 55; FAR not heard; ignore D0 30 ms.
Scope capture tone 1 kHz 90 dB, D0 rising, 20 ms: 999.8 Hz, P-P 0.377 V =
ADC 77, 20 pulses 331 - 345 us wide, duty 34 %, 938 samples
(Proteus steps finer than the model's caps, here 2 us).
Speed: about 0.4 x real time while the level sweep plays with the pop-up open.
The PC tests below were run before:
1375 automatic checks on a PC, 0 failed:
126 on the model (the checks of the first build: the dB law, the quiet room,
every source x distance, the claps, the pot, restart; V3.0: the test tone and
the levels, the time steps, the predicted trip level, the UNO's ADC, a double
clap with any gap, the four tools on an ideal circuit); 248 on the complete
Proteus model in a small SPICE (both devices, power, every source and the time
steps, claps and the double-clap breakpoint, the pot, close / open, the
board's live parts, the pop-up, the event log, ASCII-only sheet text in every
state, every sheet text clear of the buttons as Proteus draws them, no rim of
the start-up colour around a repainted button, banner or readout (every
point of a 12-thou ring checked), the measured scope / ADC / peak-to-peak,
the four tools measured at the nodes, the time points and redraws per
simulated second); 32 with the real V3.0 demo sketch on TWO UNOs against the
complete model (every line of the first
version, a clap, a double clap, a FAR clap heard only after POT -, the Clap
timing tool while the sketch counts the same claps, every command, every line
at most 80 characters); 969 on the rendered boards and pop-up windows (every
page fits in TEP Dark and Light, at Large text and 150 % DPI; no table cell
cut; no empty band over 12 % on a Test page; every tool's hint lines fit;
every header state fits).
INSTALLATION (about 2 minutes)
1. Close Proteus. Extract the WHOLE ZIP to a normal folder (e.g. Desktop).
2. Copy everything in "Proteus Library Files" (TEPSOUND.LIB with both devices,
TEPSERIALMON.LIB and the TEP Arduino UNO V3 library ArduinoV3TEP.LIB / .IDX
used by the demo) to the LIBRARY folder of Proteus, for example:
C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY
(on some PCs: C:\ProgramData\Labcenter Electronics\Proteus 8 Professional\
LIBRARY - use the folder that already holds Proteus's own .LIB files).
3. Copy TEPSOUND.DLL and TEPSERIALMON.DLL from "Proteus Model Files" to the
MODELS folder (...\Proteus 8 Professional\MODELS).
4. If a TEPSOUND.IDX is in the LIBRARY folder, delete it.
5. Start Proteus. In Pick Devices (P) search "Sound": you get the Simple and the
Advance device (category Sensors > Sound).
RUN THE DEMO
"Proteus Simulation\Sound-Sensor-ArduinoUnoV3.pdsprj" - keep the .hex file and
the two DLLs beside the project.
UNO 1 (ARD1): Sound Simple (U1), Serial Monitor U3.
UNO 2 (ARD2): Sound Advance (U2), Serial Monitor U4.
Both run Clap_Switch.hex. A green LED (D1 / D2) with 220 ohm on D13 of each
UNO: the lamp that the claps switch ON and OFF.
1. Press Run. Both monitor windows open (9600 baud) and so does U2's pop-up.
U3 shows "Clap Switch - KY-038 Sound Sensor - The Engineering Projects",
"Clap twice to switch the lamp (D13) ON / OFF", "Type HELP for the
commands.", then every 2 s "A0 level: 530 sound peak-to-peak: 1 D0:
LOW lamp: OFF"; U4 the same. The PWR LEDs are lit, the quiet room shows
the moon.
2. U1: click CLAP on the panel - the hands clap, the rings turn red, the D0
and CLAP LEDs flash, the scope shows the burst, U3 prints "Clap! A0
peak-to-peak: 137 (1 of 2) - clap again within 0.8 s" and 0.8 s later
"Only one clap - lamp unchanged". DOUBLE CLAP: "(1 of 2)" then "Clap! A0
peak-to-peak: 138 (2 of 2) -> lamp ON" - the green LED lights. MID 25 cm:
claps are still heard (peak-to-peak about 55); FAR 60 cm: a clap is too
quiet for the pot (nothing printed) - click POT - three times (quiet A0
515) and it is heard. ALARM at NEAR: D0 pulses with the beeps (each beep
counts as a clap - the sketch toggles the lamp); TALKING and MUSIC stay
below the trip level at the default pot - the KY-038 hears claps, not
speech. Close the panel with its red X and open it with PANEL on the board.
3. U3 / U4 quick buttons: U3 STATUS, READ, EVERY 0 (no level lines), EVERY
2000; U4 STATUS, CLAPS 1 (one clap switches the lamp), CLAPS 2, HELP.
4. U2 (Advance): Sound page - every control, the level slider, the live
chart, the event log. Test page: run the four tools (see THE TEST TOOLS)
while the sketch keeps running - U4 shows how your sketch sees the same
claps (Clap timing: the sketch prints the same claps and the same
peak-to-peak as the tool's "Sketch P-P").
5. Close U2's window and open it again with OPEN PANEL on the board.
Closed a monitor window? Click OPEN MONITOR on the monitor part.
While a sound plays the simulation needs about 5 - 7 times more time steps than
in a quiet room; then it runs slower than real time (about 0.4 x in our test
with the pop-up open).
WIRING (the demo)
Sensor A0 -> the UNO's A0, G -> GND, + -> 5 V supply, D0 -> the UNO's D2.
The lamp LED + 220 ohm from D13 to GND on both UNOs (and the UNO's own LED).
Serial Monitor RXD <- Arduino D1 (TX), Serial Monitor TXD -> Arduino D0 (RX),
Serial Monitor GND -> ground. RXD2 is not needed: the sensor has no serial line
to watch.
Pin order in Proteus: A0 GND VCC D0 (as the KY-038 header prints it: A0 G + D0).
REAL HARDWARE:
* Supply 3.3 - 5 V; A0 and the comparator's VCC/2 reference follow VCC.
* A0 is the raw microphone signal (no amplifier): a quiet room reads about
500 - 530, a clap close by swings it by tens to 100+ counts, speech by a few.
Read it as a peak-to-peak over about 50 ms (as the demo), not as one sample.
* D0 is HIGH while the sound's wave dips below VCC/2 - it PULSES at the sound's
frequency (no hysteresis): take the first pulse and ignore D0 for 100 - 200
ms, otherwise one clap counts many times (the Clap timing tool measures the
burst).
* The D0 LED always on means the pot is turned too far (the quiet A0 level is
below VCC/2): turn it back until the LED just goes off in a quiet room.
* A few boards and tutorials have D0 the other way round, and the 3-pin "sound
detection module" (OUT GND VCC) is active LOW - check your D0 LED. The KY-037
is the same board with a bigger microphone.
* The model keeps the PWR LED's load and the 10 k D0 pull-up; the real board
draws a few mA.
THE SCENE
SOUND SOURCE QUIET ROOM (35 dB), TALKING (68 dB at 10 cm: phrases of
syllables), MUSIC (80 dB: a chord with a beat), ALARM (90 dB:
880 Hz beeps, 0.25 s on / 0.25 s off); CLAP (100 dB, an 80 ms
burst) and DOUBLE CLAP (two claps 0.35 s apart) add claps on
top of the source
DISTANCE NEAR 10 cm (0 dB), MID 25 cm (-8 dB), FAR 60 cm (-16 dB)
SENSITIVITY the pot: the quiet A0 level, ADC 490 - 600 (default 530 =
POT 2.59 V, 18.5 counts above VCC/2); POT - / POT + in steps of 5;
POT - = MORE sensitive (a quieter sound trips D0). At 510 and
below the quiet level is under VCC/2: D0 stuck HIGH.
LEVEL Advance only: the chosen source's level at 10 cm, 40 - 110 dB.
The sound's swing at A0 (peak, ADC counts) = 120 x 10^((dB at the mic - 100) /
20): 6 dB louder = twice the swing. D0 pulses when the swing's dips reach below
VCC/2, i.e. when the peak is larger than the pot's margin. With the default
pot: claps at NEAR and MID trip D0, FAR not (POT 515 hears it); the alarm trips
D0 at NEAR only; music needs POT 515 or a higher level; talking never.
THE TEST TOOLS (Sound Advance, Test tab) - what they really measure
Every tool runs on the live model: it takes the scene over (and puts it back
when it ends) and measures the A0 and D0 node voltages of the running circuit at
every simulation timepoint - so every number is what the circuit really did,
measured with the simulation clock. Each tool shows one "Good for:" line and one
line on how it measures.
Level sweep Good for: seeing how big A0's swing is for a given loudness,
and how loud a sound must be to trip D0. A 1 kHz test tone at
the microphone, 13 levels (40 - 100 dB, 5 dB steps) or 21
levels (60 - 100 dB, 2 dB steps), after 0.2 s of quiet; each
level held 110 ms (10 ms settle, 100 ms measured): A0 min /
max, the peak-to-peak in UNO ADC counts, the expected one, D0
pulses and duty; the level where D0 starts to pulse (against
the prediction from the pot) and how many dB double the swing.
On the PC (pot 530, NEAR): D0 from 85 dB (predicted 83.8),
the swing doubles every 6.0 dB, quiet P-P 1; P-P 25 at 80 dB,
77 at 90 dB, 241 at 100 dB.
D0 threshold Good for: setting the pot - the exact loudness at which D0
starts to pulse, for one pot setting or five. The test tone
ramps up 1 dB every 60 ms from 6 dB below the predicted trip
level (after 0.15 s of quiet) until D0 pulses; then 6 dB above
it: pulses per tone cycle, pulse width and duty. Pot as set or
515 / 520 / 530 / 545 / 560. On the PC: 515 -> 67 dB
(predicted 69.3), 520 -> 77 (77.0), 530 -> 84 (83.8),
545 -> 89 (88.9), 560 -> 92 (92.1); 6 dB above: one pulse per
cycle, 270 - 330 us wide, duty 27 - 33 %.
Clap timing Good for: choosing the debounce and the double-clap window
of a clap switch, from the real D0 burst. Three steps (single
or double claps; NEAR / MID / FAR or the distance as set),
each after at least 0.3 s of quiet with D0 LOW; every reading
of every step is kept: the first D0 pulse after the clap, the
number of pulses, the burst length, the lowest A0, the
sketch's peak-to-peak (40 ms after the first pulse, as the
demo), the gap between two claps; the debounce it suggests and
what the demo's rule would count. On the PC (double claps):
NEAR - first pulse after 1.75 ms, 9 pulses in 18 ms, A0 down
to 2.26 V, sketch P-P 138; MID - 3.15 ms, 3 pulses in 4.3 ms,
2.46 V, P-P 55; FAR - not heard (A0 only down to 2.54 V);
gap 350 ms; debounce 30 ms; the demo counts 4 claps and
toggles twice.
Scope capture Good for: looking at the real waveform - the tone's
frequency, a clap's burst, and D0's pulses under it. The sound
as set, the 1 kHz tone (90 dB), the alarm or a clap; a 10, 20
or 50 ms window, triggered by D0 rising (or now), 20 % before
the trigger; every simulation sample: the peak-to-peak (V and
ADC), the frequency (A0's crossings of its mean), D0 pulses,
widths and duty, the time steps. On the PC (tone, 20 ms): 251
samples 80 us apart, 999.7 Hz, P-P 0.377 V = ADC 77, 20 D0
pulses 320 - 400 us wide, duty 33 %.
The tools refuse to start, with the reason, when the sensor has no power or
another test runs. While a tool runs it owns the scene (the panel's buttons
wait); Stop ends it and puts the scene back.
THE DEMO SKETCH ON THE SERIAL MONITOR (Clap_Switch v3.0)
HELP the command list
STATUS the lamp, the claps so far and the settings below
READ one level line now
EVERY ms the level line every ms milliseconds (EVERY 0 = no level lines;
READ still works) - default 2000
IGNORE ms after a clap, ignore D0 for this long (10 - 2000) - default 200
GAP ms the second clap must come within this time (100 - 5000) -
default 800
CLAPS 1 / 2 one clap or two claps switch the lamp - default 2
LAMP ON / OFF switch the lamp by hand
Monitor quick buttons in the demo: U3 STATUS, READ, EVERY 0, EVERY 2000; U4
STATUS, CLAPS 1, CLAPS 2, HELP.
Every line the demo prints is shorter than 80 characters (the TEP Serial
Monitor's Simple interface shows about 80); it prints nothing by itself but the
claps and the level line.
EXPECTED MONITOR OUTPUT (U3 and U4)
Clap Switch - KY-038 Sound Sensor - The Engineering Projects
Clap twice to switch the lamp (D13) ON / OFF
Type HELP for the commands.
A0 level: 530 sound peak-to-peak: 1 D0: LOW
…Development1 release
-
V3.0Sound Sensor Library for Proteus V3.0this page
V3.0 is the only release in the Download Center so far. When a newer version is published, it appears above with its own download page.
Installation8 steps
From the download to a working project, in order. The steps follow what the package contains.
You will need
- Proteus Design SuiteProteus 8 or newer (Labcenter), on Windows
- Arduino IDE1.8 or 2.x, with the board of the tutorial chosen under Tools → Board
- Any archive toolWindows, macOS and Linux extract ZIP files on their own
Steps
- 1
Extract the archive
Right-click sound-sensor-tep-v3-0-7a1a821e2e68413fb95c1d158e896065.zip and choose Extract All (or open it with 7-Zip or WinRAR) into a folder you can find again. Keep its folder structure (SOUND-TEP-v3.0) as it is.
- 2
Copy the library files into Proteus
Move ArduinoV3TEP.LIB, TEPSERIALMON.LIB and TEPSOUND.LIB and ArduinoV3TEP.IDX into the LIBRARY folder of your Proteus installation: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY for Proteus 8, or the matching Proteus 7 folder. Older versions keep it under ProgramData\Labcenter Electronics. If Proteus is open, close it first.
- 3
Add the simulation model
Copy TEPSERIALMON.DLL and TEPSOUND.DLL into the MODELS folder next to LIBRARY, so the component can run, not only be drawn.
- 4
Restart Proteus and place the component
Start Proteus, open a schematic, press P (Pick Devices) and search for the component by the name used in the tutorial. It appears with its pins ready to wire.
- 5
Open the sketch in the Arduino IDE
Open Clap_Switch.ino, select your board and port under Tools, then Verify. Sketch → Export Compiled Binary writes the HEX file a simulation needs.
- 6
Load the HEX file
In Proteus double-click the microcontroller, set Program File to Clap_Switch.hex and run the simulation. For real hardware, flash the same file with your programmer.
- 7
Open the example simulation
Open Sound-Sensor-ArduinoUnoV3.pdsprj in Proteus to see the wiring exactly as in the tutorial. Check the controller's Program File path, then press Play.
- 8
Follow the tutorial
Sound Sensor Library for Proteus V3.0 (KY-038 + Arduino) explains every connection and setting in order; keep it open beside the files while you build.
FAQs9 questionsContact TEP
How do I download Sound Sensor Library for Proteus V3.0?
Wait for the 30-second guest countdown on this page, then press the download button; the file comes straight from our storage. Members who are logged in skip the wait. If the browser opens the file instead of saving it, use its Save as option. The download link is made for you when the countdown ends and works for 15 minutes; a saved or shared link stops working, so share this page instead.
What is inside the archive?
Sound Sensor Library for Proteus V3.0 comes as a ZIP archive of 12 files (1.4 MB, 3.0 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, an Arduino sketch and compiled HEX firmware. Open the File Structure tab for the full list of 12 files.
What should I do if the download does not start?
Check the browser's download list first; an ad blocker or a company firewall can also hold it back, so try another browser or network. If the file arrives incomplete, download it again. For an installation problem, read the Install tab or tell us in the comments with your software version and the exact error message.
Is this file free?
Yes. Every file in the TEP Download Center is free for learning, personal and student projects. If you share it, link back to this page or the tutorial so others find the latest version.
How do I check that the file arrived complete?
Compare its SHA-256 with the one on this page, 73100acf90e7e3cecce256ab57297fce41631113445643caa5b0fba23155983f. In PowerShell run Get-FileHash "sound-sensor-tep-v3-0-7a1a821e2e68413fb95c1d158e896065.zip"; on macOS or Linux run shasum -a 256 "sound-sensor-tep-v3-0-7a1a821e2e68413fb95c1d158e896065.zip". The same value means the file is exactly the one in our storage; a different one means the download broke off, so download it again.
Do I need WinRAR to open the ZIP file?
No. Windows, macOS and Linux open ZIP archives on their own (Extract All, or double-click). WinRAR and 7-Zip work too. Extract the whole archive before using the files.
Where do I put the LIB and IDX files?
Both files go into the LIBRARY folder of your Proteus installation (Proteus 8: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY; Proteus 7 has the same folder under its own name). Restart Proteus afterwards and search for the component with P.
Which Proteus version does the library need?
The tutorial names the Proteus version the library was made and tested with. Most TEP libraries work in Proteus 7 and Proteus 8; if the component does not appear after a restart, check that both the LIB and the IDX file were copied and that Proteus was fully closed while copying.
How do I get the HEX file into the simulation?
Compile the sketch in the Arduino IDE (Sketch → Export Compiled Binary gives you the HEX next to the sketch), then in Proteus double-click the board, set Program File to that HEX and run.
Members skip the wait. Log in or join TEP.
- 21Total downloads
- 4%Popularity
- ProteusCategory
- 0Comments
- ssyedzainnasirUploaded by
- 9 Oct 2026Uploaded at
73100acf90e7e3cecce256ab57297fce41631113445643caa5b0fba23155983f
















Comments
0