Personal computing discussed

Moderators: askfranklin, renee, emkubed, Captain Ned

 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Project write up: Magic Mirror

Fri Oct 07, 2016 10:05 am

Hey gerbils! I had a question about remote administration for a project and someone asked me nicely for a project log. So I'm writing up my experiences building a Magic Mirror, based upon Michael Teeuw's original design. Michael has been an incredible resource for this project, not the least of which is releasing his code and creating a module system. This has opened his original concept to other developers and it's going gangbusters.

The concept is, like most clever things, pretty simple. If you put a computer monitor behind one-way glass, you can project images onto the mirror. You can drive the monitor using a Raspberry Pi and use whatever code you can come up with in order to display information. I decided to make one of these as a wedding present to a friend of my wife's.

Parts list:
1 cheap monitor with HDMI input
1 sheet of 16" x 20" one-way acrylic
1 Raspberry Pi 3
1 PIR sensor for the Pi
1 tiny USB wireless network adapter
12" connector cable for the PIR sensor
1 flush mount USB extension cable (for boats & motorcycles)
1 NextGadget 20W desktop charger
1 backless wooden picture frame
11 feet of 1x3" maple wood
5 feet of 1x2" maple wood
1 small can of walnut wood stain
4 right angle brackets
1 French cleat
Wire brads
Wood glue

Finished product (well, mostly finished):
Image
Last edited by Darkmage on Fri Oct 07, 2016 11:07 am, edited 2 times in total.
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Fri Oct 07, 2016 10:13 am

First, let's look at the monitor. You can leave it just as is, but it makes more sense to remove the plastic and slim it down some. On the positive side, all the boring fiddling with stands that you do when you get a new monitor can just be ignored. There was a little decision making here, but not much. Basically you need a cheap monitor with an HDMI input and sockets that point down, rather than sockets that point towards the rear. I briefly considered getting a monitor with a built-in USB port to power the Raspberry Pi. But it's very difficult to find the output current for these ports and the Pi needs about 2.0 amps in order to run well. It would have been convenient, but ultimately I decided against it. Which did cut down a lot on the cost of the monitor.
Image

Let's get that case off. There were only a couple screws holding it on. The bezel around the monitor came off with a little judicious use of a flat bladed screwdriver. The next step was to cover the aluminum edge of the screen with black electrical tape. Anything that lights up or reflects light behind the glass will be visible to some extent. So we just black out everything as much as possible.
Image
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Fri Oct 07, 2016 10:27 am

Once the monitor is prepped, it's time to hook up the power supply and the Pi for a functionality test. I was hoping to to a minimum of soldering, as my soldering skills are amateurish at best. Several other mirror builders have wired up splitters and power sockets and use tablet power bricks. I just bought a desktop USB charger that had a couple of AC sockets. The USB ports run 2.4amps, which is plenty for the Pi. A short right-angle USB cord works just fine.
Image

Connect to the monitor through the included HDMI cable and verify that one is feeding the other.
Image

At this point, you can download the Magic Mirror code and start fiddling with your interface. This actually worked well for me as we had several weeks of a full social calendar so I couldn't set up my woodworking stuff. So after SWMBO would go to bed, I'd plug in the Pi and then try to get an understanding of the code. I'm not much of a Javascript guy and I'd never heard of Electron, NPM, PM2 and a couple other technologies before. At some point I'm going to have to transition to management. I can't keep up with you youngsters.

The good news is that the resources for the mirror code are expanding by leaps and bounds of late. Including a really comprehensive, step-by-step tutorial on how to get it up & running. Even I can get this thing going now.
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Fri Oct 07, 2016 10:51 am

Back to hardware. The basic concept is that you mount a computer monitor just behind a sheet of one-way glass. Most of the mirrors built are essentially wooden boxes around the edge of a monitor. Get a sheet of one-way glass to match your monitor's size and then build a frame around the front to hold the glass/monitor in place and make it look nice.

