Setup:
Connect 5V across an infrared photodiode that is in series with a 10M resistor. This will generate the input pulse shown across the resistor when the diode is hit by an infrared light source placed 21cm away. The beam is provided by an infrared diode powered by 5V and in series with 330 resistor.
Circuit purpose:
Light a Led when the infrared beam is broken. Warning! This technique works but is susceptible to daylight. So you need to ensure that you shield the receiving diode so that it knows the difference between IR from the transmitting diode and the IR coming from the sun!!
I plan to connect this circuit to Microbit GPIO input pin (hence the voltage divider at the output stage)