Share this

Photoelectric encoder phase detector counter circuit

2026-04-06 04:31:12 · · #1

The EPC-755A photoelectric encoder boasts excellent performance, exhibiting strong anti-interference capabilities in angle and displacement measurements, and providing a stable and reliable output pulse signal. This pulse signal, after counting, yields the measured digital signal. Therefore, in developing a car driving simulator, we selected the EPC-755A photoelectric encoder as the sensor for measuring the steering wheel rotation angle. Its output circuit is an open-collector type, with an output resolution of 360 pulses/revolution. Considering that the car steering wheel rotates bidirectionally (clockwise and counterclockwise), phase detection of the encoder's output signal is necessary for counting. Figure 2 shows the phase detection and bidirectional counting circuit actually used in the photoelectric encoder. The phase detection circuit consists of one D flip-flop and two NAND gates, while the counting circuit uses three 74LS193 chips.

When the photoelectric encoder rotates clockwise, the output waveform of channel A leads the output waveform of channel B by 90°. The D flip-flop outputs Q (waveform W1) are high and Q (waveform W2) are low. The upper NAND gate is open, and the counting pulse passes through (waveform W3) and is sent to the add pulse input terminal CU of the bidirectional counter 74LS193 for addition counting. At this time, the lower NAND gate is closed, and its output is high (waveform W4). When the photoelectric encoder rotates counterclockwise, the output waveform of channel A is delayed by 90° compared to the output waveform of channel B. The D flip-flop outputs Q (waveform W1) are low and Q (waveform W2) are high. The upper NAND gate is closed, and its output is high (waveform W3). At this time, the lower NAND gate is open, and the counting pulse passes through (waveform W4) and is sent to the decrement pulse input terminal CD of the bidirectional counter 74LS193 for subtraction counting. When the car steering wheel rotates clockwise and counterclockwise, its maximum rotation angle is two and a half turns. An encoder with a resolution of 360 pulses/revolution is selected, and its maximum output pulse count is 900. The actual counting circuit used consists of three 74LS193 chips. During system power-on initialization, the chip is first reset (CLR signal), and then its initial value is set to 800H, which is 2048 (LD signal). Thus, when the steering wheel rotates clockwise, the output range of the counting circuit is 2048 to 2948, and when the steering wheel rotates counterclockwise, the output range of the counting circuit is 2048 to 1148. The data outputs D0 to D11 of the counting circuit are sent to the data processing circuit.

In actual use, the steering wheel is frequently turned clockwise and counterclockwise. Due to quantization errors, after working for a long time, the output of the counting circuit when the steering wheel returns to center may not be 2048, but rather deviate by a few digits. To solve this problem, we added a steering wheel centering detection circuit. After the system is working, when the simulator is in a non-operational state, the data processing circuit detects the centering detection circuit. If the steering wheel is in the centering state and the data output of the counting circuit is not 2048, the counting circuit can be reset and the initial value can be reset.

Read next

CATDOLL Dodo 109CM TPE

Height: 109cm Weight: 15.6kg Shoulder Width: 26cm Bust/Waist/Hip: 52/50/57cm Oral Depth: 3-5cm Vaginal Depth: 3-13cm An...

Articles 2026-02-22