In my case, it was slightly more complicated. The couple getting married have a house with an ornate decorating style to it. So a sleek modern mirror wasn't going to match the rest of the décor. Originally, I was looking in antique shops for old, ornate mirrors that I could use. I hit upon another solution later and bought an ornate backless picture frame from Hobby Lobby. The problem is that it is larger than the monitor, so building a box around the monitor's edge wouldn't give me enough overlap to screw the frame into the box. My first attempt was to build the box around the monitor and extend the lumber out further to reach the frame. I could screw down the protruding pieces into the frame and hope the glass kept the monitor from falling forward. Let's just say that the cuts to get the pieces to interlock is beyond my woodworking skills.

Second attempt went much faster once I consulted with my neighbor and realized that the monitor doesn't have to be right up next to the glass. It just has to be close enough that the light from the monitor can make it through. It's much easier to build something to hold the monitor inside a box than it is to extend a box beyond its normal dimensions.

Start by building a box from the 1x3" maple that matches the frame. This is larger than the monitor and sized so that the middle of each board is down the middle of the frame's back. Make sure it's square, apply wood glue, pipe clamps and brad nails.
Image

To hold the monitor, I cut two pieces of the 1x2" maple as long as the interior dimension of the box. These will be the monitor supports. After much measuring, testing on scrap and building a temporary fence on my work surface, I was able to use my router to put a channel down the middle of each support.
Image

Stain everything with two coats of walnut wood stain. Because I didn't have maple wood stain.
Image
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Fri Oct 07, 2016 11:01 am

Once everything dries, it's time for assembly. What I should have done at this point is cut a channel in the box for the power cord and drill the hole for the flush-mount USB port. But I didn't and ended up having to do it after everything was assembled and vacuum up the wood chips. Also, some method of routing the wires to the controls to the monitor would have been desirable. The button board was attached to the bezel, so for now it's attached to the bottom of the frame with industrial boogers.

Peel the film off of your one-way glass (or in my case, acrylic) and drop it into the channel for the frame that normally holds picture glass. Place your box on the back of the frame and then use some scrap runners to attach to both the frame and the box.
Image

Interestingly, the frame seems to have expanded slightly during the weeks I was doing the software. When the acrylic arrived from TAP Plastics, it was the perfect size for the frame and just dropped right into the channel for the glass. When I was doing final assembly, it was an extremely snug fit. I had to remove some of the channel with a bastard file to get it to fit. And it's mighty snug now.

Install the lower monitor support and screw it down nice & tight.
Image

And at this point, put the upper support on the monitor, gently lower it into place and screw it down. Attach all of your components, half-ass the cable routing with painter's tape and break for dinner.
Image
Last edited by Darkmage on Sat Nov 12, 2016 9:38 pm, edited 3 times in total.
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Fri Oct 07, 2016 11:06 am

Alas, I didn't take as many pictures as I'd hoped building this project. But these should give you a pretty good idea of the process. Since the final assembly picture, I have added black construction paper to the back of the mirror that is not covered by the monitor. I found that hanging the mirror on a light colored wall made it possible to see the edge of the monitor in some circumstances. I also cut a hole in the construction paper for the PIR sensor. I attached a French cleat to the box to hang the mirror. It's a bit overkill for the given weight, but I don't trust a hook.

What's left:
  • The power cord is too short.
  • Better routing for the monitor controls
  • The PIR sensor needs a better mount
  • The code to wake the mirror on PIR trigger isn't working
  • I need a way to remotely log into the mirror on someone else's wireless network.
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
Waco
Maximum Gerbil
Posts: 4850
Joined: Tue Jan 20, 2009 4:14 pm
Location: Los Alamos, NM

Re: Project write up: Magic Mirror

Fri Oct 07, 2016 12:31 pm

You've got me wanting to build one of these now. :D

