Continue to Site

Welcome to

Welcome to our site! is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Sensing 230v mains input from logic circuit (optocoupler? which one? how?)

Not open for further replies.


Member level 5
Feb 11, 2011
Reaction score
Trophy points
Activity points
Hi all,
I not sure where to post this. so don't hesitate to suggest a different section for this post.
I am designing an automatic control for the roller shutters in my house. Each shutter has a switch that can send the 230v phase on either of two lines. I'd like to send each of this two lines with a logic circuit and/or muController (raspberry Pi, Arduino...). How do I sense the presence of the phase on a wire while maintaining insulation between the two circuits? Should I use an optocoupler? Which one?
I'd like something compact, because I have 12 shutters to control, and with two commands for each, it makes 24 wires to sense.


One way is to use relays.
The easy way is to use Solid State Relay (SSR). SSR are optically isolated SCR or TRIAC driven by 5V logic. To find more google SSR.

thanks for your reply.
I'd read about this possibility, but I haven't been able to find details or application notes.
I've always thought of relays as DC-to-AC devices, or also as low power to high power.
Do you have any specific models in mind, or even better boards with multiple SSRs on them?
Or can the same SSR be used both as AC-to-DC and DC-to-AC?




Sensing mains voltage can be of course done with an optocoupler and is often done this way. Use sensitive optocouplers to reduce the series resistor power dissipation to an acceptable amount.

Could consider using a small coil to pick up the a.c. voltage similar to clip-on current meter concept for measuring a.c. current.

A coil doesn't sense voltage because a voltage isn't linked to a magnetic field. Are you considering a capacitive pickup?

FvM, you are right! I had mistakenly assumed that there would be current flow through when the ac voltage was connected, which was obviously wrong !! :(
Thank you for pointing it out.

Try using H11AA1 optocoupler made for what is sounds like you are doing.

Not open for further replies.

Part and Inventory Search

Welcome to