SIMULATION ilima count demo — the real unit's web interface, running on invented data. No unit is attached. ← all ilima demos
KPJ

❓ Help & Reference

🔌 Terminal Reference – KPJ-Control + Expansion Board
TerminalLabelFunction
DI-1IN1Pulse input / Encoder A – isolated NPN, 12–24V, active LOW
DI-2IN2Encoder B / hardware batch reset – active LOW falling edge
DI-3IN3Gate inhibit – hold active to pause counting
DI-4IN4Start trigger – falling edge auto-starts counting
AI-1VI1Analog input 0–10V (loadcell amplifier or auxiliary signal)
AO-1VO1Analog output 0–10V (rate signal to PLC, VFD, or recorder)
DO-1R1Relay 1 – configurable logic (default: Running)
DO-2R2Relay 2 – configurable logic (default: Alarm)
DO-3R3Relay 3 – configurable logic (default: Batch Complete pulse)
DO-4R4Relay 4 – configurable logic (default: Running / spare)
⚙ Operating Modes
ModeUse CaseWiring
COUNTERProducts on conveyor, bags, bottles, cartonsNPN proximity / photo-eye → DI-1
ENCODERCut-to-length, web length, bidirectional travelEncoder A → DI-1, B → DI-2. Enable Quadrature. Set debounce to 0.
LOADCELLWeigh hopper, fill-by-weight0–10V loadcell amp → AI-1. Calibrate zero/full-scale in Settings.
RATE MONLine speed monitoring, over/underspeed alarmTachometer / encoder → DI-1. Set alarm thresholds.
BATCHPack N items, cut N pieces, fill N bagsCounter sensor → DI-1. DO-3 pulses on complete. Auto-reset option.
LENGTHOne-direction length (roll, cable, hose)Encoder/wheel encoder → DI-1. Set pulses/unit for encoder resolution.
💡 Live Controls

From the Dashboard you can change the Batch Target and Current Count on-the-fly without going to Settings. Use the edit boxes in the Batch Progress panel and press Set. Changes take effect immediately and are saved to NVS.

📈 Data Log Triggers
TriggerWhen a log entry is recorded
Time intervalEvery N minutes (configurable). Good for trend logging.
Batch completeEvery time a batch target is reached. Records the batch count and rate at that moment.
BothWhichever fires first — interval or batch complete.
Manual (Log Now button)One-shot entry on the Data Log page. Always available regardless of trigger setting.
🔧 Troubleshooting
SymptomLikely CauseFix
Double-countingSensor bounce or noiseIncrease debounce in Settings (try 10ms–50ms)
Count not incrementingStopped, gate active, or wrong edgePress Start, check DI-3 state, verify edge setting
Rate always 0Sample window too longReduce sample window in Settings
Encoder driftsDI-2 not connected or Quadrature not enabledEnable Quadrature, wire DI-2 to encoder B
Loadcell reads wrongWrong calibration voltagesRead live voltage in Settings at zero and full load, re-enter
Batch target not updatingSaved old valueUse dashboard Set button or save in Settings
Log shows uptime not dateClock not setSet clock in Settings after power-on
No AP visibleWiFi fail triggers AP after 30sWait 30s after boot, then connect to KPJ-Counter
☁ Blynk Virtual Pins
PinDirValue
V0ReadProcess value
V1ReadRate (units/min)
V2ReadBatch value
V3ReadBatches completed
V4ReadGrand total
V5ReadStatus string
V6Write 1Reset batch
V7Write 1Reset session
V8Write 1Toggle counting
V9ReadPeak rate
🔌 MQTT Topics (kpj/counter prefix)
TopicDirPayload
prefix/processPubProcess value (float)
prefix/ratePubRate (float)
prefix/batchPubBatch value (float)
prefix/batchesPubBatches completed (int)
prefix/totalPubGrand total (float)
prefix/statusPubStatus string
prefix/cmd/startSubAny → start
prefix/cmd/stopSubAny → stop
prefix/cmd/resetSubAny → reset session
🛠 OTA Firmware Update

Upload via Arduino IDE OTA when connected to WiFi.
Host: kpjcounter.local   Password: kpjota1

KPJ Automation – Technical Support

📞 +27 67 630 5732 ✉ KPJmachines@gmail.com

KPJ Production Counter V2.1  |  KPJ-Control + KPJ Expansion Board