I have a development board from Microchip. It works on 12 V DC. The input pins can only work on 3.3 V so what I have done is I have designed a circuit using a PC817 optocoupler. So on the LED side I am supplying 12 V and on the transistor side I am using the 3.3 V from the development board and connecting to the input pins of controller. Circuit below:
Now, looking at the circuit it is isolated. But I am powering the development board and supply the 12 V as input to optocoupler from the same power supply. So I think ground is still common. So this kind of circuit still isolated? If not, how to properly achieve isolation? Do we really need different power supply for isolation? What is the effective way of providing isolation?