Wall Mount for IPad As Home Automation Control Panel, Using Servo Controlled Magnet to Activate Screen

9,686

29

3

Introduction: Wall Mount for IPad As Home Automation Control Panel, Using Servo Controlled Magnet to Activate Screen

About: Engineer, software enthusiast, home automator, keen gardener.

Lately I have spend quite some time automating things in and around my house. I am using Domoticz as my Home Automation application, see www.domoticz.com for details. In my search for a dashboard application that shows all Domoticz information together with all kinds of additional useful (and less useful) information, I discovered Dashticz , and I must say I like it a lot!

To conveniently show and control the Dashticz dashboard screens, I bought myself a second-hand iPad Air 1 tablet. Now all I needed was a nice way to mount the tablet on the wall at a central location in my living room. Off the shelf wall mounts for iPads are quite expensive, so I decided to simply order a custom 'made to size' picture frame in my local DIY store.

Finally, I needed a nice way to automatically activate/deactivate the tablet. Read on to see how 2 simple fridge magnets played a vital role in fixing this challenge.

Supplies:

  1. iPad tablet
  2. 90 Degree USB Data Charger cable

  3. made-to-size picture frame

  4. 6mm plywood
  5. 18mm plywood
  6. 9g SG90 micro servo
  7. ESP12 WeMos D1 Mini

  8. two small magnets

  9. strip of plexiglass

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Activating and Deactivating the Tablet Screen Using Magnets

As it seems a bit overdone to have the tablet always activated, I started looking for a way to activate it only when necessary. Of course I could use the automatic standby option of the iPad, but then I would have to touch the screen and press the home button every time I would like to activate it. As I already have a PIR sensor installed in my living room, attached to my home automation system, I decided to use that to activate/deactivate the tablet.

Unfortunately, I could not figure out a way to activate an iPad via software (without jailbreaking it). Then I realized that opening and closing of the iPad cover activates/deactives the tablet. Quick search on the internet showed that the iPad has some magnetic sensors which are triggered by magnets in the cover. I played around with 2 fridge magnets and found out that I could deactivate the iPad by fixing one magnet on the backside opposite of the home button, and moving the other magnet towards the backside in the upper right corner. Moving the second magnet away activates the iPad!

All I needed now was a mechanism to move this second magnet towards and away from the tablet on command. I had a small servo motor lying around which turned out to be perfect for the job. I cut a small piece of plexiglass, bent it using a heat gun and glued it to the servo arm. Finally, I glued one of the magnets to the plexiglass. A temporary prototype of this set-up showed that it all worked like a charm.

Step 2: Preparing the Frame

I ordered the aluminium picture frame in my local DIY store (it is custom made to exactly fit my iPad, leaving enough space to plug in the 90 degree angle power cable). Furthermore, the frame's depth leaves just enough space to mount the servo motor.

I cut out the space for the servo motor, and the fixed magnet in the 6mm plywood board. This board is used to firmly fix the tablet in the frame. I had to make sure to position the fixed magnet with the 'right polarity up' to make it work.

Finally, I cut out the space for the servo motor from the 18mm plywood board that serves as the wall plate to fix the frame to the wall.

The 90 degree angle power cable needed a little bit of modification to make it fit inside the frame.

Step 3: Programming the WeMos

I use the Arduino IDE application for this, which can be downloaded here. The IDE needs to be set up for use with the WeMos, there are plenty of goods instructions out there how to do that. The board type to use is "LOLIN(WEMOS) D1 R2 & mini".

The code I created can be found in the IpadServo.ino file below. If you want to re-use this code, make sure you update your WiFi SSID and password in the code. If you are on another IP network than 192.168.1.x, you need to update the WIFI_IP and WIFI_GATEWAY defines as well. Note that I use a fixed IP address and port for my WeMos.

The servo is connected to the WeMos by 3 wires: GND, 5V and signal (to D2).

After activating the WeMos, the servo (and thereby the iPad) can now be controlled by sending the following commands:

http://192.168.1.103:11103/on

http://192.168.1.103:11103/off

Step 4: The Final Result

After mounting the frame to the wall (power cable and servo connection cable are fed through a hole in the wall behind the frame to the adjacent pantry), I programmed my Domoticz home automation system to send the right commands to my WeMos, based on any motion detected by the PIR sensor in my livingroom. As you can see (and hear) from the video, activating and deactivating the iPad works fine!

If you like this project, don't forget to vote for me in the Magnets Contents, by pushing the Vote button below.

Be the First to Share

    Recommendations

    • Raspberry Pi Contest 2020

      Raspberry Pi Contest 2020
    • Wearables Contest

      Wearables Contest
    • Fix It Contest

      Fix It Contest

    3 Discussions

    0
    rtsam
    rtsam

    2 days ago

    Nice and clean!

    0
    Di4enti8
    Di4enti8

    18 days ago

    Really nice looking finished project. Thank you for sharing.