Main line conductivity check

Hello everyone,

I have an electric roller shutter with 3 wires, 1 COM, 1 up and 1 down wire.
I'd like to have a "sensor" to see if the shutter is all the way down (down limit switch open), all the way up (up limit switch open) or in between.

So the easiest way to check that is to see if the switches are open and this either with or without current flow (wall switch may be open and still need to check)

What would be the way to go ? Putting 5v on one side and digitalRead on the other side would instantly fry the arduino once plugged..


You need to add further limit switches connected to the Arduino.

I can't afford to lose the warranty and disassemble it. In such case I'll go with open door sensors and a magnet on the roller, or even a VL53L0X to see the distance but I'd rather be sure there is no way to do that with the wires

Search up AC Voltage Sensor Module Voltage Transformer Module maybe this is something that will work for you.

That would not work if the wall switch is open, there would be no voltage at all on either side of the limit switch

Like #1 says, add a couple of extra sensor switches.
Not difficult to do.
Small magnet and a couple of reed switches should do.

Something like this sensor would work and be much, much safer.

That would not work if the wall switch is open, there would be no voltage at all on either side of the limit switch

AC sensor detects an electromagnetic field. With AC the field is present even when the circuit is not complete. This would be used only on the AC side to detect whether the top switch is open or not. Anyhow, just a suggestion. There are many ways to go about this.

This is how a non contact AC detector works.

this is where we say to post a link to what you have.
Based on your post, I would assume that any device you have is a single channel and fed with mains voltage.
This is not a good candidate to tap into, especially since you said that warranty might be involved.

but, using some dedution, when powered, the devie would drive to an end (or not) and while powered, the signal would be present. while present, you can detect it. simple to do.
here is a deduction. once an end-switch has been reached, power is lost and the device REMAINS in place until power is applied to drive it the other way. this is an assumption since we do not know anything about the thing.

based on the above, you have to run wires to the switch, need to make a circuit to work from mains power, and probably use a optoisolator to protect your Arduino.

since you have to run wires then post #6 becomes the safest and least intensive interface. a glue-on sensor would not interfere with the device and should have no impact on warranty.

another option might be an optical sensor. so that at full extension or full retraction, a painted target would be seen and the sensor would be separate from your device. I like jremmington's solution better as over time, dirt could effect the operation of a visual sensor.

This night I cam up withe the following idea:

I can set this up like this :

And then logically do :

  • Check MOC if there is a 220v signal

YES --> If yes, the switch it open (and shutter moving btw)
NO --> Set A0 and A3 to output high
Check A5 is > 1.5v (diode + mosfet voltage drop will lower 5v to ~2v)
Set A0 and A3 to output low immediatly

In case of 220v being activated during this operation, 50hz should rise slow enough for everything to be finished long before.

Am I right ?

You have grounded pin A0.

Yeah I made a mistake I edited my post

Let me know if you see smoke happen with that one... please take a video

Let me know if you see smoke happen with that one... please take a video

Really helpful, thx

You’ve ignore the previous suggestions and have designed a very dangerous circuit... can’t be helpful if you ignore good suggestions.

Dude you suggested an ac sensor where I told I need to detect even if the previous switch is open. If the switch is open it won't detect shit. So let me quotedit you;

You've ignore the previous requirements and suggested a shitty solution.

Good luck don’t hurt yourself or set fires