Step 4: Determine the LIMITS for the blind

Picture of Determine the LIMITS for the blind
Okay, so now we can tell the blind motor to go DOWN when the projector screen is going DOWN,
We can tell him to go UP when the projector screen is going UP.

But how do we know when to STOP?

When the instruction to go down is launched, I use a "delay(18000)" 18 seconds delay so that the blind is covering roughly the bottom of the mirror. Everytime it will go down, i tested it, it will arrive at the same position, but NOT exact, 1 or 2 cm different each time.

Because the position it arrives is different each time, we cannot do this when going UP, because after 2 or 3 times everything will be completely out of phase !

So we will use what is called a magnetic switch, to go UP while we didn't detect the switch closing.

It looks like this : http://www.radioshack.com/product/index.jsp?productId=2419297
It is also called a REED switch

I installed the wired part near the top of the blind on the wall, and inserted a neodyme magnet in the bottom of the blind,
so that the switch is activated when the UP position is reached.