A real working project
Finally, here you have a real picture of the complete circuit assembled with the optocoupler I had and a coin being detected:
Finally, here you have a real picture of the complete circuit assembled with the optocoupler I had and a coin being detected: