Flush Wall-Mounted Raspberry Pi Touchscreen

29,199

406

35

Published

Introduction: Flush Wall-Mounted Raspberry Pi Touchscreen

The Raspberry Pi 7" Touchscreen is an amazing, affordable piece of tech. I decided I wanted to mount one to my wall to use for home automation. But none of the DIY mounts I found online dealt with the problem of how to flush mount it with no exposed wires. This project shows you how to do it.

The Pi hanging off the back of the touchscreen is too large to fit into a 2-gang electrical box. And the screen isn't large enough to cover a 3-gang box. Plus, there's the problem of power. To eliminate any visible wires, I wanted to run 120VAC Romex wire inside the wall and into the box, and place a 5V USB transformer there. So the box needed to be partitioned into a high-voltage zone and a low-voltage zone.

My solution is to use a 3-gang, 55 cubic inch remodel box. I 3D-printed a set of partitions to wall off the high voltage and the transformer from the Pi and screen. And I printed a bezel frame that wraps the silver edge of the touchscreen and covers the electrical box completely.

The resulting system is very sleek. It only extends 15mm beyond the sheetrock. All the wiring is inside the wall and inside the box. And if you have cat5 inside your walls, there's space to connect it to the Pi as well.

Step 1: Choose a Power Source

You can bring power to your touchscreen in two ways, and the steps are slightly different each way.

First, you can use Power Over Ethernet (POE). This method is preferred, but only works if you can run cat5 to your electrical box, and can add a POE injector or a POE switch at the other end.

The second option is to tie into the 120VAC power system of your house. You should only choose this option if you're familiar with high voltage household wiring, and can find a way to run Romex to your electrical box from a nearby outlet or switch. Important disclaimer: I can't guarantee that this method is approved by the electrical code; you're on your own to decide if it makes sense in your situation.

From here on out, I'll refer to these as "Option POE" and "Option 120".

Step 2: The Parts You'll Need

Here are the parts you'll need for the project:

All the Sketchup designs and STL files can be found here on Thingiverse. A few notes on the 3D printed parts:

  • The tracks & walls and the faceplate can be printed in any color; they won't be visible. The bezel will be visible, so I recommend printing in black. You'll definitely need to print the bezel and faceplate using full support. But if you print the bezel in the orientation shown, none of the surfaces that touched the support will be exposed.
  • The tracks & walls are not required for Option POE.
  • I recommend using Bezel_v2 and Faceplate_v2, although the photos in this Instructable show some v1 parts.

Step 3: Modify the Adapter Board Slightly, to Fit in a Smaller Space

With this project, every inch counts. The two jumper cables connecting the Pi to the touchscreen adapter board stick out the side about 1/2" from the adapter board, and we need that space back. So you'll have to cut off the jumpers and solder the wires directly onto the board. The other ends, which connect to the Raspberry Pi, don't require any modification. That's good news-- the boards can still be detached from each other if needed.

Step 4: Connect the Bezel to the Pi/Touchscreen Assembly

Cut some thin strips of electrical tape and wrap them around the tabs on the bezel. These will give the system a bit more grip when the tabs slide into the corresponding slots on the faceplate.

Then attach the bezel to the touchscreen using the M3 screws.

Step 5: [Option 120 Only] Glue the Tracks in the Electrical Box

Option 120 Only: These three partitions create a space large enough to house the Romex and USB transformer, physically isolated from the Pi and touchscreen. The partitions are designed to be easily inserted and removed multiple times once the two tracks are glued in place.

Insert partition #1 into the channel that is molded into the box itself. Then add partition #2. Finally, place the tracks on the top and bottom of partition #3 and slide it into place. The tabs on partition #2 should fit into the slots in #1 and #3. Once everything is in place (#1 touching the back of the box; #3 flush with the front of the box, and aligned parallel to the sides), use a pencil to mark the edges of the tracks.

Remove everything, and then glue the tracks back where they were using the lines as a guide. BE SURE to rotate the tracks so the "stop" is toward the rear of the box. This allows partition #3 to slide in and out as needed.

Step 6: Final Assembly (Option POE)

Install the 3-gang box in the wall. Pull the network cable through a port at the far left.

Using the electrical box screws, attach the faceplate to the electrical box.

Attach the POE splitter to the network cable. This gives you an Ethernet cable and a micro USB for power. Unfortunately, the Ethernet coming from the POE splitter I recommend is too stiff to make the sharp turn required to fit into the box. So I made a short extension using a jack, a plug, and 6 inches of cat5. This extender is flexible enough to make the turn.

