door opener science project

9,469

Circuit Image

This button, with some modifications, allows the opening of an office door using Nexus One, iPhone, or SMS. Positioned near the reception desk, this button activates an electronic latch on the front door. Upon removing the assembly from the wall, it was discovered that the system is quite simple: the button connects two wires. Bridging these wires with a screwdriver triggered the latch. The small gauge and uninsulated connections indicated that the voltages involved were low and not hazardous; however, caution is advised when working with electrical wiring. Connecting two low-voltage wires electronically is a straightforward task, prompting the development of a system to connect this switch to a network. Previous experience with custom router firmware and Arduino microcontrollers led to the decision to utilize these tools for the project. However, difficulties with the router's serial connection led to the abandonment of the Arduino, deemed unnecessary for this application. Inspired by the MAKE: Electronics book, a new circuit was constructed to interface with the switch. The project employed a Linksys WRT54GL router, known for its compatibility with custom firmware, particularly OpenWRT. This firmware allows for extensive customization, although it requires familiarity with command-line operations. A custom firmware version was created that included a minimal Python installation, fitting within the router's limited 2MB flash memory. Once the firmware was installed, SSH access to the router enabled control over its GPIOs (General Purpose Input/Outputs), which are used for interfacing with the system's LEDs and switches. A GPIO connected to the "DMZ" LED was selected for control, and a simple script was written to toggle it. The next step involved hardware modifications, including adding a pin header to the router's PCB, which facilitated the connection to ground.

The electronic circuit described involves a simple push-button mechanism that operates an electronic latch to secure or release a door lock. The system is designed for low-voltage operation, ensuring safety and ease of integration into existing infrastructure. The button is connected to two wires that form the core of the electronic latch mechanism, which can be activated remotely through networked devices.

The choice of the Linksys WRT54GL router for this project is significant due to its support for open-source firmware such as OpenWRT. This firmware provides the necessary flexibility to customize the router's functionality to meet specific project requirements. The installation of a lightweight version of Python allows for scripting capabilities, enabling the control of GPIOs through network commands. The GPIOs serve as digital inputs and outputs, facilitating the interaction between the router and external components, such as the push-button switch and the electronic latch.

The addition of a pin header to the router's PCB is a practical modification that enhances the router's capability to interface with other electronic components. This modification allows for easy access to the GPIOs, enabling the integration of various sensors, actuators, or other devices that may be required for expanded functionality.

Overall, the project exemplifies the integration of consumer-grade electronics with custom firmware and scripting to create a network-enabled door access control system. The combination of low-voltage operation, programmable GPIOs, and the ability to control the system remotely through a network connection creates a robust solution for modern office environments.This button, with a few hacks, now makes it so we can open up our office with our Nexus Ones, iPhones or even SMS. Located near the reception desk, this button opens an electronic latch on the front door. Pulling the assembly out of the wall revealed the system to be about as simple as possible: the button simply connects two wires.

Bridging them with a screwdriver fired the latch (from their small gauge and uninsulated connections, it was obvious we weren`t dealing with dangerous voltages, but please don`t start pulling cable from your walls unless you know what you`re doing). Connecting two low-voltage wires electronically isn`t a particularly hard trick, so I decided it`d be fun to spend some evenings building a system to expose that switch to our network.

I`ve built a few projects in the past that make use of custom router firmwares and Arduino microcontrollers, so I decided to use those tools for the job. I`m a big fan of this approach - it`s a great, inexpensive way to add a scriptable network interface to your microcontroller projects (if you`re interested, I talk more about this technique here ).

Ultimately, I ran into difficulty getting this particular router`s serial connection to work, so I abandoned the Arduino - it was overkill anyway. Inspired by the excellent new MAKE: Electronics book, I decided to build a circuit to do the job. Here`s the finished franken-router, hooked up to the switch: So how does this all work Well, let`s start with the router.

It`s a Linksys WRT54GL, a still-Linux-friendly descendant of the WRT54G, the router which jump-started the custom firmware scene. There are a lot of custom router firmwares available - DD-WRT, Tomato, Gargoyle - and they can all make your consumer-grade router do some professional-grade things.

For this project I used OpenWRT, the system on which many of those other projects are based. It`s got a much steeper learning curve than those other distros - you definitely need to be comfortable with the command line - but it lets you build a custom firmware with exactly the components you want. With some tweaking I was able to create a firmware that included a stripped-down version of Python, but which still fit into the WRT54GL`s meager 2MB flash memory.

(Like the Arduino, Python turned out to be overkill, but at the time I expected to need it - and it`s always nice to have it handy. ) With the firmware installed, I was able to SSH into the router and perform some simple manipulations of the system`s GPIOs - General Purpose Input/Outputs.

These connect to things like the system`s LEDs and switches, and can be controlled in software. I selected a GPIO that didn`t seem to be used by OpenWRT - it illuminates the "DMZ" LED on the front panel - and wrote a very simple script to control it. I could now flip a tiny light on and off from a network connection. The hard part was over. Next came the hardware. It was easy to add a pin header to the router`s PCB - it`s got holes drilled and ready to go (some of them are connected to router systems - see here ).

To this I hooked up ground, 🔗 External reference