In above circuit diagram i am trying to control the 230volt lamp through MCU.
the exact operation will be as given below.
1. When the Switch is ON the MCU won't be able to control the LOAD.
2. When the Switch is OFF MCU controls the LOAD.
Now initially I have to detect whether the load is connected or not, through MCU.
Using below options i can do the same
1.Hall sensor
2.CT
But issue with above two options is the cost. Both of them are too expensive.
Also i can access LINE wire only.
I am thinking to use opto-coupler or shunt resistor(with differential amplifier) in the black box as shown in schematic.
but don't know how to use it.