Attach Ethernet and micro USB to the Raspberry Pi. Gently push all the wires into the box, and connect the bezel to the faceplate by moving it horizontally into place and then pushing down about 4mm vertically.

Connect the other end of your cat5 to a POE source, and the touchscreen should power up. Congratulations!

Step 7: Final Assembly (Option 120)

Obviously... Cut The Power First!

Install the 3-gang box in the wall. Pull the Romex in through a port at the far right. If you're running cat5e for Ethernet, pull that through a port at the far left. Cut the Romex wires as short as you're comfortable with. You want enough length to work with, but as little as possible, since there's not a lot of room in the box to stuff them in.

Cut the C7 extension cord down to about 6". Separate the two wires, strip, and wire them to the Romex using wire nuts. Attach the C7 cord to one side of the USB transformer, and attach the USB cable to the other. Stuff the transformer and wires into the back right corner of the box.

Insert partition #1. Pass the USB cable through the semi-circular cut-out at the back.

Insert the other two partitions carefully. You may need to twist the transformer and cables around a bit to fit in the L-shaped space available. Now all the high-voltage wiring is safely walled off from the area where the Pi will live. Only the USB cable spans the two spaces.

Using the electrical box screws, attach the faceplate to the electrical box.

Finally, coil up the USB cable, attach the Pi to the USB cable, and connect the bezel to the faceplate by moving it horizontally into place and then pushing down about 4mm vertically.

Turn the power back on, and... Congratulations!

Step 8: Final Thoughts

The touchscreen looks really sharp. I'm using it to run HADashboard, which is part of the Home Assistant home automation open source project. Hopefully you can find something fun to run on yours.

I'm not 100% sure the Option 120 installation would pass inspection, but I've done a lot of electrical work that has passed inspection, and fundamentally this feels perfectly safe to me. I'd be interested to hear from anyone who sees any safety issues.

Raspberry Pi Contest 2017

Second Prize in the
Raspberry Pi Contest 2017

