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.

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: 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

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    44 Discussions


    6 months ago

    peter_3d - Did you add an ambient light sensor or anythign to this so it doesn't blind you at night?
    I am going to add that and then was considering adding an auto off and a motion sensor for auto on.. Has anyone done anything like that?

    3 replies

    Reply 5 months ago

    I plan to either use a motion sensor or run a script on my home automation platform (Hubitat) to turn on/off the screen of the RPI.
    Motion sensor might be easier but most of the DIY motion sensors are an eye-sore. Did you find anything that looks nice? And where will we put it?


    Reply 6 months ago

    I haven't done anything like that, and don't know of anyone else who has. Sounds like a good idea, though.


    1 year ago

    Hi peter_3d,

    very cool work! Looks awesome with your clear and minimal colored HADashboard skin. Is it possible to share your skin files for HADashboard (.css and .yaml)? Would be great :)

    1 reply

    Reply 6 months ago

    2nd that notion!
    I like the look of that HADashboard skin.



    1 year ago

    I am not an electrician and I hate to be that guy, but I am 99.999% sure this isn't code or really all that "safe" and would not pass any inspection at all. Gadget transformers are not supposed to be buried in the wall or connected directly to with live wires like this. (electrical tape)

    Any number of things can happen.

    You can purchase recessed electrical boxes, some are just deeper, some are deeper and at an angle that can hold the plug behind the screen or you can use an outlet in conjunction that has a USB power port. Other people have also suggested POE. Any other method seems better for the average person trying to do something like this.

    I don't mean to be a downer but a lot of instructables do not consider or discuss safety, they just list what works for them and leave everyone believing it's ok. It's on instructables so it must be ok.. but it's not.

    4 replies

    Reply 9 months ago

    I logged in just to say what @gormly did.
    In ADDITION: get rid of the dividers. It's clever and considerate of the separation, but won't pass any electrical code.

    Once you have recessed boxes, you 'll be good. IF you find you need to "cut" into a faceplate -- just don't. Or worst case, install a low-voltage rated box for that (at least that way the 120V boxes have intact faceplates).

    Another option is larger "between the studs" general purpose boxes. Home networking folks use these. These are often designed with fire blocks at the top. Put anything you want in it basically. Or, put some slats between the studs, and drywall a recessed area (but there's code for that too, lol)

    In case anyone doubts: The 3D plastic isn't UL tested, and isn't rated for "in wall" use. Same with the transformer. I know some readers will shrug off the fire concern (their castle), but there's also 1st responders to consider, or lastly that also note insurance company MAY refuse to honor claims that had code violations.


    Reply 1 year ago

    Thanks for your comment, and no worry about being a downer-- I asked for the feedback.

    I looked at the option you mentioned of using a recessed electrical box, and couldn't get it to work from a pure space-management perspective. And ultimately, I concluded this is no different. In either case, you have a transformer inside an electrical box, accessible simply by removing the touchscreen.

    I agree with your point that wiring directly to the transformer doesn't feel quite right. However one nice feature of the Apple transformer is that the plug is detachable from the transformer. So even though the plug is hard-wired, the transformer is safely removable without tools.

    POE seems like a good option if you have the cat5 available.

    Also, one person mentioned using the IEC C7 plug. I've ordered one and will report back on whether it in fact fits with the Apple transformer.


    Reply 1 year ago

    The space issue you have is due to the transformer. But is it truly needed?

    I do not know anything about the power requirements of your screen/PI but is seems like just standard 5V? If that is the case and that's all you need, a recessed box with a USB port potentially solves any safety/wiring issues.

    Maybe I am not seeing it (could be) but it seems like the transformer is not actually needed and just being used because you have it?

    Anyway, just trying to help, good on you for not getting mad at me :)


    Question 1 year ago

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

    1 answer

    Answer 1 year ago

    US electrical boxes are larger than the EU mainland boxes. Germany probably has the smallest one. Albeit, you can get some boxes which make use behind the wall if you have a hollow wall. I.e. use 2 of these https://www.kabelscheune.de/Hohlwanddosen-Trockenb... side by side gives you the isolation High Voltage/ Low voltage, good wiring space and still only a small footprint is visible.

    As far as I know only Italy has somewhat similar boxes to the US (but they are using them horizontal rather than vertical). You probably can get these too. But screw fixing distance is different to the US style.
    I do not know the size of the panel, but I could imagine this box here could work well and provide plenty of space. Height is even adjustable :-). Low voltage side needs to be isolated so, but it seems to have some inserts, but it is now shown what type...


    1 year ago

    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..


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

    6 replies

    Reply 1 year ago

    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.


    Reply 1 year ago

    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?


    Reply 1 year ago

    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.


    Reply 1 year ago

    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)


    Reply 1 year ago

    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).


    Reply 1 year ago

    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