door spring

Compliant Contacts: Hacking Door Locks With Pen Springs

As you may have guessed given our name, we do love hacks around here, and this one is a great example of making some common, everyday things work in uncommon ways. [Nathan] sent in his hack to detect the door lock position in his basement.

Having a house that dates back to the 1890s, much of it was not very conducive to using off-the-shelf home automation devices. [Nathan] wanted a way to check the status of the basement deadbolt. He went about putting together a custom sensor using some spare parts, including a spare BeagleBone Black. Going full MacGyver, [Nathan] used springs from a ballpoint pen to craft a compliant contact for his sensor.

The pair of springs sat in the door frame and came in contact with the deadbolt; given they are springs, the exact position of the sensor was not very sensitive, as if too close it would just compress the springs slightly more. The springs were wired to the BeagleBone Black’s GPIO, acting as a switch to sense when there was conductivity between the springs through the deadbolt.

This wasn’t just a plug-it-in-and-it-works type of project, mind you; the BeagleBone Black was over 15 ft away from the sensors, lending plenty of opportunity for noise to be introduced into the lines. To combat this, [Nathan] created an RC filter to filter out all the high-frequency noise picked up by his sensor. Following the RC filter, he added in some code to handle the debounce of the sensor, as the springs have some inherent noise in them. Thanks [Nathan] for sending in your resourceful hack; we love seeing the resourcefulness of reusing things already on hand for other purposes. Be sure to check out some of the other repurposed components we’ve featured.

Voltage Divider? Filter? It’s Both!

When we do textbook analysis, we tend to ignore the real-world concerns for the sake of learning. So, a typical theoretical voltage divider is simply two resistors. But if you examine a low-pass RC filter, you’ll see a single resistor and a capacitor. What if you combine them? That’s what [Old Hack EE] did in a recent video, and you can check it out below.

It helps if you are familiar with Thevenin equivalents and, of course, Ohm’s Law. There’s also a bit of algebra, but nothing too complicated. The example design has a lossy filter at 100 Hz.

Of course, RC filters are easy to understand if you think of them as voltage dividers with a frequency-variable resistance, which is what the math is basically saying. The load impedance, in this case, is R2 in parallel with Xc at a given frequency.

He mentions that you might find a circuit like this in a power supply. However, it is also common to see this circuit wherever a divider drives a load with capacitance or even parasitic capacitance in cables or circuit boards.

We’ve discussed Thevenin equivalence modeling before. If you want really good filters, you are probably going to need op-amps.

Continue reading “Voltage Divider? Filter? It’s Both!”