Were there technologies before photodiodes/phototransistors or similar semiconductors, which could be used to start or stop machinery based on the amount (or presence/absence) of light falling on them?
The first electrical light sensors were selenium cells. Selenium was used for resistances at the receiving station on the transatlantic telegraph cable in the 1860s, and it was noticed that it gave erratic results in daylight. Selenium can generate a small photovoltaic current so it was used in pre-war lightmeters and (I think) "Magic Eye" demonstrations at the London Science Museum...
Photoresistors were the predecessors of photodiodes.
Instead of acting as current source they were light dependent resistors (LDRs). Their main disadvantage is that they react very slowly to light changes.
Not really used in a similar way for stopping machines like in your question, but before there were phototransistors/diodes we had photomultiplier tubes.
Under influence of a high voltage a single photon that collides with the light sensitive cathode will release several electrons. Then these electrons are attracted to the anode, on their way there collide couple times again, releasing even more electrons. Anyways, the wiki article linked is much better in explaining the mechanics.
A photomultiplier tube is one such device. They are still used in some applications and as per a photodiode comparison with photomultipliers looking at the some disadvantages of a photodiode some areas where a photomultiplier has advantages:
- Larger detection area
- Has internal gain
- Much higher sensitivity
- Photon counting possible without special cooling and interfacing electronics
- Response time faster for many designs
While no longer typically used for that purpose the articles states them as being the first electric eye devices, being used to measure interruptions in beams of light. Here's an image from the above Wikipedia article of what one looks like:
Simpler than the photomultiplier tube is the basic vacuum tube photodiode:
The curved plate is the photocathode, and the wire post in the center is the anode. Photons knock electrons free from the surfaces of both elements, but since the area of the cathode is so much larger than the anode, there's a net flow of them from the cathode to the anode — which can also be thought of as a "positive current" from anode to cathode.
Albert Einstein got his Nobel Prize (1921) for explaining how this works (paper published in 1905).
It was in 1873 Willoughby Smith discovered that the electrical resistance of grey selenium was dependent on the ambient light. The first commercial products were developed by Werner Siemens in the mid-1870s.
The very first image sensors were vidicon tubes, which are a vacuum tube technology. These are made from low work function metals in a photocathode. These devices are still indirectly referenced in modern sensor designs. When someone says they have 1/2" sensor (or 1/3" or 1/3.4" etc) they are comparing the image diagonal to a vidicon tube diameter which for a 1" external diameter was roughly a 16 mm imaging area. But that isn't a "standard" either.