Introduction: Electro Mechanical Control of Hidden Bookcase Doors

Here I will describe my first Arduino project that I designed and built to automatically open and close two hidden bookcase doors that I build two years ago. To understand the choices used in this design you should first visit the instructable that documents that project.

Step 1: Design Criteria

  1. Reliable, fully automatic open and close mechanism for both door hinges/sliders

  2. Outside open switch should be hidden.

  3. Inside manual switches to open/close doors

  4. Automatically close doors if no motion in room for 2 hours
  5. Low electric power use when in standby
  6. Emergency ingress/egress in case if power/arduino failure
  7. Pinch free if person or object is between closing doors

Step 2: Electrical and Mechanical Choices

Picture of Electrical and Mechanical Choices

After my first attempt to move the doors using stepper motors (too embarrassing to describe here), I choose to use 4 Progressive Automations PA-14 linear actuators. I found that 8 inch travel could be used for both the hinged movement and slide movement. I choose 50lb force versions that would allow the doors to fully open or close within an acceptable 10 seconds, but wouldn't go too fast and shake the contents in the bookcases.

These linear actuators (I'll refer to them as motors) contain built-in end stops so I didn't need to use any feedback circuits to the Arduino.

These motors were driven by a MultiMoto Arduino Shield. This can independently drive 4 12V high current DC motors forward or backward at variable speeds. This was important since I found out that under load some of the motors would open or close at slightly different speeds. I needed to compensate by slowing down the faster motors empirically until the 2 doors operated at the same speed.

The Arduino chosen was a genuine Uno (instead of a Mega) since I already had one. This proved to be a challenge since the MultiMoto shield used most of the pins for its own interface and I had to be clever to get my own input/outputs into the Arduino. I used the 5v standby voltage from the ATX power supply to power the Arduino, but had to wire this directly into the USB interface since the Arduino Vin needed to be above 7v.

Finally, the Arduino would receive the 3 switch inputs and upon activation, would ground the ATX power on pin which would power up and provide the full 12V high current needed for the MultiMoto board to send to the 4 motors.

All the hardware is mounted on a convenient shelf 5 ft off the ground.

Step 3: Secret DVD Switch for Opening Doors

Picture of Secret DVD Switch for Opening Doors

The door is built from 3/4" maple plywood and didn't really want to drill a hole through it. I tested and decided to use a magnetic reed switch attached to the inside of the door and used a high power 1" neodymium magnet taped to the inside of a DVD case. The reed switch I already had was normally closed (NC) and placing the DVD fully on the shelf would make the switch go open. Either NO or NC switch could have been used here.

The Arduino code would require the DVD to be tilted away then reinserted before it would start the open sequence.

Step 4: Arduino Interfaces

Picture of Arduino Interfaces

In additon to the Multimoto shield (which only requires 12v, ground and the 8 motor pins), I needed these inputs

2 manual inside switch inputs

1 outside switch input

1 PIR sensor (would go low if motion detected so needed this on an interrupt)

I also needed these as ouputs:

5v to power the PIR sensor

gnd for switches, PIR sensor

ATX pwr_on (gnd turns on)

However only pins 0,1, A4,A5 were unused by the Multimoto.

I initially wanted the PIR sensor on one of the native interrupt pins, but couldn't as the Multimoto used these. After talking with the very helpful techs at Progressive Automation and RobotPower, I wired the PIR sensor to the A5 input and used what is known as "Pin change interrupts" to trigger on a low pulse. A global counter is incremented every second if no PIR motion is detected . After 2 hours the door would start a door close sequence. If motion was detected, the count is reset to 0.

Pin A4 was wired as an output to the ATX pwr_on pin using an ATX power extension cable. This cable allows me to easily change the power supply without cutting/re-soldering if it fails in the future.

The reed door open switch was wired to Arduino pin 0. However this pin is also responsible to communicating on the USB port, so I needed to unplug this cable anytime I uploaded new code.

This still left the 2 manual open/close switches. The Arduino would communicate to the Multimoto shield at setup using the SPI bus. After setup, these pins were not used, so I piggybacked the open/close on pin 11 (MOSI) and 12 (MISO). These pins are duplicated conveniently on the Arduino 6 pin ICSP header at the bottom of the board (as well as 5v and gnd). This requires neither of the two pins to be pressed in the first few seconds of powering up the system.

Step 5: Linear Actuator Mounts

After trial and error, I found the mounting spots where the 4 motors could fully close and fully open at their end stops. See these 2 videos for the open and close sequences. The sequences start the motors around half speed and quickly ramp to full speed to reduce mechanical stresses. The door motor mounts on the right side door are a mirror image of the left door.

Step 6: Hinge Motor Mounts

Picture of Hinge Motor Mounts

I had to drill holes (at 90 degress) in the 2 motors responsible for pulling/pushing the doors on the hinge. This would allow the heavy motor to hang below the linear actuator to reduce stress and allow a smaller profile. This was necessary since there is only about 3" clearance for the right door when opened.

Step 7: Emergency Features

Picture of Emergency Features

I originally mounted the door slider motors directly to the wood with a bolt. I one of my more clever moments, I changed this mount to use 2 very strong hard drive head magnets. This allows me to force the two slides apart to allow emergency egress (ie: power failure, fire, etc) and ingress if any part of the Arduino control failed. The magnets hold firmly during the open or close sequence but manually slide apart easily if necessary.

.A side benefit is you don't have 50 lbs of force squeezing together if you get a finger/arm stuck during the close sequence.

One other safety feature is the Arduino code will power up assuming the doors are in a closed state. That way it will always allow the door to be opened from the outside DVD switch even after a power failure.

My code is shown here. The interesting stuff is in subroutines door_close_seq() and door_open_seq()

I hope you enjoyed this project!

Comments

TnmS (author)2017-04-17

amazing!

spark master (author)2017-01-23

now everyone is gunna want one!

EkinE (author)spark master2017-01-30

We gonna make one then.

NitroRustlerDriver (author)2017-01-25

Now to upgrade to pneumatic actuators to make it faster!

Cameronw1025 (author)2017-01-24

I want it

spark master (author)2017-01-23

awesome and escapable in a power out good stuff!

godson1952 (author)2017-01-22

VERY GOOD IDEA.

-Knoxxen- (author)2017-01-22

It's a given when I'm building my man cave! Awesome!!

Yonatan24 (author)2017-01-22

How can you get outside if you get stuck inside in a power outage?

SPECTREcat (author)Yonatan242017-01-22

Thought of that already. There are handles on the inside to manually push open the slides. See step 7

TANUJD (author)2017-01-22

awsome

biggles246 (author)2017-01-19

Thats so cool!

One problem though...If I built one it wouldn't be secret for long because I couldn't resist showing everyone!

Got my vote

SPECTREcat (author)biggles2462017-01-19

I think the entire population from the kids 2nd and 3rd grade know about it ;P

SPECTREcat (author)2017-01-19

This Wolo red strobe light just came in today so it's not in the videos. It's powered from the ATX 12v power supply. This really pushes the visual effects to 11!

kooth (author)2017-01-17

Very cool! I like the sound of the motors: It gives the project a suspense movie vibe! Well done!

PjElliott (author)2017-01-16

It's cool but it's so loud that you could never get away by hiding there! The bad guys would hear that down the hall!

kmanchanda (author)2017-01-16

My James Bond dream just came to life man. Thanks a ton ! Here's my vote!

DIY Hacks and How Tos (author)2017-01-16

This is by far the coolest secret bookcase I have ever seen!

About This Instructable

35,444views

389favorites

License:

Bio: Possibly kidnapped by aliens and replaced with an exact duplicate of himself. Seeks to make the universe a better place.
More by SPECTREcat:Add Wireless Phone Charging to Any VehiclePerimeter Water Leak SensorElectro Mechanical control of hidden bookcase doors
Add instructable to: