Project Files of Electromechanical Counter Library for Proteus V1.0 (Arduino + L9110S)
electromechanical-counter-tep-v1-0-a01d522d8fcb46e7a07c5bc36ae21a24.zip

Electromechanical Counter Library for Proteus V1.0
Electromechanical Counter Library for Proteus V1.0 comes as a ZIP archive of 10 files (1.2 MB, 2.6 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
Electromechanical-Counter-Library-for-Proteus-v1.0.zip with the electromechanical impulse counter in Proteus (a 6-digit 12 V DC counter: the coil, the armature, the ratchet and the drums, missed counts with their reason; TEPEMCOUNT.LIB and TEPEMCOUNT.DLL), our Arduino UNO V4.0, the A3 L9110S demo project with its sketch and a README.
File Structure
5.9 KB201.9 KB15.9 KB883.5 KB307.5 KB23.5 KB22.8 KB883.5 KB307.5 KB17.4 KBGallery12 images from the tutorialOpen the tutorial
The circuit, the board and the results as they appear in Electromechanical Counter Library for Proteus V1.0 (Arduino + L9110S). Open an image for its full size.












README
ELECTROMECHANICAL COUNTER LIBRARY FOR PROTEUS - V1.0 (a 6-digit 12 V DC impulse
counter: a coil, an armature and a ratchet that turns the number drums)
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/11/electromechanical-counter-library-for-proteus-v1-0.html
Report a bug or suggest a feature (our forum):
https://www.theengineeringprojects.com/forum/category/motor-driver-proteus-library
The demo runs on our Arduino UNO V4.0 (included) - working LEDs, RESET and a
built-in serial monitor - its own article:
https://www.theengineeringprojects.com/2026/10/arduino-uno-library-for-proteus-v40.html
The demo's driver is our L9110S Motor Driver - a SEPARATE library, not in this
package: download and install it first - its own article:
https://www.theengineeringprojects.com/2026/10/l9110s-motor-driver-library-for-proteus-v1-0.html
Support us (the libraries are free):
https://www.theengineeringprojects.com/donate
FILE STRUCTURE
Electromechanical-Counter-TEP-v1.0/
|-- Proteus Library Files/
| |-- ArduinoV4TEP.LIB 201.9 KB TEP Arduino boards V4.0 (UNO) -> LIBRARY
| |-- TEPEMCOUNT.LIB 15.9 KB the library -> LIBRARY folder
|-- Proteus Model Files/
| |-- TEPARDUINO.DLL 883.5 KB the Arduino board model -> MODELS folder
| |-- TEPEMCOUNT.DLL 307.5 KB the model -> MODELS folder
|-- Proteus Simulation/
| |-- Counter_Demo.hex 23.5 KB the demo firmware
| |-- Electromechanical-Counter-L9110S-ArduinoUnoV4.pdsprj 22.8 KB the demo project
| |-- TEPARDUINO.DLL 883.5 KB copy of the board model
| |-- TEPEMCOUNT.DLL 307.5 KB copy of the model
|-- Arduino Code/
| |-- Counter_Demo/Counter_Demo.ino 5.9 KB the demo sketch (source of the .hex)
|-- README.txt ~18.5 KB this file
Total: 2.61 MB (unzipped). The C++ source code of the models is not included.
WHAT IS IT?
A simulation model of the electromechanical impulse counter - the panel
counter with six number drums behind a window that counts parts on a
conveyor, strokes of a press, coins in a vending machine, hours of a machine
or pulses of an energy meter. It needs no electronics of its own: each pulse
on its coil pulls an armature in, and when the pulse ends a spring throws the
armature back out and a ratchet turns the units drum one digit on (the tens
drum moves on as the units go from 9 to 0, and so on). It keeps the count with
the power off. Our own model:
* The coil between + and - is in the circuit with its resistance and an
inductance that grows as the armature closes: 144 ohm (25 C), 220 mH open,
400 mH closed - a 12 V, 83 mA, 1 W coil. A transistor, a relay or an
H-bridge switches it.
* The armature is pulled by the coil's current against a spring: it closes
from 55 mA (7.9 V on a 12 V coil); at 12 V it is in after about 16 ms.
The current dips as it closes (82 -> 65 -> 83 mA): the pull-in signature
of every magnet that moves.
* A count = a full pull-in AND a full release: the drums move on the
armature's way OUT, about 22 ms after the coil switches off. The count
comes when the pulse ENDS.
* Missed counts, each with its reason: a pulse too short for the armature
to close; too little current (a low supply) - it never closes; the coil
back on before the armature got out (the pause too short) - the ratchet
does not reset. Held on, it waits: HELD IN, and one count on the release.
It keeps up to about 18 counts a second (30 ms on, 25 ms off).
* The kick: switched off by a transistor without a diode, the coil's
current has nowhere to go - the voltage flies to hundreds of volts (-320 V
in our test): a warning to put a free-wheel diode across it. The demo's
L9110S brakes the coil (both inputs LOW), which does the diode's job.
* The coil warms with its duty: 1 W on 100 % duty runs warm, short pulses
keep it cool. More current than the coil is rated for (a 12 V counter on
24 V) gives a warning.
* Six drums, 000000 - 999999, rolling over to 000000. The RESET button on
the counter clears them; property START sets them at power-up.
The symbol shows the counter from the front: a black panel housing with
COUNTER and 12 V DC on it, the chrome-framed window with six white-on-black
drums (the units drum rolls up as the armature comes out), the red RESET
button and the two coil leads, red + and black -. At Run the drums show the
simulated count. The plate around it, the COIL LED (green while the coil has
current), the rating line and the strip under the plate (COUNT, MISSED, RATE,
OPEN PANEL) are TEP additions; the real counter has none of them.
ONE DEVICE (search "counter" or "impulse" in Pick Devices):
EMCOUNTERTEP "Electromechanical Counter V1.0" (category
Electromechanical > Motors), model TEPEMCOUNT.DLL
The pop-up panel "TEP Electromechanical Counter" opens at Run (and with
OPEN PANEL on the strip) - the look of the TEP Serial Monitor. Tabs Counter,
Graphs, Event log and Check; gear and ? icons for Settings and Help; the
palette icon switches the theme:
Counter the state in big letters (COUNTING - 8.0 A SECOND, PULSES 38 MS
ON / 86 MS OFF, IDLE, HELD IN, MISSED A COUNT - too short /
too weak / back too soon); the drums and the armature (open
... in); the live values (count, missed, rate, last pulse, last
gap, peak current, pull-in time, release to count); the coil
current and the armature over the last half second, with the
pull-in and hold currents dashed. Toolbar: Reset to 0, Preset
999990 (ten counts to the rollover).
Graphs the counts, the rate and the coil's temperature over the last
10, 30 or 60 s. Live / Freeze.
Event log COUNTING ("COUNTING - from 000000 (the pulses 37 ms on)"),
STOPPED ("STOPPED at 000044 - 44 counts from 000000, 5.6 a
second, 2 missed"), every missed count with its reason, HELD
IN, the drums reset or preset, the warnings; filters All /
Counts / Warnings, Pause, Clear
Check Good for: a counter that does not count, counts only some
pulses, counts late, or gets hot - the pulses, the gaps, the
current, the rate, the misses, the kick, the coil, with tips
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 29 Oct 2026 (the demo project as shipped: an
A3 sheet, an Arduino UNO V4.0 with its built-in monitor, our L9110S driver -
its pop-up version, from its own library - on +12V, RV1 and the counter; all
pop-ups open). What the runs showed:
* The project loads and starts cleanly; five counts at power-up, then RV1
(30 %) sets 4.5 counts a second: "COUNTING - from 000000 (the pulses 37 ms
on)"; at 4.1 s the drums show 000018 - pulses 38 ms on / 185 ms off, 82.1
mA peak, pull-in 15.5 ms, release to count 22.0 ms, the COIL LED lit.
* "rate 8", "count 20": 8.0 a second, 0 missed (000037 mid-burst, 38 ms on /
86 ms off); "Done - 44 pulses sent in all", and the drums at 000044.
* "short" (3 pulses of 5 ms; the L9110S passes 2.8 - 3.2 ms of them to the
coil): three "MISSED - a 3.2 ms pulse: the armature got 1 % in (it must
close)" - the drums stay at 000044; the Check page turns Pulses red.
* "fast" (10 pulses, 40 ms on / 4 ms off): nine "MISSED - the coil came back
4 ms after the release: the armature had not left the pole"; only the
last pulse counts (000045) - 12 missed in all.
* "hold": HELD IN at 82 mA, the armature in; "release": the count comes -
000046.
* The Preset 999990 chip, then "count 12": "COUNTING - from 999990", the
drums roll over to 000002. The monitor: "Done - 70 pulses sent in all" -
58 before the preset (46 counted + 12 missed) and 12 after.
* The L9110S's own pop-up: motor A on BRAKE between the pulses; its scope
draws the 12 V pulses on the coil.
Plus automatic checks on a PC, 0 failed: 28 on the counter (83.3 mA rated,
pulls in from 54.8 mA, holds down to 17.7 mA; 10 pulses 50 / 50 ms = 10
counts, pull-in 16.4 ms, release 22.1 ms, the current dip 82.0 / 65.4 /
83.3 mA; 4 ms pulses all missed; 6 V missed, 9.5 V counts; 40 / 4 ms = 9
missed; the fastest clean rate 18.5 a second with 30 ms pulses; held 2 s =
one count on the release; no diode = a -320 V kick and its warning, still
counting; a 24 V counter (576 ohm) counts on 24 V, a 12 V one on 24 V
warns; 999998 + 3 = 000001; a preset mid-run; the rate from the count
spacing; every event text fits); 3 on the pop-up pages rendered; the demo
project read back from disk (57 checks: devices, pins, wires, labels, no
wire through a part, no crossing).
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" (TEPEMCOUNT.LIB and our Arduino
library V4.0, ArduinoV4TEP.LIB) 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 TEPEMCOUNT.DLL and TEPARDUINO.DLL from "Proteus Model Files" to the
MODELS folder (...\Proteus 8 Professional\MODELS). The demo's driver is NOT
in this package: install our L9110S Motor Driver library the same way (its
own ZIP - see IMPORTANT LINKS): TEPL9110S.LIB and TEPL9110S.DLL.
4. Delete TEPEMCOUNT.IDX from the LIBRARY folder if it is there.
5. Start Proteus. In Pick Devices (P) search "counter".
RUN THE DEMO
"Proteus Simulation\Electromechanical-Counter-L9110S-ArduinoUnoV4.pdsprj" -
keep the .hex file and the DLLs beside the project (with the L9110S library
installed).
ARD1: Arduino UNO V4.0 running Counter_Demo.hex, its serial monitor built
in (window "TEP Arduino UNO - ARD1").
DRV1: our L9110S driver (pop-up version, a separate library): A-IA on D5,
A-IB on D6, VCC on +12V, GND - by net labels.
CNT1: the counter: + on the L9110S's A-OA, - on A-OB (motor A) - straight
wires.
RV1: 10k pot on A0 (the rate in knob mode, 0 - 15 a second).
1. Press Run. The monitor and the two pop-ups open (move them aside). Five
counts at power-up, then RV1 sets the rate.
2. Turn RV1. Type in the monitor and press Send: rate 8, count 20, short,
fast, hold, release, run, stop, knob, pulse 30, total.
3. Click the counter's red RESET button: the drums go back to 000000. The
pop-up's chips: Reset to 0, Preset 999990.
4. Double-click CNT1: VOLTAGE (12 / 24), START (the drums at power-up).
5. The pop-up: Counter, Graphs, Event log, Check.
WIRING (the same idea on a real counter)
L9110S Arduino UNO / supply
A-IA, A-IB D5, D6
VCC 12 V (the L9110S takes 2.5 - 12 V; its inputs stay 5 V
logic), GND to the UNO's GND
Counter L9110S
+ / - A-OA / A-OB
In the sketch (no library needed): a pulse = D5 HIGH (D6 LOW) for 40 ms, then
both LOW for at least 40 ms:
digitalWrite(COIL_A, HIGH); delay(40); digitalWrite(COIL_A, LOW); delay(60);
The demo does the same with millis(), so the monitor and RV1 keep working.
REAL HARDWARE:
* A 12 V impulse counter takes 50 - 100 mA: an NPN transistor or a logic
MOSFET with a free-wheel diode (1N4007) across the coil, a relay, or an
H-bridge; never straight from a microcontroller pin.
* Give it 30 - 50 ms pulses and at least as long off: the count needs the
armature fully in and fully out again. The data sheet gives the most
counts a second (often 10 - 25).
* Some counters have the diode inside: then + must go to the positive side.
The model has no diode inside and counts either way round.
* The counter knows nothing of your total: keep the count in the sketch and
reset or preset the drums by hand to match it.
THE DEMO SKETCH ON THE SERIAL MONITOR (Counter_Demo V1.0, 9600 baud)
count 20 20 pulses at the rate rate 8 8 pulses a second
pulse 40 each pulse 40 ms long knob RV1 sets the rate (0 - 15)
run / stop pulses at the rate until stop
short 3 pulses of 5 ms (too short: missed)
fast 10 pulses 40 ms on, 4 ms off (back too soon: missed)
hold / release the coil on until release (the count comes on the release)
total the pulses the sketch has sent help the list
EXPECTED MONITOR OUTPUT
Electromechanical Counter demo - The Engineering Projects
L9110S on 12 V: the counter on motor A (D5 / D6). A count = a pulse in and a pause out.
Commands: count 20 | rate 8 | pulse 40 | run | stop | knob | short | fast | hold | release | total | help
Count - 5 pulses, 40 ms each, 5.0 a second
Done - 5 pulses sent in all
Knob - RV1 sets the rate (0 - 15 a second)
PROPERTIES (double-click the part > Edit Properties)
VOLTAGE the coil's rating: 12 (144 ohm, 83 mA) or 24 (576 ohm, 42 mA);
default 12
START the drums at power-up, 0 - 999999 (default 0)
Every run starts again from the properties.
TROUBLESHOOTING
* It does not count, and nothing is logged: no coil current - the L9110S has
no 12 V, or its inputs are not driven.
* "MISSED - ... under the 55 mA pull-in": the supply is too low for the
coil (a 24 V counter on 12 V, or a weak transistor).
* "MISSED - a ... ms pulse": the pulses are too short - 30 ms or more.
* "MISSED - the coil came back ... after the release": the pauses are too
short - the armature needs about 22 ms to get back out.
* It counts only when the pulse ends: that is how impulse counters work.
* "the coil kicked to ... V": put a free-wheel diode across the coil.
* The part is not simulated: TEPEMCOUNT.DLL is missing from MODELS and from
the project folder. No driver: install our L9110S library (TEPL9110S.LIB /
.DLL). No UNO / no monitor window: TEPARDUINO.DLL, or click the UNO's USB
port.
* The pop-up does not appear: click OPEN PANEL on the strip, or turn "Open the
panel at Run" on its Settings page back on.
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/motor-driver-proteus-library
SUPPORT US
This library is free. If it saves you time, please support our work:
https://www.theengineeringprojects.com/donate
LICENCES AND THIRD-PARTY NOTES
* The counter model (TEPEMCOUNT.DLL), the symbol and artwork and the Arduino
Library V4.0 (ArduinoV4TEP.LIB / TEPARDUINO.DLL) are made by The Engineering
Projects. The model is an independent implementation written from the
typical data of 12 V DC impulse counters. The models use only standard
Windows libraries; no Visual C++ redistributable is needed.
The C++ source code is not included. The demo's driver, our L9110S Motor
Driver library (TEPL9110S.LIB / TEPL9110S.DLL), is a separate download.
* The demo's .hex 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 any
counter maker, 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\Counter_Demo\Counter_Demo.ino, select Arduino
Uno and use Sketch > Export Compiled Binary. The sketch needs 8,550 bytes of
flash (26 % of the UNO) and 333 bytes of RAM.
MODEL SCOPE AND LIMITS
Modelled: the coil (resistance with its temperature, an inductance that grows
as the armature closes), the armature's pull against its spring, its travel,
the pull-in and the release, the count on the return stroke, the six drums
with their carries and the rollover, the misses (too short, too weak, back
too soon), held in, the kick without a diode, the coil's heating, the
over-current warning, RESET and the presets.
How it runs: the coil is in the circuit as a flux-linkage companion over the
analog step (a conductance and a source that follow the armature); the
armature runs in sub-steps between the analog points, which are held to 100
us while a pulse or the armature moves (2 ms at rest).
Not modelled: contact bounce of a driving switch, a counter's own diode or
varistor, the wear of the ratchet, counters with an electronic display.
VERSION
TEP Electromechanical Counter library V1.0 (Oct 2026). Device EMCOUNTERTEP
(TEPEMCOUNT.LIB / TEPEMCOUNT.DLL). Demo sketch Counter_Demo V1.0. Demo driver:
L9110SADVTEP (TEP L9110S Motor Driver library V1.0, a separate library). Demo
board: ARDUINO UNO V4.0 (TEP Arduino Library V4.0) with its built-in serial
monitor.Development1 release
-
V1.0Electromechanical Counter 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 electromechanical-counter-tep-v1-0-a01d522d8fcb46e7a07c5bc36ae21a24.zip and choose Extract All (or open it with 7-Zip or WinRAR) into a folder you can find again. Keep its folder structure (Electromechanical-Counter-TEP-v1.0) as it is.
- 2
Copy the library files into Proteus
Move ArduinoV4TEP.LIB and TEPEMCOUNT.LIB 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 and TEPEMCOUNT.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 Counter_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 Counter_Demo.hex and run the simulation. For real hardware, flash the same file with your programmer.
- 7
Open the example simulation
Open Electromechanical-Counter-L9110S-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
Electromechanical Counter Library for Proteus V1.0 (Arduino + L9110S) explains every connection and setting in order; keep it open beside the files while you build.
FAQs9 questionsContact TEP
How do I download Electromechanical Counter 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?
Electromechanical Counter Library for Proteus V1.0 comes as a ZIP archive of 10 files (1.2 MB, 2.6 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 10 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, d83324a842123488942a30ed5d9667a1905b327b4c0d5ae30faadc86e006e6af. In PowerShell run Get-FileHash "electromechanical-counter-tep-v1-0-a01d522d8fcb46e7a07c5bc36ae21a24.zip"; on macOS or Linux run shasum -a 256 "electromechanical-counter-tep-v1-0-a01d522d8fcb46e7a07c5bc36ae21a24.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 Nov 2026Uploaded at
d83324a842123488942a30ed5d9667a1905b327b4c0d5ae30faadc86e006e6af

















Comments
0