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)
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
JeanneD4RK:
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 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.
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.
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.