Where did you get one-way glass? I briefly looked at Lowes/Home Depot and didn't find it.
Victory requires no explanation. Defeat allows none.
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Mon Oct 10, 2016 6:48 am

Waco wrote:
Where did you get one-way glass? I briefly looked at Lowes/Home Depot and didn't find it.
I had to order it. It's actually acrylic from TAP Plastics. Notably, their web form let me specify the size down to 1/16". Like most things, there are advantages and disadvantages to any choice. If you're going to go with glass, www.twowaymirrors.com is probably the place to go. I called around and got some quotes from local vendors and they were comparable. So depending on your area it may make sense to skip shipping and buy locally.

Acrylic
  • Lighter
  • Cheaper
  • Easier to cut if you must

Glass
  • Looks better
  • Doesn't flex in the frame (no funhouse mirror effect)
  • Available in many different light transmission rates
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
DragonDaddyBear
Gerbil Elite
Posts: 985
Joined: Fri Jan 30, 2009 8:01 am

Re: Project write up: Magic Mirror

Mon Oct 10, 2016 8:42 am

This build is awesome.  Even my wife thinks it's cool. It's the kind of project that I would do if I had time (i.e. no kids). 

Is it as easy as you make it look?
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Tue Oct 11, 2016 6:02 am

It's actually not terribly difficult if you have decent tools and moderate experience. I did the woodworking in a day, more or less. I do want to be completely honest here: I lost a day due to a poor design. My first design for the box with the notches and extending the walls of the box out to the frame was a flat out bad design. After a day of trying to make that work and learning yet again that a circular saw is not a precision instrument, I scrapped everything and started over a week later. At which point it was pretty easy.

Tools
(the ones I consider to be mandatory are in green)
Miter saw
Tape measure
Brad Nailer
Pipe Clamps
90o corner clamp (this is the only tool that I bought for this project)
Plunge Router w/ 5/8" straight bit
Carpenter's square
Wood glue
Cordless drill w/bits
Ratcheting screwdriver
Old napkin to spread the stain

The one tool that I thought I had but it turns out I did not was an edge guide for my router. That would have sped up the channels for the monitor considerably. Interestingly, the box itself went together really quickly.

My mirror is a bit more complex than most due to pre-built frame. If you're willing to build your own frame, then the box design is a bit simpler (as you eliminate the interior braces that hold the monitor). You essentially build a box the size of the outside of your monitor and as deep as that of your monitor plus the thickness of your glass. The frame's interior dimensions are slightly smaller than the monitor's, so it holds the glass up against the monitor. Some scrap runners screwed into the box on the inside keep the monitor in place. There are lots of examples and a couple of parts diagrams/blueprints out there. Naturally, there is a dedicated discussion forum.
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
paulWTAMU
Emperor Gerbilius I
Posts: 6257
Joined: Wed Nov 24, 2004 5:14 am
Location: Dallas, Texas

Re: Project write up: Magic Mirror

Tue Oct 11, 2016 9:28 am

That's neat; it's like a real life HUD display in a game :D Too bad you're limited to mirrors that are equal in size to monitors. Or maybe you could use an OLED TV for a bigger mirror? 
Ugly people have sex all the time. We wouldn't have 6 and a half billion humans if you had to be beautiful to get laid.
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Tue Oct 11, 2016 10:27 am

You're not actually limited to a monitor/mirror size parity. There's a dude in... Germany, I think [edit: Czech Republic] who replaced a full length mirror on an Ikea sliding closet door unit with one-way glass. He mounted the monitor in the top 1/4 or so. It even slides out of the way of his closet. Yes, he only gets the projection where the monitor exists. But he doesn't really need a newsfeed down by his toes. :) There are a few bathrooms of the rich and famous type installations that have separate monitors behind one-way glass over dual sinks. So you can watch the news while you're in the bathroom. That's a bit much, IMHO, as I don't need television so much that I can't miss the amount of time it takes me to brush my teeth. But there is a lot of possibility in the technique.

