Project Files of AS3935 Lightning Sensor Library for Proteus Simulation
7433efc5a6114426bbbba358a7d62d4f.zip

AS3935 Lightning Sensor Library for Proteus V1.0
AS3935 Lightning Sensor Library for Proteus V1.0 comes as a ZIP archive of 22 files (2.6 MB, 5.7 MB unpacked) holding Proteus library files, simulation model DLLs, a Proteus simulation, an Arduino sketch and compiled HEX firmware.
- LIBProteus library
- DLLProteus model
- DSNProteus simulation
- INOArduino sketch
- HEXHEX firmware
Description
AS3935-Lightning-Sensor-Library-for-Proteus-v1.0.zip with the AS3935 lightning sensor for Proteus simulation (TEPAS3935.LIB and TEPAS3935.DLL), our I2C LCD, resistors, LEDs and active buzzer, our Arduino UNO V4.0, the A4 demo, its sketch and a README.
File Structure
8.3 KB201.9 KB17.1 KB9.9 KB181.4 KB21.8 KB306.9 KB883.5 KB317.5 KB276 KB409 KB289.5 KB311 KB28.2 KB33.2 KB883.5 KB317.5 KB276 KB409 KB289.5 KB311 KB14.8 KBGallery12 images from the tutorialOpen the tutorial
The circuit, the board and the results as they appear in AS3935 Lightning Sensor Library for Proteus Simulation. Open an image for its full size.
README
AS3935 LIGHTNING SENSOR LIBRARY FOR PROTEUS SIMULATION - V1.0 (a lightning detector with its antenna, a pop-up)
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/12/as3935-lightning-sensor-library-for-proteus.html
Report a bug or suggest a feature (our forum):
https://www.theengineeringprojects.com/forum/category/rain-sensor-proteus-library
The demo runs on our Arduino UNO V4.0 (included) - working LEDs, RESET and a
built-in serial monitor, no Virtual Terminal to wire - its own article:
https://www.theengineeringprojects.com/2026/10/arduino-uno-library-for-proteus-v40.html
Support us (the libraries are free):
https://www.theengineeringprojects.com/donate
FILE STRUCTURE
AS3935-Lightning-Sensor-TEP-v1.0/
|-- Proteus Library Files/
| |-- ArduinoV4TEP.LIB 201.9 KB TEP Arduino boards V4.0 (UNO) -> LIBRARY
| |-- TEPAS3935.LIB 17.1 KB the library -> LIBRARY folder
| |-- TEPBUZZER.LIB 9.9 KB a part the demo uses -> LIBRARY folder
| |-- TEPI2CLCD16X2.LIB 181.4 KB a part the demo uses -> LIBRARY folder
| |-- TEPLED5MM.LIB 21.8 KB a part the demo uses -> LIBRARY folder
| |-- TEPRESISTOR.LIB 306.9 KB a part the demo uses -> LIBRARY folder
|-- Proteus Model Files/
| |-- TEPARDUINO.DLL 883.5 KB the Arduino board model -> MODELS folder
| |-- TEPAS3935.DLL 317.5 KB the model -> MODELS folder
| |-- TEPBUZZER.DLL 276.0 KB its model -> MODELS folder
| |-- TEPLCD.DLL 409.0 KB its model -> MODELS folder
| |-- TEPLED5MM.DLL 289.5 KB its model -> MODELS folder
| |-- TEPRESISTOR.DLL 311.0 KB its model -> MODELS folder
|-- Proteus Simulation/
| |-- AS3935_Demo.hex 33.2 KB the demo firmware
| |-- AS3935-Lightning-Alarm-ArduinoUnoV4.pdsprj 28.2 KB the demo project
| |-- TEPARDUINO.DLL 883.5 KB copy of the board model
| |-- TEPAS3935.DLL 317.5 KB copy of the model
| |-- TEPBUZZER.DLL 276.0 KB copy of its model
| |-- TEPLCD.DLL 409.0 KB copy of its model
| |-- TEPLED5MM.DLL 289.5 KB copy of its model
| |-- TEPRESISTOR.DLL 311.0 KB copy of its model
|-- Arduino Code/
| |-- AS3935_Demo/AS3935_Demo.ino 8.3 KB the demo sketch (source of the .hex)
|-- README.txt ~15.0 KB this file
Total: 5.66 MB (unzipped). The C++ source code of the models is not included.
WHAT IS IT?
The common AS3935 lightning sensor breakout, drawn from the top at its real size (about 24 x 20 mm):
the AS3935 in its 4 x 4 mm
package, the 500 kHz antenna coil with its tank capacitors, the ADD0 / ADD1 address pads and the
5-pin header VCC GND SCL SDA IRQ (the
board ties SI high: I2C). The drawing is our own; the model follows the AS3935 datasheet:
* I2C at 0x01, 0x02 or 0x03 (ADDRESS, the ADD1 / ADD0 pads); the registers 0x00 - 0x08, 0x3A /
0x3B and the direct commands
PRESET_DEFAULT (0x96 to 0x3C) and CALIB_RCO (0x96 to 0x3D).
* IRQ goes HIGH on an event. Wait 2 ms, then read register 0x03 bits 3:0 - 8 lightning, 4
disturber, 1 noise too high, 0 the distance
changed as old strikes were purged. Reading it sets IRQ low.
* The distance to the HEAD of the storm in the 15 steps of the datasheet (overhead, 5, 6, 8, 10
... 37, 40 km; 63 = out of range) and the
energy of each strike (registers 0x04 - 0x06, a pure number).
* Indoor / outdoor gain, the noise floor (NF_LEV), the watchdog, spike rejection, the minimum
number of strikes, disturber masking.
* Antenna tuning: DISP_LCO puts the antenna's oscillator, divided by 16 / 32 / 64 / 128, on IRQ;
TUN_CAP adds 0 - 120 pF in 8 pF steps.
* The sky: PROFILE DEMO is a storm in fast time (from 42 km to overhead, two man-made disturbers
and a noisy spell); QUIET is a calm
sky. The antenna flashes on each strike.
* Click the board for the pop-up: the sky as a radar, the distance, the strikes, the event list;
graphs, an event log and a check page.
The body is drawn as on the real part and to true scale against our Arduino.
The TEP signature and the pop-up are TEP additions.
ONE DEVICE (search "AS3935" or "lightning" in Pick Devices):
AS3935TEP "AS3935 Lightning Sensor V1.0" in TEPAS3935.LIB (Modules > Sensors), prefix U, model
TEPAS3935.DLL (mixed).
Pins: VCC GND SCL SDA IRQ (left, the header).
The demo also uses our I2C LCD 16x2 (TEPI2CLCD16X2 / TEPLCD), resistors (TEPRESISTOR), 5 mm LEDs
(TEPLED5MM) and our active buzzer
(TEPBUZZER).
THE POP-UP
Click the part at Run. Tabs:
Lightning The sky as a radar (0 - 40 km): the strikes of the last second, the true head of the
storm and the distance register as an
arc; the last events and commands; tiles: the address and the gain, the distance
register, the strikes detected, the last
energy, the disturbers and noise events, TUN_CAP and the antenna's frequency, the
interrupts and IRQ, the range and the
minimum strikes. Chips: Demo storm, Strike 10 km, Disturber, Noise burst.
Graphs the live values over the last 2, 6 or 15 s. Live / Freeze.
Event log every change and warning; filters All / Changes / Warnings, Pause, Clear
Check what the part is doing and what to look at, each with a verdict (green = fine, amber
= check, red = wrong)
Settings theme, text size, open at Run, window size
Help report a bug, suggest a feature, article, updates, donate, forum; Copy diagnostics
for a bug report
TEST STATUS
V1.0: verified in Proteus 8.5 on 21 Nov 2026 (the demo project as shipped: an A4 sheet, an Arduino UNO V4.0).
What the runs showed (the model's own numbers and the sketch's monitor):
* The project loads and starts cleanly; the demo ran 6.4 simulated seconds in about 2 minutes 16
seconds on our PC with the pop-up open
and the pictures being taken. PRESET_DEFAULT, indoor gain, noise floor 2.
* Antenna tuning: 520 kHz untuned (TUN_CAP 0, 4 % high); the scan of 16 capacitors (LCO / 128 on
IRQ, 200 edges timed) kept TUN_CAP 10 =
499.1 kHz (0.2 % low); CALIB_RCO done at 1.140 s.
* The storm from 42 km at 1.3 s: first detected 39 km at 1.70 s (register 40 km), 37 km at 1.90 s
- the LCD "Storm 37 km", yellow LED;
24 / 20 / 17 km at 3.0 - 3.4 s. Disturbers at 1.75 s and 2.95 s (reason 4, no alarm).
* Noise 100 uVrms 3.6 - 4.0 s: reason 1 three times, the floor raised to 3, 4, 5 (112 uVrms), the
alarms stop; the range 33 km at floor 4.
* 12 / 10 / 8 km at 3.9 - 4.3 s: red LED and the buzzer; the pop-up at 4.45 s "the head 8 km
away", 13 strikes. Overhead (register 1)
from 4.64 s, energies 1.1 - 1.6 million (0.33 million at 38 - 39 km). The floor back to 2 by
5.74 s.
* All clear: the old strikes purged at 6.04 s (reason 0, register 63), "All clear", green LED.
* The Check page: 17 of 20 strikes detected, 23 IRQs (17 lightning, 2 disturbers, 3 noise, 1
purge), 0 reads before the 2 ms.
* The pop-up (AS3935, Graphs, Event log, Check) followed the run.
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" (TEPAS3935.LIB, TEPI2CLCD16X2.LIB, TEPRESISTOR.LIB,
TEPLED5MM.LIB, TEPBUZZER.LIB and our Arduino library V4.0, ArduinoV4TEP.LIB, with the ARDUINO UNO
V4.0 used by the demo) to the LIBRARY folder of Proteus, for example:
C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY
(use the folder that already holds Proteus's own .LIB files).
3. Copy TEPAS3935.DLL, TEPLCD.DLL, TEPRESISTOR.DLL, TEPLED5MM.DLL, TEPBUZZER.DLL and TEPARDUINO.DLL
from "Proteus Model Files" to the MODELS folder (...\Proteus 8 Professional\MODELS).
4. Delete TEPAS3935.IDX from the LIBRARY folder if it is there (Proteus makes a new index).
5. Start Proteus. In Pick Devices (P) search "AS3935".
RUN THE DEMO
"Proteus Simulation\AS3935-Lightning-Alarm-ArduinoUnoV4.pdsprj" (an A4 sheet) - keep the .hex file
and the DLLs beside the project.
ARD1: Arduino UNO V4.0 running AS3935_Demo.hex (window "TEP Arduino UNO - ARD1"): A4 / A5 =
I2C, D2 = IRQ, D5 - D7 = the LEDs,
D8 = the buzzer.
U1: the AS3935 at 0x03 with the DEMO storm; the antenna untuned at 520 kHz.
LCD1: a 16x2 LCD on its I2C backpack at 0x27: the head of the storm and the counts.
D1 - D3: green all clear, yellow a storm in range, red within 10 km (through R1 - R3, 220 ohm).
BZ1: our active buzzer, beeping while the storm is within 10 km.
The sketch tunes the antenna first (each TUN_CAP, LCO / 128 on IRQ, 200 edges timed with
micros()), calibrates the RC oscillators, then
answers every IRQ: wait 2 ms, read register 3, then the distance and the energy for lightning; on
noise it raises the noise floor.
Closed the monitor? Click the UNO's USB port.
WIRING (the same in Proteus and on a real board)
VCC to 5 V (or 3.3 V), GND, SCL / SDA to A5 / A4, IRQ to D2 (an interrupt pin). Keep the antenna
away from motors, displays and
switching supplies - they are the disturbers and the noise.
REAL HARDWARE:
* The statistics behind the distance cover the last 15 minutes on the real chip; the DEMO runs in
fast time (one second).
* The distance is to the leading edge of the storm, not to the last flash.
* Tune the antenna once per board: it must be within 3.5 % of 500 kHz.
* Indoors use the indoor gain; outdoors the outdoor gain (0x1C in register 0x00).
THE DEMO SKETCH ON THE SERIAL MONITOR (AS3935_Demo V1.0, 9600 baud)
AS3935_Demo prints the tuning table, then a line for every event. EXPECTED MONITOR OUTPUT
(shortened)
Lightning alarm: AS3935 at 0x03 (IRQ on D2), LCD at 0x27
TUN_CAP 0 (0 pF): ... kHz
antenna tuned: TUN_CAP ..., ... % from 500 kHz (allowed 3.5 %)
... s LIGHTNING head of the storm ... km energy ...
PROPERTIES (double-click the part > Edit Properties)
ADDRESS The I2C address set by the ADD1 / ADD0 pads: 1, 2 or 3. Default 3.
PROFILE DEMO (a storm) or QUIET (a calm sky). Default DEMO.
ANTENNA The antenna's own frequency without tuning capacitors, kHz. Default 520 (tune it to 500
with TUN_CAP).
Every run starts again from the properties.
LINKS.INI (OPTIONAL)
The Help page cards of the pop-up open web pages. To point them somewhere else without a new DLL,
put a text file named links.ini next to TEPAS3935.DLL with lines KEY=URL, for example:
ARTICLE=https://www.theengineeringprojects.com/...
Keys: WEBSITE, FORUM, BUG_REPORT, FEATURE_REQUEST, ARTICLE, USER_GUIDE,
UPDATE_CHECK, DONATE. Only http:// and https:// links are used; lines starting
with # are comments.
TROUBLESHOOTING
* No event at all: IRQ is not on an interrupt pin, or the sketch waits for LOW - IRQ is active HIGH.
* The interrupt reads 0: it was read less than 2 ms after IRQ rose.
* Only "noise too high": raise the noise floor (register 0x01 bits 6:4) or move the antenna away
from the noise.
* The antenna reads far from 500 kHz: run the tuning scan (TUN_CAP 0 - 15); the check page shows the
error.
* The part is not simulated: TEPAS3935.DLL is missing from MODELS and from the project folder.
* The part is not simulated: TEPAS3935.DLL is missing from MODELS and from the project folder. No
UNO / no monitor window: TEPARDUINO.DLL is missing, or click the UNO's USB port.
BUG REPORTS AND FEATURE REQUESTS
Please post them in our forum with a screenshot, the Serial Monitor text, the
simulation log and the pop-up's Copy diagnostics text:
https://www.theengineeringprojects.com/forum/category/rain-sensor-proteus-library
SUPPORT US
This library is free. If it saves you time, please support our work:
https://www.theengineeringprojects.com/donate
WEBSITE
https://www.theengineeringprojects.com/
LICENCES AND THIRD-PARTY NOTES
* The model (TEPAS3935.DLL), the symbols and artwork, the other parts of ours in the demo and the
Arduino Library V4.0 (ArduinoV4TEP.LIB / TEPARDUINO.DLL, with its built-in TEP Serial Monitor
Advance) are made by The Engineering Projects. The models use only standard Windows libraries; no
Visual C++ redistributable is needed.
The C++ source code is not included.
* Arduino UNO V4.0 (ArduinoV4TEP.LIB / TEPARDUINO.DLL, our Arduino Library V4.0 - its
microcontroller is Proteus's own AVR model): The Engineering Projects,
https://www.theengineeringprojects.com/2026/10/arduino-uno-library-for-proteus-v40.html
* The .hex file is built from the demo sketch and the Arduino AVR core 1.8.6, which includes
LGPL-licensed code; its source code is available at
https://github.com/arduino/ArduinoCore-avr/tree/1.8.6
* Proteus is a product of Labcenter Electronics and is not included. Arduino is a trademark of Arduino SA.
This library is not made or endorsed by Arduino or Labcenter.
REBUILDING THE FIRMWARE (OPTIONAL)
The HEX file is supplied; Arduino IDE is not needed to run the demo. To edit the sketch, open
Arduino Code\AS3935_Demo\AS3935_Demo.ino, select Arduino Uno and use Sketch > Export Compiled
Binary. Replace the simulation's .hex with the exported HEX. The sketch needs 12,088 bytes of flash
and 618 bytes of RAM.
MODEL SCOPE AND LIMITS
Modelled: the I2C registers and direct commands, IRQ with the 2 ms rule, lightning / disturber /
noise interrupts, the distance table, the
energy, the gain, noise floor, watchdog, spike rejection, minimum strikes and disturber mask, the
antenna's LC oscillator with TUN_CAP and
LCO_FDIV on IRQ, the RC calibration flags.
Our figures: the antenna 937 pF tank; the range 40 km at the indoor gain, less with a higher
watchdog, the outdoor gain indoors or a raised
noise floor; the distance statistics over the last second (fast time); the DEMO storm at 12 km per
second.
Not modelled: SPI mode, the SRCO / TRCO outputs on IRQ, the real chip's detection algorithm and the
energy in physical units.
VERSION
TEP AS3935 Lightning Sensor library V1.0 (Nov 2026). Device AS3935TEP (TEPAS3935.LIB /
TEPAS3935.DLL). Demo sketch AS3935_Demo V1.0 (Wire only). Demo board: ARDUINO UNO V4.0 (TEP Arduino
Library V4.0) with its built-in serial monitor; our I2C LCD 16x2, resistor, 5 mm LED and active
buzzer libraries.Development1 release
-
V1.0AS3935 Lightning 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 7433efc5a6114426bbbba358a7d62d4f.zip and choose Extract All (or open it with 7-Zip or WinRAR) into a folder you can find again. Keep its folder structure (AS3935-Lightning-Sensor-TEP-v1.0) as it is.
- 2
Copy the library files into Proteus
Move ArduinoV4TEP.LIB, TEPAS3935.LIB and TEPBUZZER.LIB and 3 more and the files 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 TEPARDUINO.DLL, TEPAS3935.DLL and TEPBUZZER.DLL and 3 more 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 AS3935_Demo.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 AS3935_Demo.hex and run the simulation. For real hardware, flash the same file with your programmer.
- 7
Open the example simulation
Open AS3935-Lightning-Alarm-ArduinoUnoV4.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
AS3935 Lightning Sensor Library for Proteus Simulation explains every connection and setting in order; keep it open beside the files while you build.
FAQs9 questionsContact TEP
How do I download AS3935 Lightning 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?
AS3935 Lightning Sensor Library for Proteus V1.0 comes as a ZIP archive of 22 files (2.6 MB, 5.7 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 22 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, 885e1ef69fe129c86acfe3812539f42d4afcd604bc68ce410be37a98c5bf5e03. In PowerShell run Get-FileHash "7433efc5a6114426bbbba358a7d62d4f.zip"; on macOS or Linux run shasum -a 256 "7433efc5a6114426bbbba358a7d62d4f.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.
- 0Total downloads
- 4%Popularity
- ProteusCategory
- 0Comments
- ssyedzainnasirUploaded by
- 2 Dec 2026Uploaded at
885e1ef69fe129c86acfe3812539f42d4afcd604bc68ce410be37a98c5bf5e03



























Comments
0