Hack My House: Raspberry Pi As Infrastructure

I finally had my own house. It was a repossession, and I bought it for a song. What was supposed to be a quick remodel quickly turned into the removal of most of the drywall in the house. There was a silver lining on this cloud of drywall dust and loose insulation. Rather than constantly retro-fitting cabling and gadgets in as needed, I could install everything ahead of time. A blank canvas, when the size of a house, can overwhelm a hacker. I’ve spent hours thinking through the infrastructure of my house, and many times I’ve wished for a guide written from a hacker’s perspective. This is that guide, or at least the start of it.

What do you want your smart house to do? And what do you want to be able to do in your smart house? For example, I wanted to be able to upgrade my cheap 120 V welder to a beefier 240 V model, so adding a 240 V plug in the garage was a must. As a bonus, that same 240 V circuit could be used for charging an electric car, if ever one is parked there.

“Ethernet everywhere” was my mantra. Try to imagine everywhere you might want to plug in a desktop, a laptop, an access point, or even a VoIP phone. I decided I wanted at least two Ethernet drops to each room, and tried to imagine the furniture layout in order to put them in convenient places.

Continue reading “Hack My House: Raspberry Pi As Infrastructure”

Adding Analog Touch To (Nearly) Any Mechanical Keyboard

The new hotness for DIY electronics is mechanical keyboards, and over the past few years we’ve seen some amazing innovations. This one is something different. It adds an analog sensor to nearly any mechanical key switch, does it with a minimal number of parts, and doesn’t require any modification of the switch itself. It’s a reddit thread and imgur post, but the idea is just so good we can overlook the documentation on this one.

The key development behind this type of sensor is realizing that nearly every mechanical keyswitch (Cherry MX, Kalth, Gateron) has a spring in the bottom. A spring is just a coil of wire, and an inductor is just a coil of wire, too. By putting a spiral trace on the PCB of a mechanical keyboard underneath the keyswitch, you can sense the inductance of this spring. This does require a little bit of additional hardware, in this case an LDC1614 inductance to digital converter, but this is an I2C-readable part that can, theoretically, be integrated rather easily with any mechanical keyboard PCB and firmware.

The downside to using the LDC1614 is that sampling is somewhat time-limited, with four channels or individual keys being polled at 500 Hz. This isn’t a problem if the use-case is adding analog to your WASD keys, but it may become a problem for an entire keyboard. Additionally, the LDC1614 is a slightly expensive part, at about $2 USD in quantity 1000. A fully analog keyboard using this technique is going to be pricey.

Right now, the proof-of-concept for this analog mechanical keyswitch is just a 0.1 mm flexible PCB that is shoehorned inbetween a Cherry MX red and a (normal) mechanical keyboard PCB. The next step in the development will be a 2×4 keypad with analog sensors, and opening up the hardware and firmware examples up under a GPL license.

Giant Connect Four Pits You Against The Computer

You can build a Connect Four solver in software, but it won’t be all that much fun. Now apply that same automation to a 15-foot-tall plywood version of the classic board game and you’ve just created a smile-making-machine for everyone within eyesight. Behold the Mono-Purpose Automated Robot Versed In Connnect4 (Marvin) which Ben and Jonathan dreamed up on their way home from Maker Faire last year, and made into their exhibit this year.

On the physical side of things they got really creative in lifting the discs and sorting them into the column chosen by the software brain of the game. A chain travels along one side with fingers every few feet. The fingers travel along the channel, lifting the discs. Those fingers are a couple of bolts, with some metal filler, all epoxied into one solid unit.

At the top of the disc elevator, and at the top position of each column in the gaming board, there are IR reflectance sensors which send feedback to the Arduino that drives the hardware. This proved a major issue during setup the day before the Faire. The reflectance sensors are just blasting out IR and not using a carrier signal. In direct sunlight, the detector was in a constant state of being tripped. After some trial and error, the logic for the sensors was flipped to detect the absence of sunlight by placing black plastic behind that top row of the board and putting duct tape over the IR emittors.

There’s a router and laptop rolled into the system. The Arduino makes an HTTP request to software on the laptop. In addition to determining where the next move should be made, the laptop is connected to a large screen which shows the current state of the gaming board. This is a head-to-head, human versus machine game. The human player drops their discs from the top of the board using a paint roller that hooks into a hole at the center of the disc. This way the player’s disc passes by the sensors, triggering the machine’s next move.

It’s a clever build and due to the sheer size it’s pretty awesome they were able to get it to the Faire from Philadelphia. Don’t miss the video after the break that shows off the fun and excitement of this gaming giant.

Continue reading “Giant Connect Four Pits You Against The Computer”