In this tutorial we are going to interface an Optocoupler with ATMEGA8 microcontroller. Octocouplers are fascinating devices used to isolate the electronic and electrical circuits. This simple device isolates the sensitive electronics from robust electronics like motors, yet keeping the load in control over the source.