Kits
›
The Visitor Counter
RU
EN
ES
Contents
Introduction
History: how light learned to count people
Lesson 0. Gates from transistors: for those who start from scratch
0.1. The idea: a transistor is a switch
0.2. Building
0.3. Check
Lesson 0 paste (Cmd+I)
Lesson 1. The beam and CD4011
1.1. Idea: how a shop counts people
1.2. Idea: the CMOS 4000 series
1.3. Idea: NAND for everything
1.4. Build
1.5. Check
Lesson 1 paste (Cmd+I)
Lesson 2. The F/F flip-flop
2.1. Idea: a counter is flip-flops that flip
2.2. Idea: flipping through exclusive OR
2.3. Idea: a NAND with three inputs
2.4. Build
2.5. Check
Lesson 2 paste (Cmd+I)
Lesson 3. The CD4029B counter
3.1. Idea: which bit to flip
3.2. Idea: controlling the counter
3.3. Idea: the bubbles on the TI drawing
3.4. Build
3.5. Check
Lesson 3 paste (Cmd+I)
Lesson 4. The CD4511B decoder
4.1. Idea: seven strokes
4.2. Idea: latch, blanking, lamp test
4.3. Idea: a switch on two transistors
4.4. Build
4.5. Check
Lesson 4 paste (Cmd+I)
Lesson 5. Direction
5.1. Idea: two beams one after another
5.2. Idea: remember the first
5.3. Idea: the clock is when both are blocked
5.4. Build
5.5. Check
Lesson 5 paste (Cmd+I)
Lesson 6. The visitor counter
6.1. Idea: two displays on the same beams
6.2. Idea: two digits — two counters
6.3. Idea: Reset holds
6.4. Build
6.5. Check
Lesson 6 paste (Cmd+I)
Summary
All the parts
Instructions in pictures
Lesson 1 in pictures
← Back to the lesson: Lesson 1. The beam and CD4011
1
The beam and CD4011
an IR pair and the "someone passed" latch
kh
HT-04
CD4011
A
B
IN
8×
OUT
4×
NAND
4×
0
VCC
1×
GND
1×
E
1×
R
1×
Q
Q
1×
2×
∞
Ctrl
+
G
CD4011
© 2026 Daniil Khanin · khanin.info · HT-04
11
CANVAS
CD4011
1
pin names as in the TI datasheet; a bar over a name in the picture = active 0, in the simulator without the bar
2
IN
8×
OUT
4×
A
B
C
D
E
F
G
H
J
K
L
M
3
NAND
3×
0
9×
NAND
I0
A
I1
B
O0
J
NAND
I0
C
I1
D
O0
K
NAND
I0
E
I1
F
O0
L
© 2026 Daniil Khanin · khanin.info · HT-04
12
CD4011 …
CANVAS
4
NAND
1×
0
3×
NAND
I0
G
I1
H
O0
M
5
Ctrl
+
G
Library
…
Chip N
2×
Library
…
CD4011
Enter
CD4011
A
B
C
D
E
F
G
H
J
K
L
M
6
Sensors → IR pair: E and R are placed together, the channel is the pair number
7
VCC
1×
GND
1×
2×
VCC
VCC
GND
GND
© 2026 Daniil Khanin · khanin.info · HT-04
13
CANVAS …
8
E
1×
R
1×
Q
Q
1×
3×
VCC
E1
R1
BA
Reset
Reset
RST
9
CD4011
1×
12×
CD4011
A
BA
B
BA
C
RST
D
RST
E
BA
F
SEENN
G
nRST
H
SEEN
J
XA
K
nRST
L
SEEN
M
SEENN
10
2×
2×
XA
SEEN
A
B
XA
SEEN
press the beam — XA and SEEN
let go — SEEN stays
Reset — off
11
Alt/⌘ + click on a beam — blocked and fixed; again — cleared
© 2026 Daniil Khanin · khanin.info · HT-04
14
← Back to the lesson
Lesson 1. The beam and CD4011