There are companies that make custom home theaters that use a version of one-way mirrors for television installations. The brand name for the glass is Pilkington MirroView or VanityView. Usually you build a box in the wall to house the mirror and then hang the glass & frame flush against the wall. But if you're not opposed to it sticking out a bit, you're really only limited by how much glass & TV you can afford.
Last edited by Darkmage on Thu Oct 13, 2016 9:47 pm, edited 1 time in total.
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
paulWTAMU
Emperor Gerbilius I
Posts: 6257
Joined: Wed Nov 24, 2004 5:14 am
Location: Dallas, Texas

Re: Project write up: Magic Mirror

Tue Oct 11, 2016 11:22 am

My wife's been wanting a floor length mirror in the bedroom.  Now I'm trying to picture how I can make something like this work wall space wise--the way the windows are in our bedroom makes it a pain to do something floor length 
Ugly people have sex all the time. We wouldn't have 6 and a half billion humans if you had to be beautiful to get laid.
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Thu Oct 13, 2016 9:47 pm

You mean, something like this?

Some of these installations are really slick. Here's a frameless designn that I wish I could do myself. Maybe for my next mirror. Here's the sliding closet door mirror I mentioned earlier.
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Thu Nov 24, 2016 9:49 pm

I went back and addressed some of the lingering hardware tasks today. This is how it looked when I got started:
Image
There is a lot of power cord coiled up in here going from the power brick to the monitor, the HDMI cable is likewise wrapped up and the ribbon cable to the camera is a hot mess. Additionally, the power cord is too short and it shares the notch in the frame with the ribbon cable to the monitor controls.

Alas, my phone didn't take a very good photo of the results. You can see some of the work in this shot of the bottom of the mirror. You can also see the external USB slot that I can use for a keyboard or to relocate the WiFi dongle for better reception if necessary.
Image
What I accomplished:
  • The power cord for the monitor is now just as long as it needs to be.
  • The power cord to the brick is now 15' long
  • The HDMI cable is now under a foot long and not coiled up
  • The monitor ribbon cable now exits via a dedicated slot in the frame
  • A metal bracket keeps the power cord in the notch
  • A layer of electrical tape now covers the monitor brackets (they were slightly visible from the front)
  • The Pi and the power brick are now held in place via hook-and-loop fasteners and not just painter's tape.
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Tue Jan 10, 2017 8:10 am

