Project Files of LDR Sensor Library for Proteus (Light Sensor Module + Arduino)
ldr-sensor-tep-v1-0-d2e949a950054ce59b69ddb406a2cde0.zip

LDR Sensor Library for Proteus V1.0
LDR Sensor Library for Proteus V1.0 comes as a ZIP archive of 12 files (1.4 MB, 3.2 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
LDR Sensor Library for Proteus V1.0 is the download package that goes with our tutorial LDR Sensor Library for Proteus (Light Sensor Module + Arduino). On this page you can download the ZIP file (1.4 MB) and see what is inside before you save it: 12 files in 5 folders, the Proteus library files (LIB and IDX), the simulation model (DLL), a ready Proteus simulation, an Arduino sketch and the compiled HEX firmware. The tutorial explains the design; this page gets the files onto your computer and into use.
What this library is
LDR-Sensor-Library-for-Proteus-v1.0.zip with LDR Simple and Advance (TEPLDR.LIB and TEPLDR.DLL), the TEP Serial Monitor and Arduino UNO libraries for Proteus, the two-UNO Arduino night lamp simulation with its HEX file, the demo sketch and a README.
This is version 1.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
- TEPLDR.LIB – Proteus library, 289.8 KB
- TEPSERIALMON.LIB – Proteus library, 11.1 KB
- ArduinoV3TEP.IDX – Library index, 830 B
- TEPLDR.DLL – Simulation model, 420 KB
- TEPSERIALMON.DLL – Simulation model, 978 KB
- and 6 more, all listed in the File Structure tab
The archive unpacks to 3.2 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, TEPLDR.LIB and TEPSERIALMON.LIB and ArduinoV3TEP.IDX into its LIBRARY folder (Proteus 8: C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY).
- Step 3: Copy TEPLDR.DLL and TEPSERIALMON.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 LDR_Night_Lamp.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 LDR_Night_Lamp.hex; on hardware, flash the same file.
- Step 7: Open LDR-Light-Sensor-ArduinoUnoV3.pdsprj in Proteus and press Play.
Read the detailed guide
This page is for the files. The full tutorial, LDR Sensor Library for Proteus (Light Sensor Module + 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
9.4 KB830 B95.6 KB289.8 KB11.1 KB420 KB978 KB53.2 KB23.4 KB420 KB978 KB29.8 KBGallery12 images from the tutorialOpen the tutorial
The circuit, the board and the results as they appear in LDR Sensor Library for Proteus (Light Sensor Module + Arduino). Open an image for its full size.












README
LDR SENSOR LIBRARY FOR PROTEUS - V1.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/ldr-sensor-library-for-proteus.html
Report a bug or suggest a feature (our forum):
https://www.theengineeringprojects.com/forum/category/ldr-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
LDR-TEP-v1.0/
|-- Proteus Library Files/
| |-- ArduinoV3TEP.IDX 0.8 KB its index -> LIBRARY folder
| |-- ArduinoV3TEP.LIB 95.6 KB TEP Arduino UNO (demo) -> LIBRARY folder
| |-- TEPLDR.LIB 289.8 KB LDR Simple + Advance (2 devices) -> LIBRARY folder
| |-- TEPSERIALMON.LIB 11.1 KB TEP Serial Monitor Advance -> LIBRARY folder
|-- Proteus Model Files/
| |-- TEPLDR.DLL 420.0 KB LDR sensor model -> MODELS folder
| |-- TEPSERIALMON.DLL 978.0 KB Serial Monitor model -> MODELS folder
|-- Proteus Simulation/
| |-- LDR_Night_Lamp.hex 23.4 KB both UNOs (demo sketch V1.0)
| |-- LDR-Light-Sensor-ArduinoUnoV3.pdsprj 53.2 KB demo: UNO 1 + LDR Simple, UNO 2 + LDR Advance
| |-- TEPLDR.DLL 420.0 KB copy of the model so the demo runs as is
| |-- TEPSERIALMON.DLL 978.0 KB copy of the monitor model
|-- Arduino Code/
| |-- LDR_Night_Lamp/LDR_Night_Lamp.ino 9.4 KB the demo sketch (source of the .hex)
|-- README.txt ~30.6 KB this file
Total: 3.23 MB (unzipped). The C++ source code of the model is not included.
WHAT IS IT?
A simulation model of the common LDR light sensor module for Proteus 8 - the
blue LM393 comparator board with a 5 mm GL5528 photoresistor (LDR), the blue
pot, a PWR LED and a D0 LED - with its two outputs:
A0 an analog voltage: HIGHER means DARKER (the LDR's resistance rises in the
dark), 0 - 5 V on the UNO's ADC (about 970 at night, 132 in a lit room,
a few counts in sunlight);
D0 a digital output: LOW in light (brighter than the pot's light level - the
D0 LED lights), HIGH in the dark. A night lamp switches on D0 HIGH.
The model is a real ANALOG part in Proteus's simulator (SPICE): the board's 10 k
pull-up and the LDR form the A0 divider, the LM393's open-collector output with
its 10 k pull-up is D0 - your Arduino reads the node voltages exactly as on a
real board (analogRead / digitalRead). The LDR is a GL5528 (15 k at 10 lux,
falling 0.7 decades per decade of light, 1 Mohm in the dark) and it is SLOW, as
the real one: it follows more light in about 20 ms, but a light going off takes
30 ms for most of the way and a slow tail of about a second for the rest - the
A0 value creeps up for seconds in the dark. You set up the scene: the light on
the sensor (night, a dim room, indoor light, a cloudy day, sunlight, a torch, or
any lux value 0.1 - 100000), a hand over the sensor, a DAY CYCLE (sunrise ->
noon -> sunset -> night every 30 s) and the pot.
The part looks like the real module: the blue board in its real proportions
(about 31 x 14 mm), the LDR with its orange zig-zag track standing over the top
edge, the pot (its rotor turns with the light level), the LM393, the "103" 10 k
resistor, the PWR and D0 LEDs and the 4-pin header. While the simulation runs
the LDR's face lights up with the light it sees, five light beams fall onto it
(a ripple runs down them while the light changes) and a "what the sensor sees"
window above it shows the sky - the night with the moon and stars, a dusk, the
evening with the room lamp, clouds, the sun, the day cycle's sun moving across -,
the torch or the hand, with the light in lux. TEP additions on the board: the
LUX bar (what the demo sketch computes, log scale, with the pot's trip mark in
red), the A0 box (the live A0 voltage), the light beams, the window and the
PANEL / OPEN PANEL button with a SIMPLE / ADVANCE badge.
TWO DEVICES IN ONE LIBRARY (search "LDR" in Pick Devices):
LDR Simple device LDRTEP "LDR Light Sensor (TEP) - Simple"
On-Sheet Panel: the LIGHT SCENE panel on the schematic next to
the sensor - a room with a window (the sky), a ceiling lamp,
the sensor on a table, a torch, a hand; the "A0 vs POT"
comparator gauge, the readouts LUX / LDR / A0 / ADC / D0, the
light presets, a LUX slider (log scale 0.1 - 100000, FINE -/+),
COVER (a hand), DAY CYCLE and the pot -/+. The red X in the
panel's header closes it, the PANEL button on the board (PANEL:
SHOWN / CLOSED) opens it again.
LDR Advance device LDRADVTEP "LDR Light Sensor (TEP) - Advance"
Pop-Up Panel: only the sensor board on the schematic; at Run a
TEP pop-up window opens - the same look as the TEP Serial
Monitor (move it by its header, resize it, minimise it). The
tabs Light and Test sit in the header; the gear and ? icons
open Settings and Help; the palette icon switches the theme:
Light the scene drawn live, THE MODULE (the lux the demo
sketch prints, A0 and its ADC count, D0 and its LED,
the pot's level, the LDR's resistance and the light
it sees, the light on the sensor), every control
(light, a lux slider + -/+ lux, hand, day cycle,
pot), a live A0 chart of the last 10 s (min / max
per 20 ms, the pot's reference, D0 LOW shaded) and
the D0 PIN LOG (every change of D0 with the time,
A0 and the sketch's lux)
Test four tools measured on the running circuit: Light
sweep, D0 threshold, Response time, Night lamp (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 D0 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 (TEPLDR.DLL) and the same properties.
WHAT IS IN V1.0
* Two devices: LDR Simple (the scene panel on the sheet, close / open) and LDR
Advance (pop-up window with the scene, four test tools, settings and help) -
see above.
* Board: the real module's shape (portrait, about 31 x 14 mm) drawn clean and
bold, the LDR on short legs with a lighting face, light beams, the "what the
sensor sees" window, the LUX bar with the trip mark, the A0 box, a PANEL / OPEN
PANEL button and a SIMPLE / ADVANCE badge. LEDs: PWR (red) and D0 (green) are
the module's own; the LUX bar, the A0 box, the beams and the window are TEP
additions (the real board has no display).
* The model: the GL5528's curve, the board's divider and comparator, the LDR's
slow response (20 ms towards light, 30 ms + a 1 s tail towards dark), a hand
over the sensor (3 % of the light), the 30 s day cycle - every value a pure
function of the simulation time, so SPICE always sees the same circuit.
* The panels show what your sketch reads: the ADC count is the UNO's conversion
as Proteus does it (1024 x A0 / 5 V, rounded to the nearest count) and the LUX
readout is the demo sketch's formula (luxFromAdc) on that count - the panel
and the sketch print the same number.
* The day cycle varies the light on its own: the lux slider keeps the light you
set (its BASE, shown as "(base)" in the pop-up), an amber mark shows the cycle's
light now ("DAY CYCLE now 1200 lux"); turning the cycle off goes back to the
base.
* A D0 pin log (every change with the time and A0) and a 10 s A0 history.
* 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 LDR Simple, UNO 2 with LDR
Advance - each with the TEP Serial Monitor Advance (U3 = UNO 1, U4 = UNO 2,
quick buttons) and a night-lamp LED.
* The demo sketch prints the lines it always printed ("Light: about 300 lux
ADC: 132 D0: LOW Day - lamp OFF" twice a second) and adds the commands
HELP, STATUS, READ, EVERY ms, LAMP D0 / LAMP A0 adc and HOLD ms; the lamp is
checked every 10 ms without delay() so the commands stay responsive.
* The sheet is redrawn only when something on it changes, and animates at 12.5
frames a second (the beams' ripple runs while the light changes and 2 s after);
the Advance window repaints at most 5 times a second (at once after a click in
it) - the simulation stays fast.
* The C++ source code is not included (and neither is the Arduino AVR core
archive - its GitHub link is below).
TEST STATUS
V1.0: verified in Proteus 8.5 on 9 Oct 2026 - the demo project as shipped, both
UNOs, the Serial Monitors and the Advance window. What the run showed:
* U3 printed the start lines, then
"Light: about 300 lux ADC: 132 D0: LOW Day - lamp OFF";
the pop-up showed the same 300 lux, A0 0.647 V, ADC 132.
* Light sweep (dark -> bright): D0 HIGH at 10 lux, LOW from 30 lux, A0 crosses
the pot (2.50 V) at 18 lux; ADC 987 at 0.1 lux, 896 at 1, 612 at 10, 241 at
100, 67 at 1000, 13 at 100000 lux.
* D0 threshold: D0 switched at A0 2.500 V (ADC 512) both ways, the HIGH edge
at 14 % less light (the LDR's dark tail), 1 edge up / 1 down.
* Response time (Night <-> Indoor x 3): D0 LOW 19.0 ms after the light came
on, A0 10 - 90 % in 37.0 ms, D0 HIGH 18.0 ms after it went off, settled in
1.36 s.
* Night lamp: the lamp came on at dusk at 15 lux (3.7 s) and went off at dawn
at 18 lux (3.9 s); the headlights switched it off for 499 ms; the passing
shadow did not switch it.
* The panel: no outline left around a button or the banner after another
choice, the day cycle's "(base 0.2 lux)" / "now 398 lux", the red X and
PANEL, readable captions; every Test tile "-" before its tool ran.
One change after that run, for speed only: the Advance window now repaints at
most 5 times a second (at once after a click in it). The model, the panel and
every number above are unchanged (PC-tested).
2299 automatic checks on a PC, 0 failed:
93 on the model (the 57 checks of the first build: the GL5528 curve, the
preset ADC table, the D0 rule for 19 pot positions x 52 light levels, the
LDR's lag, the hand, the day cycle, power; the release: the UNO's ADC and the
demo's lux formula, the light ramp of the tools, the day cycle's base, the four
tools on an ideal circuit, including a 3-step response with readings in every
step); 297 on the complete Proteus model in a small SPICE (the first
build's checks plus both devices, the board's live parts, the day cycle's base
and the redraw rate, the D0 pin log, ASCII-only sheet text, the captions clear
of the buttons, no outline of the start-up selection left around a button or
the status banner after you pick another one, the pop-up's commands, links,
diagnostics and repaint pace, the four tools measured at the nodes); 26 with
the real demo sketch on TWO UNOs against the complete model (every line of
the first version, the panel showing the sketch's numbers, night / hand / day
cycle, every command, headlights with HOLD, the tools while the sketch reads,
every line at most 80 characters);
1883 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; no
numbers on a tool page before its first run). The library generator also
checks every text of the symbols against the parts around it (4696 checks,
under both ways Proteus may place a text, with its boxes grown by 8 thou) and
every part the model recolours or moves (118 checks).
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" (TEPLDR.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 TEPLDR.DLL and TEPSERIALMON.DLL from "Proteus Model Files" to the
MODELS folder (...\Proteus 8 Professional\MODELS).
4. If a TEPLDR.IDX is in the LIBRARY folder, delete it.
5. Start Proteus. In Pick Devices (P) search "LDR": you get the Simple and the
Advance device (category Sensors > Light Sensors).
RUN THE DEMO
"Proteus Simulation\LDR-Light-Sensor-ArduinoUnoV3.pdsprj" - keep the .hex file
and the two DLLs beside the project.
UNO 1 (ARD1): LDR Simple (U1), Serial Monitor U3.
UNO 2 (ARD2): LDR Advance (U2), Serial Monitor U4.
Both run LDR_Night_Lamp.hex. A green LED (D1 / D2) with 220 ohm on A3 of each
UNO: the night lamp (the UNO's own LED on D13 too).
1. Press Run. Both monitor windows open (9600 baud) and so does U2's pop-up.
U3 shows "LDR Light Sensor Night Lamp - The Engineering Projects", "Reading
A0 and D0 every 0.5 s...", "LDR Sensor Library for Proteus - type HELP for
the commands", then "Light: about 300 lux ADC: 132 D0: LOW Day -
lamp OFF" twice a second; U4 the same. The PWR and D0 LEDs are lit, the
LDRs glow, the windows show the evening room with its lamp.
2. U1: click on the panel - NIGHT (the readings climb for a few seconds - the
LDR's dark tail - to "Light: about 0.2 lux ADC: 972 D0: HIGH Night -
lamp ON", the lamp LEDs light), INDOOR, SUNNY DAY, TORCH ON SENSOR, the LUX
slider (click anywhere on it), FINE - LUX / + LUX, COVER ON (a hand: 9 lux,
the lamp comes on), DAY CYCLE ON (the sun crosses the window, the lamp goes
off at sunrise and on at sunset; the slider keeps your light, an amber mark
shows the cycle's light now; OFF goes back to it), POT - / POT + (the light
level in 5 % steps). Close the panel with its red X and open it with PANEL on
the board.
3. U3 / U4 quick buttons: U3 STATUS, HOLD 1000 (the lamp waits 1 s before it
switches - it ignores a short flash), LAMP A0 600 (the lamp from A0: ON above
ADC 600 = darker than about 10 lux), LAMP D0; U4 STATUS, READ, EVERY 1000,
HOLD 0. Type HELP.
4. U2 (Advance): Light page - every control, the live A0 chart, the D0 pin log.
Test page: run the four tools (see THE TEST TOOLS) while the sketch keeps
reading - U4 shows how your sketch sees the same changes (the Night lamp tool
switches UNO 2's lamp four times).
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.
WIRING (the demo)
Sensor VCC -> 5 V supply, GND -> GND, A0 -> the UNO's A0, D0 -> the UNO's A1
(used as a digital input - in the demo the sensor sits left of the UNO and A0
and A1 are both on the UNO's left edge; on your own board D2 or any digital pin
works the same, change SENSOR_D0 in the sketch).
The lamp LED + 220 ohm from A3 to GND on both UNOs (and the UNO's LED on D13).
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: VCC GND D0 A0 (as most boards print it on the header).
REAL HARDWARE:
* Supply 3.3 - 5 V; A0 and the pot's reference follow VCC (ratiometric).
* D0 is LOW in light on almost every board (the D0 LED lights in light) and A0
is HIGHER in the dark. The 3-pin version (VCC GND DO) is the same board
without A0. The KY-018 (an LDR and a resistor only) reads the other way round.
* The pot sets the light level of D0 (the middle position: about 18 lux, a dim
room); clockwise on most boards = D0 says "light" already at less light.
* The board has no hysteresis: with the light right at the pot's level D0 can
chatter (a fluorescent lamp's flicker does it) - let the sketch wait (HOLD).
* Real LDRs vary a lot (8 - 20 k at 10 lux) and drift with temperature: treat
the lux estimate as rough; a light meter needs a photodiode sensor (BH1750).
THE SCENE
LIGHT ON THE NIGHT (0.2 lux), DIM ROOM (10), INDOOR (300 - the room lamp),
SENSOR CLOUDY DAY (1000), SUNNY DAY (50000), TORCH ON SENSOR (20000)
LUX the slider (log scale 0.1 - 100000 lux; a click = two
significant digits), FINE -/+ = x 1.26 (a tenth of a decade)
COVER a hand over the sensor: 3 % of the light gets through (indoor:
9 lux = dark; in sunlight 1500 lux still leak round it)
DAY CYCLE night -> sunrise (06:00) -> noon (50000 lux) -> sunset (18:00)
-> night, every 30 s; D0 LOW (day) from 4.4 to 25.6 s of each
cycle at the middle pot; OFF goes back to the light you set
D0 TRIP POT the reference 5 - 95 % of VCC (default 50 % = 2.50 V = about 18
lux); POT + = a higher reference = "light" already at less light
The LDR: G = 1 / 1 Mohm + (lux / 10)^0.7 / 15 k, R = 1 / G + 100 ohm; A0 = VCC x
R / (R + 10 k). Towards more light it follows in one 20 ms time constant (in
log(lux)); towards less light 85 % with 30 ms and 15 % with a 1 s tail.
THE TEST TOOLS (LDR 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 - the day cycle goes on where it was) 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. The only
model values a tool uses are the lights IT sets (a sweep point, the ramp's light
at the moment D0 changed). Each tool shows one "Good for:" line and one line on
how it measures.
Light sweep Good for: seeing what A0, the ADC and the demo's lux read from
moonlight to sunlight - and where D0 flips. Waits for a flat A0
at the first light (the dark tail needs a few seconds), then 13
lights 0.1 - 100000 lux (half decades), each 0.15 s to settle +
0.25 s measuring: the mean A0, the ADC count, what the demo
sketch prints, the LDR's resistance from the divider, D0; Dark ->
bright or Bright -> dark (both curves stay on the chart). On the
PC (pot 50 %), dark -> bright: ADC 987 at 0.1 lux, 896 at 1,
612 at 10, 422 at 30, 132 at 300, 13 at 100000 lux (the sketch
prints 0.1 / 1.0 / 10.0 / 30 / 300 lux); D0 HIGH up to 10 lux,
LOW from 30 lux, A0 crosses the pot (2.50 V) at 18 lux. Bright
-> dark crosses at 15 lux and reads up to 26 counts lower (396
instead of 422 at 30 lux) - the dark tail.
D0 threshold Good for: setting the pot - the light where D0 flips, and why
a falling light flips it later. A slow light ramp (0.4 decades a
second) from a quarter of the pot's light to four times it and
back, at the pot as set or at 75 / 50 / 25 %: the A0 at which D0
went LOW and back HIGH (the LM393's switching point - there is no
hysteresis on this board), the light at both edges, the D0 LOW /
HIGH levels, the edges per crossing. On the PC: pot 50 % -
D0 went LOW at A0 2.50 V (18.2 lux) and back HIGH at 2.50 V
(15.6 lux): the same A0 both ways, 15 % less light on the way
down (the dark tail); D0 0.015 / 5.00 V, 1 edge per crossing;
75 / 50 / 25 % trip at 3.7 / 18 / 91 lux.
Response time Good for: seeing how fast the LDR reacts - quick to light, slow
to get dark again (the dark tail). Waits for a flat A0 in the
dark, then switches the light on (0.6 s) and off (6 s) 3, 5 or 10
times (Night <-> Indoor, Dim room <-> Cloudy, Night <-> Torch),
keeping every sample: per step the delay to D0 LOW, the A0 10 -
90 % time, the delay to D0 HIGH after the light went off, the ADC
0.1 / 1 / 6 s after it, the settling time. On the PC: Night
<-> Indoor x 3 after a 3.9 s flat lead-in - D0 LOW 19 - 20 ms
after the light came on, A0 10 - 90 % in 37 ms, D0 HIGH 18 ms
after it went off, the ADC 922 / 960 / 972 0.1 / 1 / 6 s after
it (972 = the night value), settled after 1.36 s.
Night lamp Good for: a night lamp - when it switches, how the LDR's slow
dark tail shifts it, what headlights do. A 25 s evening at the
pot as set: day (1000 lux), a passing shadow (a hand, 1 s),
dusk (0.5 decades a second down to 0.2 lux), car headlights at
night (300 lux for 0.5 s), dawn: the light at which the lamp (D0
HIGH, as the demo sketch) switched on and off, how long the
headlights switched it off, every D0 edge. On the PC (pot
50 %): the lamp came on at dusk at 14.6 lux and went off at
dawn at 18.3 lux (the dark tail makes it switch on at less
light); the headlights switched it off for 500 ms (D0 LOW 20
ms after they came on, HIGH 20 ms after they went off); the
passing shadow (30 lux under the hand, ADC up to 389) did not
switch it; 4 D0 edges.
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 light (the panel's buttons
wait); Stop ends it and puts the scene back.
THE DEMO SKETCH ON THE SERIAL MONITOR (LDR_Night_Lamp)
HELP the command list
STATUS the reading interval, the lamp mode, HOLD, the last reading,
the lamp's switches
READ one reading now
EVERY ms the reading interval 100 - 10000 ms (0 = pause)
LAMP D0 the lamp follows D0 (the board's pot) - the default
LAMP A0 adc the lamp is ON while the ADC is above adc (1 - 1022)
HOLD ms the lamp switches only after the light stayed changed this long
(0 - 10000; e.g. HOLD 1000 ignores car headlights)
Monitor quick buttons in the demo: U3 STATUS, HOLD 1000, LAMP A0 600, LAMP D0;
U4 STATUS, READ, EVERY 1000, HOLD 0.
Every line the demo prints is shorter than 80 characters (the TEP Serial
Monitor's Simple interface shows about 80); it prints nothing periodically but
the readings.
EXPECTED MONITOR OUTPUT (U3 and U4)
LDR Light Sensor Night Lamp - The Engineering Projects
Reading A0 and D0 every 0.5 s...
LDR Sensor Library for Proteus - type HELP for the commands
Light: about 300 lux ADC: 132 D0: LOW Day - lamp OFF
Then NIGHT on U1 (the readings creep up for a few seconds - the dark tail) and
STATU
…Development1 release
-
V1.0LDR Sensor Library for Proteus V1.0this page
V1.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 ldr-sensor-tep-v1-0-d2e949a950054ce59b69ddb406a2cde0.zip and choose Extract All (or open it with 7-Zip or WinRAR) into a folder you can find again. Keep its folder structure (LDR-TEP-v1.0) as it is.
- 2
Copy the library files into Proteus
Move ArduinoV3TEP.LIB, TEPLDR.LIB and TEPSERIALMON.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 TEPLDR.DLL and TEPSERIALMON.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 LDR_Night_Lamp.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 LDR_Night_Lamp.hex and run the simulation. For real hardware, flash the same file with your programmer.
- 7
Open the example simulation
Open LDR-Light-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
LDR Sensor Library for Proteus (Light Sensor Module + Arduino) explains every connection and setting in order; keep it open beside the files while you build.
FAQs9 questionsContact TEP
How do I download LDR Sensor Library for Proteus V1.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?
LDR Sensor Library for Proteus V1.0 comes as a ZIP archive of 12 files (1.4 MB, 3.2 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, 985ef87fdf97248caa5b2bffb0e8571bbfe19e7de55c23900d2a6d39cf8ce596. In PowerShell run Get-FileHash "ldr-sensor-tep-v1-0-d2e949a950054ce59b69ddb406a2cde0.zip"; on macOS or Linux run shasum -a 256 "ldr-sensor-tep-v1-0-d2e949a950054ce59b69ddb406a2cde0.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.
- 36Total downloads
- 4%Popularity
- ProteusCategory
- 0Comments
- ssyedzainnasirUploaded by
- 9 Oct 2026Uploaded at
985ef87fdf97248caa5b2bffb0e8571bbfe19e7de55c23900d2a6d39cf8ce596
















Comments
0