Special Part Request: 220v to 5v Reverse Optocoupler

To be honest, i don’t know if this is the right forum to ask for a thing like this.
I know most of Fritzing parts are analogous to physical parts, respecting sizes, values and so on.
However, i am finding myself into a strange situation: i’m working on a board wich has to know whether Mains voltage is present or not in a switch and then tell it to a microprocessor. I know about optocouplers which allow a microcontroller to safely turn on and off a SCR as programmed, but i never found a reverse unit wich can tell the microcontroller whether AC is present or not because of a sensor switch getting closed or open.

Now, after finding out, i got an idea: to try to choose a photo-transistor and some neon bulb. Whenever is voltage, the Neon illuminates and turns on the photo transistor wich pulls up or down a microcontroller pin.

As far as i know, this part seems to not exist, in consequence, i would like to ask the Fritzing team if it could be invented, maybe creating first a 3d printable light-tight case like a small relay and somehow getting the 2 elements together, then the schematic part could be published.

Honestly, i’m asking for this since i’m noticing in microcontroller powered appliances, they use to have both the microcontroller and the power elements (scr / triacs) wired together by means of resistors and capacitors. Should a component like this could be created, maybe it can be very helpful for whom tries to fight planned obsolescense and negligent design. My goal is to keep microcontrollers fully away from AC Grid power.

A google search for “optoisolated line voltage detector” turns up this post which describes how to do what you want. It will basically work with any optocoupler with a series resistor so this one from core parts should work unless (as in the case of the post below) you have a power limit issue.

Peter

1 Like