Share

    Recommendations

    • Microcontroller Contest

      Microcontroller Contest
    • Woodworking Contest

      Woodworking Contest
    • Make it Move Contest

      Make it Move Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    0

    Does this also work for an EU-based electrical box? If not, can we somehow change the 3D prints?

    35 Comments

    The bezel looks awesome! I'm doing something similar for my house automation project, however, I'm using PoE to USB Adapters, which have enough power to power the Raspberry Pi and Display, then you don't have to mess with high-voltage, and it uses a smaller footprint..

    https://www.amazon.com/gp/product/B019BLMWWW

    So far so good. You can even use them without the ethernet data to power tablets as well.

    7 replies

    Good suggestion. In my case, I didn't have cat5 available at this install location. But for those who do, I think POE is a superior solution. In that case, you can omit the Walls and Tracks part of the project, and just use the Faceframe and Bezel.

    One important note is that the micro USB connect *must* be a right angle connector, or else it won't fit inside the cramped space of the electrical box. The POE adapter you linked to looks like it would work.

    Actually, on closer inspection, it seems that adapter wouldn't work. It supplies 2A at 5V. I observed that if the Pi receives anything less than 2.1 Amps, it shows a low-voltage warning on the screen, and is susceptible to memory corruption. Have you not seen that problem with this adapter?

    Did you ever come up with a solution for this? I noticed the PoE instructions are still listed. Also, as I understand it, there are PoE hats for the Pi but that might cause issues with space limitations and I have doubt about the pi AND the touch screen receiving adequate power. If PoE is not a viable solution, I'll just go with a recessed box with a built in location for a UL tested USB outlet but I'd prefer PoE.

    The PoE solution that I added to the writeup is working very well. At my house, I have one touchscreen using the 120V option, and one using the PoE option. Both have been working perfectly for 2+ months. I recommend PoE whenever possible.

    (You can ignore my comment about 'that adapter wouldn't work'. I bought that adapter, tested it, and that's what I'm using)

    I think generally, for most cases, the RPi's don't use anywhere near 2.1amps, unless you have a lot of things connected. And most LED based backlight LCD panels don't draw a ton of power either. I've not yet had any issues with the PoE adapter in my solutions, even with 10.1" displays.

    Technically, standard PoE is 15.4w @ 48vdc, which is about 3.08amps @ 5vdc, so it's likely the adapters can supply that, just don't list it.

    You could also use (2) adapters with (2) lines. The adapters work just fine not having a network connection in most cases (for most switches).

    Out of curiosity, which 10.1 inch display did you use? All the ones I could run on 12V and the splitters only output at 5V

    I already use a 20 PoE port switch in my design. I have multiple RPIs doing homebrew VAD/STT rather than relying on an Echo or Google speaker. Being able to commonality in data/power for the screen would be ideal. Do you mind if I ask which 10.1 inch screen you used? I've been looking at SunFounder's screen.

    Latest update: I purchased some of the parts suggested below (thanks!) and installed one of my touchscreens using Power Over Ethernet. It works great! I updated the Instructable to show both methods of powering the touchscreen.

    Thanks again for all the comments about wiring and safety. I've updated the Instructable with the latest design, which uses a C7 extension cord. This approach eliminates the need to wire-wrap the prongs of the Apple USB adapter.

    As for the comments about using an electrical box with an embedded, angled location to place a power outlet with USB connectors: I had already looked at those early in the process and I'm afraid they're all much too small. The electronics on the back of the touchscreen require about 2 1/2 spaces of a 3-gang box. This is why my design works so hard to wall off the high-voltage connections in a L-shaped space at the back of the box. Everything could fit in a 4-gang box, but then the bezel would need to be much wider horizontally. I've considered designing and 3D printing an electrical box that meets all the requirements, but that may be a different project altogether.

    And as I said below, Power Over Ethernet could work well given the right adapter. In my case, cat5 wasn't available at my install locations.

    @wkearney99, thanks for all the thoughts. It's actually a really hard problem. The 3-gang box provides enough space for the Pi hanging off the back of the touch screen, but the remaining space (and shape of that space) is not enough for a USB outlet or any other type of outlet.

    I'm going to post an update where I no longer wire-wrap the adapter prongs, and instead use an IEC C7 extension cord (see photos below). There will still be a transformer in the box, but it will be easily detachable without tools, so I don't see how that's any different than plugging a transformer into an outlet inside a recessed box.

    I will update soon and I'll be interested to hear your thoughts on the new version. Thanks for your interest. As you say, it's a tough problem.

    What are the dimensions of your bezel? Because maybe the Datacomm 45-0031-WH might work?

    https://images10.newegg.com/UploadFilesForNewegg/itemintelligence/DataComm/inst_45_0031_41_321400446674910.pdf

    One of those, coupled with an in-outlet USB charger like one of these from Leviton:

    http://www.leviton.com/en/search-results#q=usb%20charger%20devices&t=Products&sort=relevancy&f:@nema=[5-15R]

    And bravo to you for taking the initiative to make this, and the instructable. With maybe a bit of investigating it might be possible to come up with a more code-compliant solution.

    --Bill

    DO NOT DO THIS WITH THE TRANSFORMER! You're asking for a fire hazard by using stranded wire and a loose fit like that!

    If you're powering everything with 5v usb then use one of the MANY UL-tested USB accessory outlets out there. That and Arlington and many others make recessed or angled wall boxes.

    Code is there to help people avoid making deadly mistakes. Both from shock and fire hazards.

    1 reply

    You know that a network cable has 8 wires and only 4 are used? You could use the remaining wires to transfer for example 12 V DC into the box and put a 5V regulator 7805 into the box which regulates them down to 5V. Then you connect the 12V Adapter at the other end of the network cable and there is no high voltage in the box.

    Thanks for the suggestion that an IEC C7 plug might plug directly into the Apple USB adapter, @HockleyDawg. I bought one and it fits! This will eliminate the need to wire wrap the plugs on the adapter. I will update Instructable this weekend. Thanks very much for the great suggestion!

    20180110_211310.jpg20180110_211336.jpg

    Where does the Ethernet cable run to? could you not plug in the power supply there and run a long usb extension cord? There are USB to Ethernet adapters as well, though I dont now the voltage capacities of cat5,6,7 so one would want to check that before going that route.

    this is flipping brilliant. have you condidered hooking the PI up to a power distribution board and then connecting the lights and outlets in the room to it? the only problem i can see with the power distribution board is space. but you could always put it somewhere else and connect it with the ethernet cable.

    good work

    It is illegal to do low voltage fixed wiring if you are not an electrician in Australia. This is because it has potential life threatening consequences. The wiring shown does not meet AS3000 standards.