Magic mirror is magical! The wedding was this past weekend (no, that's not the bride). The mirror was a big hit.

Image
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Mon Apr 24, 2017 8:21 pm

Mark II. This one is going in the office. Probably early next week. It's a bit too long to fit in my car, so I need someone with a truck, station wagon or SUV. The flash on the camera is making the glass look more transparent than it is to the naked eye.

Image
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
Captain Ned
Global Moderator
Posts: 28704
Joined: Wed Jan 16, 2002 7:00 pm
Location: Vermont, USA

Re: Project write up: Magic Mirror

Mon Apr 24, 2017 9:37 pm

So, which one lets me pick Princess Fiona?

[/ducks]
What we have today is way too much pluribus and not enough unum.
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror (image heavy)

Tue May 16, 2017 8:21 pm

Well, this didn't turn out so well. The glass I used for the mirror was leftover from my neighbor's installation of an LED fireplace. To test it, I held my smartphone up against it and the image looked pretty good, so I went ahead and built the mirror in the above picture. Well... when I hung the mirror, the coating on the back of the mirror diffused the image enough that you couldn't read anything through it. So my attempt to speed up things by using what was available had the exact opposite effect. I ordered a proper mirror in the same size, which if I had to do it over again I would have chosen very different dimensions. Namely, something I could fit in my car.

To begin, I had a piece of one way mirror that was 88 3/8" long by 13.5" high. My plan was to mount two monitors behind it and display different information on each. So we start by building a frame to hold a very long piece of glass. I used my router to put a rabbet around the frame to hold the edges of the glass.
Image

Assemble the edges of the frame, holding it together with angle brackets. The plan is to mount the two monitors to the wall and then hang the mirror off of the monitors. A different approach than usual, but I figured the problem of mounting monitors to walls has been solved and I could purchase mounts that could handle two monitors and a heavy mirror (plus frame & trim).
Image

I'll skip the boring parts of staining the frame in case anyone sees it from the side, painting the inside edge black so you won't see it through the glass in the areas the monitor isn't present, etc. Here's the frame with reinforcements attached and weather stripping around the rabbet. This should cushion the glass, plus push it up against the trim pieces. This sandwich design should keep everything rigid.
Image

You saw this earlier. The glass is in place and the trim is installed. My original idea was to wrap the trim with a carbon fiber pattern vinyl sticker. That stuff is harder than it looks and I didn't really get it right. If I had pulled it off, it would have been bad ass. Alas, it looked like an amateur had applied a vinyl sticker to it.
Image

I took down the artwork we had in reception and mounted the backing board and monitor mounts. The board is just a piece of pine with a routed edge design and some stain. I've never mounted anything heavy in an office building. There are no studs to attach anything, just flimsy metal. So you have to use a lot of drywall screws.
Image

The electronics are in place. Two monitors, a power strip, a Raspberry Pi and a Fitlet micro PC.
Image

And finally we hang the mirror over top of the monitors.
Image

You can see the carbon fiber wrap for the trim. And you can also see the blurry image from the monitors. This is unsatisfactory. So... let's order proper one-way glass and while it's being shipped, we can redo the trim as well. This is straight from Home Depot.
Image

Add a little stain and a little polyurethane and it looks much better.
Image

The glass arrived at the office today, so I spent the latter half of a 10 hour day getting a crate up to the 3rd floor office.
Image

Take everything apart. Carefully put the new top & bottom pieces in place and drill holes for the wood screws. Cut side pieces to fit. Carefully drill holes to hold the side pieces in place. Admire your handiwork:
Image

Now I had to take all of the trim off and put the glass in place. I opened the crate and found the glass made the journey intact. Hooray! It also magically shrunk and was half an inch too narrow. So... resize the frame, reinstall the trim, cut the side pieces to their new size, uninstall all the trim, put the glass in place, reinstall the trim and then finally hang that sucker on top of the monitors:
Image

And last but certainly not least... test to make sure it works.
Image
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
ludi
Lord High Gerbil
Posts: 8646
Joined: Fri Jun 21, 2002 10:47 pm
Location: Sunny Colorado front range

Re: Project write up: Magic Mirror

Tue May 16, 2017 11:53 pm

I have a perverse desire to reprogram this mirror with a motion sensor that triggers ghostly apparations to randomly flit through.
Abacus Model 2.5 | Quad-Row FX with 256 Cherry Red Slider Beads | Applewood Frame | Water Cooling by Brita Filtration
 
Drachasor
Gerbil
Posts: 34
Joined: Sat Apr 22, 2006 3:35 pm

Re: Project write up: Magic Mirror

Wed May 17, 2017 1:00 am

This is really cool.

Needs a voice interface and at least a dozen or so things to display, I think. I'm trying to think of some more useful bits to put on the screen.
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Thu May 18, 2017 12:29 pm

It took another day, but I got the 2nd monitor showing what I had intended.
Image
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus
 
Darkmage
Lord High Gerbil
Topic Author
Posts: 8052
Joined: Sat Mar 13, 2004 9:44 am
Location: Hell, Virginia

Re: Project write up: Magic Mirror

Mon May 22, 2017 12:10 am

And with the leftovers, I made one for my house. The learning curve was steep, but I think I can crank these out fairly quickly at this point.
Image
If there is one thing a remote-controlled, silent and unseeable surveillance/killing machine needs, it’s more whimsy. -- Marcus

Who is online

Users browsing this forum: No registered users and 1 guest
GZIP: On