Arduino digital input, 80Vdc

1st part ---> Completely clear! :smiley:
I will leave the 1n4148

2nd part ---> :fearful:

This is my first project with optocouplers and all the tutorials on the internet are much simpler than all this. they dont go into CTR, they just talk about the optocoupler as a led diode, current limiting resistor and not much more.