The door of eLab Hackerspace is an aluminium door with an emergency exit lever. We weren't allowed to drill or modify the door in any way, so we tried to find a way of using the lever to open the door. We engineered a way of using a geared DC motor
to pull it to open the door and also found a way of attaching the motor to the door without any drilling or glueing. We attached the motor to a piece of metal and then used the silicone frame of the aluminium door to hold it in place. It turned out to be surprisingly easy to put the motor in place. To pull the lever, we placed an off-centered pin in a gear that was attached to the motor's axle and then used a small piece of a pulley taken from an old printer to attach the off-centered pin to the lever. It's basically the same type of mechanism used in car pistons. In case your door does not have an opening lever, you can use any other mechanism to open it either using an electronic lock, or by using a gear motor to open the door in any other way. You just have to be creative :)
We also added a switch that would be triggered by the rotating gear when the lever was in the "open" position. After the mechanics of the system were done, we designed a simple board with a PIC16F88 microcontroller
(more details about the board on step 5) based on the PIC16F88 prototyping board that we had previously designed for us to use at the hackerspace. We also did some simple programming of the PIC16F88 just to test the door opening mechanism: when a button was clicked, it would turn on the motor until the "open" switch was activated, then wait three seconds, and then turn on the motor again until the "open" switch stopped being activated, which meant that the lever was in the "closed" position. However, we ran into our first problem: the motor was so noisy that it was generating voltage spikes in the pin that was supposed to read the switch. We tried putting the noise filtering capacitors in the motor's pins, tried using a more stable power supply, but we weren't being able to filter it using hardware. After some time trying to fix the problem using hardware, we remembered a simple and clever way that worked like a charm: implement a software mechanism that would ignore isolated voltage spikes. We simply implemented a counter and defined a counting threshold: the PIC16F88 would count every time that the pin read a logic 1 but would only consider that button as being activated when the threshold value was reached, The counter would increase its value with the voltage spikes, but when the switch was actually activated, the counting value would increase extremely fast, reaching the threshold value. Having the opening/closing mechanism ready, it was time to start assembling all the control system and work on the GSM part of the system.