LF PowerGrid
Logic & Sensors

Electronic Counter

Edge-triggered counter module with 0-9 display and wraparound pulse output.

Loading Electronic Counter...

Overview

The Electronic Counter is an edge-triggered logic module that tracks pulse events on input_1 and displays a count (0-9) on its animated 7-segment display. When the count wraps from 9 back to 0, it outputs a momentary pulse on output_0. The counter continuously monitors input_0 for power availability and applies a 200ms debounce to prevent false triggers. Use it to count events, create cyclic automation patterns, or trigger actions after a specific number of iterations.

Specifications

Property Value
Type Passthrough (2 IN + 1 OUT) with gate
Power Consumption 5 u/s
Output Capacity 20 u/s
Ports input_0 (power), input_1 (toggle), output_0 (pulse)
Counter Range 0-9 (wraps to 0 at 10)
Pulse Duration 2000 ms
Debounce Time 200 ms
Display Animated 7-segment (show_0 through show_9)
Weight (placed) 800 g
Weight (kit) 600 g
Class Name LFPG_ElectronicCounter
Base Class LFPG_WireOwnerBase

How It Works

The Electronic Counter operates as an edge-triggered module. It monitors two separate inputs: input_0 (power/gate signal) and input_1 (toggle/increment signal). On each rising edge detected on input_1, the counter increments its internal value by 1. The counter maintains a state from 0 to 9, and when it reaches 9 and receives another pulse, it wraps back to 0 while simultaneously outputting a 2000ms pulse on output_0.

A 200ms debounce window prevents accidental double-triggers from noisy signals. The 7-segment display animates through states (show_0 through show_9) to visually reflect the current count. The gate (power) on input_0 must be active for the counter to respond to toggle pulses.

LED Indicator

  • Green: Gate is open (input_0 active)
  • Red: Gate is closed (input_0 inactive or low power)
  • Off: No power available

Wiring Examples

Count Events (Every 10 Presses)

Battery
Counter (input_0)

Power supply for counter. Push Button provides input_1. After 10 presses, Counter (output_0) triggers Door Controller.

Cyclic Automation

Battery
Counter (input_0)

Power supply for counter. Pressure Pad provides input_1. Counter (output_0) triggers Timer (10 seconds) → Alarm every 10 steps.

Combo Lock System

Battery
Counter (input_0)

Power supply for counter. Button 1 provides input_1. After 10 presses, Counter (output_0) combines with Button 2 via AND Gate to release Lock.

Tips

  • The 200ms debounce filters noise—if rapid pulses arrive faster than 200ms apart, some may be ignored.
  • Use the visible 7-segment display to debug your counting logic in real-time.
  • Combine with a Memory Cell if you need the wraparound pulse to persist longer than 2 seconds.
  • The counter consumes 5 u/s continuously when powered, regardless of whether it's counting.
  • Chain multiple counters for modular counting up to 99 (10 × 10).