Kits
›
The Parking Sensor
RU
EN
ES
Contents
Introduction
History: how sound learned to measure distance
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 CD4013 D flip-flop
1.1. Idea: remember at a moment
1.2. Idea: master and slave
1.3. Idea: weak feedback
1.4. Idea: divide by 2
1.5. Build
1.6. Check
Lesson 1 paste (Cmd+I)
Lesson 2. The sweep: CD4017
2.1. Idea: poll in turn
2.2. Idea: the Johnson counter
2.3. Idea: self-correction
2.4. Idea: clock, inhibit and carry
2.5. Build
2.6. Check
Lesson 2 paste (Cmd+I)
Lesson 3. Ultrasound and echo: CD4072
3.1. Idea: an echo is time
3.2. Idea: in turn and through OR
3.3. Idea: a 4-input OR at TI
3.4. Build
3.5. Check
Lesson 3 paste (Cmd+I)
Lesson 4. Centimetres: CD4029
4.1. Idea: centimetres are clocks
4.2. Idea: clear before the ping
4.3. Idea: stop at 99
4.4. Idea: the synchronizer
4.5. Idea: ±1 clock
4.6. Build
4.7. Check
Lesson 4 paste (Cmd+I)
Lesson 5. Zones and bars: CD4585
5.1. Idea: a zone is the tens
5.2. Idea: a comparator, most significant first
5.3. Idea: remember the zone of a sensor
5.4. Build
5.5. Check
Lesson 5 paste (Cmd+I)
Lesson 6. The nearest and the digits. Calibration
6.1. Idea: the minimum of a round
6.2. Idea: a cascade of comparators
6.3. Idea: the digit latch
6.4. Idea: calibration
6.5. Build
6.6. Check
Lesson 6 paste (Cmd+I)
Lesson 7. The buzzer
7.1. Idea: the most dangerous zone
7.2. Idea: a beep is an AND with a generator
7.3. Build
7.4. Check
Lesson 7 paste (Cmd+I)
Summary
All the parts
Instructions in pictures
Lesson 1 in pictures
← Back to the lesson: Lesson 1. The CD4013 D flip-flop
1
The CD4013 D flip-flop
TG switches, master and slave; a 60 → 30 Hz divider
kh
HT-05
CD4013
60Hz
CK60
C30
60 → 30 Hz
IN
15×
OUT
7×
N
1×
P
1×
NOT
8×
0
NAND
4×
0
2×
2×
VCC
1×
GND
1×
0
3×
Q
Q
2×
5×
Hz
1×
∞
Ctrl
+
G
TG
FF4013
CD4013
© 2026 Daniil Khanin · khanin.info · HT-05
11
TG
1
IN
3×
OUT
1×
N
1×
P
1×
6×
A
N
P
B
A
B
G
N
N
A
B
G
P
P
2
Ctrl
+
G
Library
…
Chip N
2×
Library
…
TG
Enter
TG
A
N
P
B
© 2026 Daniil Khanin · khanin.info · HT-05
12
FF4013
3
IN
4×
OUT
2×
NOT
3×
0
6×
D
CL
S
R
Q
QN
NOT
I0
R
O0
nr
NOT
I0
S
O0
ns
NOT
I0
CL
O0
cln
4
NOT
1×
0
2×
NOT
I0
cln
O0
clp
5
TG
1×
NAND
2×
0
10×
TG
A
D
N
cln
P
clp
B
a
NAND
I0
nr
I1
a
O0
m1
NAND
I0
m1
I1
ns
O0
m2
© 2026 Daniil Khanin · khanin.info · HT-05
13
FF4013 …
6
TG
1×
1×
1×
7×
TG
A
a
N
clp
P
cln
B
m2w
m2w
m2
a
7
TG
1×
NAND
2×
0
10×
TG
A
m1
N
clp
P
cln
B
b
NAND
I0
b
I1
ns
O0
s1
NAND
I0
nr
I1
s1
O0
s2
© 2026 Daniil Khanin · khanin.info · HT-05
14
FF4013 …
8
TG
1×
1×
1×
7×
TG
A
b
N
cln
P
clp
B
s2w
s2w
s2
b
9
NOT
3×
0
6×
NOT
I0
s1
O0
q1
NOT
I0
q1
O0
Q
NOT
I0
b
O0
qn1
10
NOT
1×
0
2×
NOT
I0
qn1
O0
QN
11
Ctrl
+
G
Library
…
Chip N
2×
Library
…
FF4013
Enter
FF4013
D
CL
S
R
Q
QN
© 2026 Daniil Khanin · khanin.info · HT-05
15
CANVAS
CD4013
12
pin names as in the TI datasheet; a bar over a name in the picture = active 0, in the simulator without the bar
13
IN
8×
OUT
4×
D1
CLOCK1
SET1
RESET1
D2
CLOCK2
SET2
RESET2
Q1
QN1
Q2
QN2
14
FF4013
2×
12×
FF4013
D
D1
CL
CLOCK1
S
SET1
R
RESET1
Q
Q1
QN
QN1
FF4013
D
D2
CL
CLOCK2
S
SET2
R
RESET2
Q
Q2
QN
QN2
15
Ctrl
+
G
Library
…
Chip N
2×
Library
…
CD4013
Enter
CD4013
D1
CLOCK1
SET1
RESET1
D2
CLOCK2
SET2
RESET2
Q1
QN1
Q2
QN2
© 2026 Daniil Khanin · khanin.info · HT-05
16
CANVAS
16
VCC
1×
GND
1×
2×
VCC
VCC
GND
GND
17
0
3×
Q
Q
1×
4×
0
D
0
S
0
R
Clock
Clock
CL
18
CD4013
1×
10×
CD4013
D1
D
CLOCK1
CL
SET1
S
RESET1
R
D2
GND
CLOCK2
GND
SET2
GND
RESET2
GND
Q1
Q
QN1
QN
Q2
QN2
© 2026 Daniil Khanin · khanin.info · HT-05
17
CANVAS …
19
3×
3×
CL
Q
QN
20
Hz
1×
Q
Q
1×
2×
60Hz
CK60
Reset
Reset
RESET
21
CD4013
1×
10×
CD4013
D1
C30N
CLOCK1
CK60
SET1
GND
RESET1
RESET
D2
GND
CLOCK2
GND
SET2
GND
RESET2
GND
Q1
C30
QN1
C30N
Q2
QN2
22
2×
2×
CK60
C30
© 2026 Daniil Khanin · khanin.info · HT-05
18
CANVAS …
23
60Hz
1Hz
2Hz
10Hz
60Hz
4kHz
8kHz
16kHz
…
MAX
1
D
Clock
Clock
Q
QN
the Clock button loads D
1Hz
CK60
C30
CK60
C30
CK60
C30
CK60 at 1Hz — C30 half as often
© 2026 Daniil Khanin · khanin.info · HT-05
19
← Back to the lesson
Lesson 1. The CD4013 D flip-flop