Counter
Press a button three times to turn on a light — then wire a reset. The exact circuit to learn how counters behave.
What you’re building
Parts to add
- 1Power Source
- 1Push Button NO
- 1Counter
- 1NO Contact
- 1Light
- 1Single-Pole Switch (reset)
Steps
Add the parts
Click Power Source, Push Button NO, Counter, NO Contact, Light, and a Single-Pole Switch (for reset). Spread them out.
Set up the counter
Click the Counter. When prompted, type a number for the target count (e.g. 3), then click it again and type a letter (e.g. C). Click the NO Contact and type C so it follows the counter’s output.
Wire the count input
To wire, click the first terminal (it highlights), then click the second — a wire connects them. Click empty space to deselect. The counter’s A1 and A2 are its input; each pulse on A1 adds one to the count.
Power Source L1 → Push Button (left)Push Button (right) → Counter A1Counter A2 → Power Source NWire the reset
Wire a switch to the counter’s RST terminal. Energizing RST clears the count back to zero.
Power Source L1 → Reset Switch (left)Reset Switch (right) → Counter RSTWire the output circuit
When the count reaches the target, the counter energizes its letter C, closing the C contact and lighting the lamp.
Power Source L1 → C NO Contact (left)C NO Contact (right) → Light (left)Light (right) → Power Source NEnergize and count
Click Energize. Press the push button and watch the counter climb: 1/3, 2/3, 3/3. On the third press the light comes on. Flip the reset switch to clear it back to 0.
Remember: edge-triggered
Holding the button down only counts once. The counter counts the moment the input turns on (the rising edge), so you must release and press again for each count.
✓ Test it
- Press the button 3 times: on the 3rd press the light comes on.
- Flip the reset switch: count clears to 0, light goes off.
- Hold the button down — it only counts ONCE. Counters are edge-triggered: release and press again to count.
Open the Sandbox and build it
Follow the steps above with the trainer open in another tab.
Open the Sandbox →