This circuit is used to detect objects by reflected infrared light. It can be built into a cylindrical enclosure just like an inductive proximity switch. This is also useful as a level detector for colored liquids like oil. This has some immunity to ambient sunlight as it detects ac pulses.
This is a Hand Crafted PCB Artwork done by a PCB Vendor years back, this method may be used even today.
PCB Design –
This Layout may have many jumpers and may need to be cleared of Hairline shorts which has happened after i scanned it, cleaned it and enhanced it using image manipulation software.
This PCB would go into a 30mm Nickel Plated Brass threaded tube, with Epoxy or Teflon ends. These were turned components as quantities made were small. An Optical Proximity Sensor that would fit the same place as the eddy current or Inductive sensors, in existing machines. It could work a longer distance and could detect Non-Metals and even translucent fluids.
You can design your own PCB with CadSoft Eagle Layout Editor. Laser prints of output works well, but even Ink Jet printouts will work fine for small PCB’s like this. Take 3x or 4x prints.