PIRs and Scratch-n-Dent Doors

by Ben N on February 27, 2015

Progress continues on the STAR TREK DOORS!

Last night, I got a chance to stop on over at Fred’s to work on the doors. I purchased a bag of PIRs (Passive Infrared sensors) from Amazon, and started playing with them, hooking one up to my Arduino Uno. By playing around with a bit of sample code, I was fairly easily able to make the PIR communicate to the Arduino and then use that signal to activate something else. I happened to have a servo and laser hooked up to the breadboard with my Lego and hot-glue system, so I tested it all out by making a motion-activated robot. When the PIR would sense movement, the device would turn on the red laser diode and swing the Lego arm it was mounted on back and forth. The effect is sort of an automated cat toy, or a device that startles my wife when she walks into the kitchen at night.

But the proof of concept was good, so I headed over to Fred’s where I have the full-scale mock-up of the STAR TREK DOORS all set up. I mounted the Arduino, breadboard, and relays all to the frame of the door, and the PIR to a light stand over the door frame.

Next, I got out the OTHER air valve I have. I originally ordered two – a three-port valve and a five-port valve. I started off using the five-port valve because it allows for operating an air cylinder under power BOTH directions using just a single switch. However, the cylinder is always under pressure and held in place either fully open or closed. There is no depressurized mode or simple way to open or close the door by hand.

By instead using TWO valves (one to open, one to close) I can still power the doors in both directions, but can also have a manual mode, where neither end of the air cylinder is pressurized. (I could also pressurize both ends at the same time, but I’m not sure how I could do something useful with that, maybe an air brake?) Thinking of safety first, leaving the door depressurized most of the time means that it wouldn’t ever be “locked shut”. In event of a blackout, fire, or other emergency, the door could easily be slid open by hand.

I wired up both air solenoid valves to two of the relays on the four-relay board. That still leaves me a pair of Arduino-controlled relays for other fun, such as activating lights or sounds.

To hook up the air for BOTH valves, I would need an air supply splitter, as well as some way to plug up the spare “OUT” port on the five-port valve, which would mean a trip to the hardware or home improvement store. It turned out to be Fred’s night off, and he was eyeing the Mernards flyer for on-sale plywood, so we headed there for materials.

At the store, we looked at stains, some odd sprinkler parts that also work with air, and then headed to the doors department. The store’s supply of pocket door parts was limited, but we happened to stumble on the “Scratch-n-Dent” door area. A few of these doors were marked as low as $5 each. Some of the fancy security doors, even scratched and dented, were up to $120.

We had originally considered building the STAR TREK DOORS from scratch, but how can you beat five dollars? We found three doors that were hollow-core, with a typical wood-grain finish. One was completely plain, the other two were already drilled out for door knobs and hinges. We got three because that’s how many we could find that more-or-less matched and with three, we can screw one up and still have two to work with! We confirmed the $5 price on the doors with a department lead employee, and then I picked up the air parts while Fred headed to the building materials department to get three sheets of on-sale 1/4″ luan plywood.

Once checked-out and packed in the pickup, we headed back to home base. I was now able to use several adapters to connect the air compressor to both valves. With them wired to the relays and the Arduino running from a borrowed USB adapter, I plugged everything in and did indeed get the correct combination of blinking lights.

I turned on the air compressor and waved my hand in front of the PIR. Sure enough the “Open-the-Door” valve would turn on, pushing the door open, and then a few moments later, turn off, depressurizing the air cylinder. The door would stay open as long as the PIR kept sensing movement. Once it no longer sensed movement, the Arduino code would continue and activate the “Close-the-Door” valve, which would of course close the door, and then a moment later, depressurize the air cylinder.

Wow! This actually worked! As long as the door wasn’t actively opening or closing, I could easily slide it by hand. Using two air valves instead of one gives lots more flexibility in the design of the system. It’s still a wobbly mockup that shakes a bit, but the concept is proving itself well!

Meanwhile, Fred was cleaning up around the actual doorway, including removing the shelf where the right-hand half of the door would need to slide to. We did a mock-up by holding the actual air cylinders over the door. (We have three working air cylinders, a 24″ on the prototype door, and a matched pair of stainless steel cylinders for use on the final project.) While the cylinders have an 18 inch throw, the cylinders total length is about 23″ long. We decided to make the doors that width so that the pair of air cylinders would be able to sit perfectly end to end above the door. It’s a 36″ door opening, so two 18″ doors would be a perfect fit, but have a few more inches hiding in the wall wouldn’t hurt – it would actually make it easier to give more space to attach the air cylinders to the doors, allow for the track, and give more room for weather-stripping.

We decided that on the doors with door-knob-holes, we would cut that side – both to get rid of the hole and save the weight of the heavy particle board right around it. We set the table-saw to 23″ wide and ran the entire length of the door through it.

The cut edge shows how a hollow-core door works – it’s essentially two panels with little more than strips of corrugated cardboard in between. We will have to add a strip of wood along the cut to create a new solid edge. However, it’s not rocket science, and I’ve already learned how to customize hollow-cores while working on my daughter’s Dutch Door.

By then it was about time to call it a night, but it’s pretty exciting to have the air valves working AND cut an actual door to size!

Stay tuned! Subscribe to this blog or my Youtube channel to stay up to date on this project! Click here to see the whole project details and timeline.

One to beam up…. -Ben

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: