Optical Detector

The design is very simple it is based on “A New DCC & DC Car & Loco Detector – Differential Absolute Position Detector (DAPD)” by Geoff Bunza. I changed the IR detector to a PT334 and added an 18k resistor from the output to ground to ensure the output is suitable for an ES32 or ESP82366 micro controller.

The circuit has a few components:

  • R1 – a 5.6K 1/4 watt resistor
  • R2 & R3 – 10K 1/4 watt resistors
  • R4 – a 18K 1/4 watt resistor
  • Q1 & Q2 – PT334 – 5mm phototransistors
  • U1 – a Single Differential Comparator (SMD)

The follow schematic shows the circuit
opdetector circuit
The PCB design can be found in my GitHub repository