Neopixel LED Mirror (Python, Raspberry Pi, Arduino, 3D Printing, Laser Cutting!) DIY LED Video Wall

Hi I’m Alex and welcome to “Super MakeSomething.

” Today, we’re building a giant Neopixel LEDMirror using a 3D printing, laser cutting, and a Raspberry Pi.

Let’s get started! The Neopixel Mirror is made out of the followingcomponents: 1x Raspberry Pi 3 B+ with an SD card1x Raspberry Pi case 1x Raspberry Pi camera and camera ribbon cable2x M2 screws 6x wood screws1x PCB prototype board with associated wiring 1x 3D printed Raspberry Pi camera mount1x 36 inch by 36 inch wooden backboard 24x Neopixel LED strips with 24 LEDs each576x LED Covers 3D printed out of clear PLA 1x 3D printed camera lens hood16x Lasercut mounting grids 4x Pieces of Vinyl Planking1x 5V 30A power supply And1x PC Power cord I began this project in Solidworks, a computeraided design software package.

I first modeled the unique laser cut mountinggrids that would hold all of the 3D printed LED covers in place.

Like their name suggests, these pieces consistof a piece of wood with square slots that will be cut out using a laser cutter.

The spacing of each of these slots was basedon the LED spacing of the Neopixel strands that I bought for this project, which have30 LEDs per meter.

The mirror has 3 unique mounting grid designs— 1 design for mirror’s outer corners, one design for the remaining border pieces, and one design for the internal sections, which have a cutout that will allow a 3D printedcamera lens hood to slide in between these pieces to keep light from the LEDs from spillinginto the camera’s field of view and blowing out the image.

After I had completely modeled these pieces, I next modeled the LED covers that would mount into each of the slots and diffuse the lightgenerated by each Neopixel.

At this point, I began to create a digitalassembly of the mirror using the parts I designed to make sure that everything would fit togethercorrectly.

I next modeled the backing board that wouldhold everything in place, followed by the mirror’s picture frame border, and finallyinserted digital models of the Raspberry Pi and Raspberry Pi camera, the latter of whichI also used to model the 3D printed camera lens hood and camera mount that would holdthe camera in place on the back board.

After everything looked correct, I saved theLED covers, camera lens hood, and camera mount as an STL or “stereolithography” file, so that I could 3D print these pieces during the next step, and then also saved each ofthe mounting grid designs as a DXF or “Drawing eXchange Format” file so that I could lasercut these designs later.

It was now time to 3D print the LED covers, camera lens hood, and camera mount.

I began by opening up Cura, a free 3D slicer, and importing each of my models.

After verifying that all of my print settingswere correct, I sliced each model, which generated G-Code instructions that would tell my printerhow to print each file.

I then saved the G-Code instructions ontoan SD card, transferred these to my printer, and started the print job.

Because the mirror is made up of a 24×24 gridof LEDs, I needed to print 576 individual LED covers.

In total, this process took nearly 9 straightdays of printing, and consumed almost 3 full rolls of clear PLA.

If you attempt to build this project yourself, be forewarned that both the printing process, as well as the support removal process willtake a while.

Definitely do not attempt to make this projectif you are short on patience or time! While the LED covers printed, I headed tomy basement, where I had set up my brand new K40 laser cutter.

Like the 3D printer, the laser cutter alsoruns off of G-Code, which is streamed from a Raspberry Pi that runs the free “K40 Whisperer”laser cutter software from Scorch Works.

A link to this software can be found in thevideo description below.

To prepare each of the DXF files for “lazing, ”I opened each of the files in Inkscape, and changed all of the line colors to red in orderto let the K40 Whisperer software know that these sections should be cut out.

After this, I resaved everything as an SVGor "Scalable Vector Graphics" file, and imported these files into the K40 Whisperer software.

It was now time to get ready to cut out allof the mounting grids.

A few words of warning — laser cutters areextremely dangerous, are a tremendous fire hazard, and generate a horrible smell as theyare cutting through material.

If you've seen William Osman's "Safety Glassesvs CO2 Laser Glasses" video, you'll know that a laser can do serious damage to your eyesif you don't wear proper eye protection.

If you haven't seen the video, be sure tocheck it out — it's both informative and hilarious.

When operating a laser, be sure to alwayswear proper eye protection, have a fire extinguisher nearby, and properly vent your laser cutter'sexhaust.

With all of the safety precautions in place, I placed a sheet of 3 mm plywood into my laser cutter, adjusted the laser power, and startedcutting.

The laser cutter's stepper motors now beganmoving the laser head across the wood, selectively firing to cut out each of the grid's squares.

After about 3 minutes, the laser had finishedcutting out one the panels, so I removed it from my machine, and repeated this processfor the remaining 15 mounting grids.

After this was done, I took all of the panelsoutside, and painted them with a few layers of black spray paint.

It was now time to make the LED mirror's backboard, which is made from a 3 foot by 3 foot, half inch thick piece of plywood that I had cutat my local hardware store.

I began by marking out the board's centerlines so that I would know where to drill a hole for the Raspberry Pi camera.

I next marked out the locations of holes alongthe edge of the backboard that I would need to drill in order to feed through all of theNeopixel power and signal wires.

Having a t-square definitely helps, as itwill make drawing straight lines and taking accurate measurements over long distancesmuch easier.

I next propped the board onto some weightsto elevate it off the ground, and then drilled quarter inch holes at each of the locationsthat I had marked out in the previous step.

I next laid out all of the grids on the boardto help me align everything correctly, and then marked several key locations on the backboardusing a red sharpie.

Finally, I again used my t-square to drawa straight line through each of the grid rows on the backboard, which would allow me toplace the Neopixel strips into the correct locations during the next step.

This step is important, because it will makesure that each of the LEDs are located in the middle of each LED cover, which allowsthe light to shine through each of the covers evenly.

It was now time to attach the Neopixel stripsto the backboard.

The project uses a total of 576 Neopixel LEDsto create a 24 by 24 grid.

I therefore needed to buy four 5 meter rollsof LEDs, each of which contained 150 LEDs per roll.

After verifying that the spacing I had markedout earlier was correct, I first cut a row containing 24 LEDs from the first roll usinga pair of scissors.

I then peeled off the protective paper toexpose the adhesive on the back of the strand, and the carefully pressed it against the backboard.

I then repeated this step for each of theremaining 23 rows.

The solder pads of the first and last Neopixelin each roll were covered with heat shrink tubing to act as insulation and provide somestrain relief.

Because I would need to daisy chain all ofthese strands together, I removed this tubing by carefully cutting it with an exacto knife.

It was now time to solder the LEDs.

Because there would be a significant voltagedrop if all of the LED rows were powered in series, I first connected the 5V and groundrail of each row in parallel using a set of jumpers.

To make programming easier, I did connectall of the data lines in series, which required me to run the data wire between Neopixel strandsbehind the mirror through each of the wiring holes I had drilled previously.

To do this, I used individual wires from along ribbon cable, since these were both very thin and could be cut to the exact lengththat I needed them to be.

After everything was soldered together, Itaped the data wires to the backboard to get rid of any extra slack, and got ready to powerup the LEDs for the first time.

Because each Neopixel can theoretically draw60mA of current at full brightness, I chose to power the mirror using an external 5V 30Apower supply that I had purchased online.

I began by cutting the end off of a standardpower cable, and used wire stripper to expose the wires in each of the individual cablesin the cord.

I then connected the wires to the power supply'sscrew terminals as shown on screen.

If you end up building this project yourself, please ensure that you are connecting the correct wires to the correct screw terminals! I then connected two jumper wires to the GNDand 5V lines to the power supply's DC output terminals.

To verify that everything was wired correctly, I next used a solderless breadboard to connect the LEDs and an Arduino microcontroller togetheras shown.

The Arduino was previously programmed witha test program to light up each of the individual LEDs.

To learn more about Arduino programming, pleasebe sure to check out my other projects on the "Electronics" playlist linked below.

A link to this Arduino test code can alsobe found in the video description.

It was now time to plug in the power supplyto see if everything worked.

After inserting the power supply's cord intoa surge protector and flicking on the switch, the LEDs slowly lit up indicating that everythingwas programmed correctly! At this point, all of the mirror's parts hadfinished printing, so I began to glue in all of the LED covers into the mounting grid slotsusing superglue.

To do this, I placed four drops of glue intothe corners of each slot, and then gently pressed in each LED cover.

This process can take a while, so be sureto work in a well ventilated area, as the superglue gives off a slight odor that willdefinitely get to you as you are gluing in all 576 covers.

Once all of the covers were glued in place, it was time to attach the assembled grids to the backboard.

For this, I used hot glue, as it is both extremelyviscous and also sets very quickly.

I kept the LEDs on during the gluing process, which would allow me to make sure that everything was aligned correctly.

Comparing the bare LEDs to the other LEDsshows that the printed covers did a great job at diffusing the light, making the imageson the mirror much easier to see.

To make everything look a bit prettier, Inext headed to my garage, where I used a mitre saw to cut 4 pieces of vinyl planking thatI would use for the mirror's frame.

These pieces were designed to look like stainedwood, which saved me an extra paint step during the assembly process.

After all of the framing pieces were cut, I attached some wooden squares that I had left over from cutting out the mounting gridto the back of the vinyl planks.

These squares served as spacers to make surethat the frame would sit at the correct height.

After this, I glued the frame to the backboardusing a bit of wood glue.

The final mechanical assembly step was toattach the Raspberry Pi, camera, and camera lens hood to the backboard.

I began by gluing the lens hood into the sloton the front face of the mirror using a bit of superglue.

While this dried, I attached the RaspberryPi camera module to the 3D printed camera mount using 2 M2 screws.

I next flipped the backboard over again, andused 4 wood screws to attach the camera to the backboard, so that the lens pointed throughthe camera hole and lens hood.

After this, I attached a Raspberry Pi casethat I had bought online directly underneath the camera mount using 2 more wood screws, and then covered these screws with Kapton tape to make sure that the screw heads wouldnot accidentally short out the Pi.

Once the case was attached, I placed the RaspberryPi into the case, and then added the case's top cover for some additional protection, after which I connected the Pi to the camera using the onboard connector and a RaspberryPi camera ribbon cable.

I next connected jumper wires to the RaspberryPi board and then used PCB prototyping board to wire everything together as shown onscreen.

The connections on this board were again coveredwith a bit of Kapton tape, and the PCB was attached to the backboard using more hot glue.

Finally, I used a braided cable sleeve tobundle the power and ground connections coming into the PCB together to keep everything niceand neat, after which I attached these wires to the DC terminals in the power supply tocomplete the mirror assembly! The final step was to program the RaspberryPi.

For this, I first installed the Raspbian operatingsystem on an SD card and set up the Pi to be accessible via remote desktop.

Please check out my "Raspberry Pi Setup +WiFi Remote Desktop Access" video linked below for more details about this process.

Once the Pi was up and running and I had connectedvia remote desktop, I opened up the terminal and typed in sudo raspi-config, which openingup the Raspberry Pi Software Configuration Tool.

There, I proceeded to Raspberry Pi Configurationmenu and ensured that the Camera, SSH, VNC, SPI, I2C, Serial, 1-Wire, and Remote GPIOoptions were all enabled.

At the time of making this video, the RaspberryPi's built-in Broadcom sound chip interferes with the Neopixel library, and causes it towork incorrectly.

To get around this, I next disabled the soundchip through the console terminal by blacklisting the soundcard.

To do this, I first created a new file called"alsa-blacklist.

conf" on the desktop and added to line "blacklist snd_bcm2835" to it.

After this, I again opened up the terminaland entered the command "gksudo, " which opened up a dialog box prompting me to run a program.

With the "As user: root" option selected, I next typed in "pcmanfm, " which brought up a file browser with special edit permissionsof the Raspberry Pi's low-level directories.

In this file browser, I navigated to the "etc/modprobe.

d"folder, and copied the configuration file I had just created into it.

After this, deleted to configuration filefrom my desktop, and rebooted the pi by typing "sudo reboot" into the terminal, which causedthe Raspberry Pi to restart.

During my next login, I then noted that an"X" was present over the volume icon in the Raspberry Pi's taskbar, indicating that thesoundcard had been successfully disabled.

With the soundcard disabled, I next returnedto the terminal to install the required libraries to control Neopixel LEDs from the RaspberryPi through Python.

I did this by typing in the commands shownonscreen and hitting enter.

Finally, I installed the last required softwarepackage, called "picamera, " which allows for individual pixels of incoming Raspberry Picamera images to be accessed and manipulated via Python.

To do this, I typed in the command shown onscreen, which grabbed the Python 3 version of the software package and installed it on my system.

With the install complete, it was finallytime to run the Neopixel mirror's Python code.

A link to this code can be found in the videodescription below, and works as follows: After initializing all of the code's variablesand fixing the camera's parameters, the code grabs a grayscale image, and extracts a 24x24pixel region of interest from it.

At this point, the image is composed of ared, green, and blue, channel, but since the image is grayscale, all of these channelscontain the same information.

Therefore, the code next grabs one of thesechannels, and reshapes the 24×24 pixel array into a 1×576 element vector, where each elementcorresponds to a pixel in the mirror's Neopixel strand.

The code then assigns these values to oneof the color channels in a Neopixel array, displays the image, which causes the Neopixelsto light up, and then clears the camera buffer to get ready to grab the next image.

All of these operations occur in a while loop, which runs indefinitely until the user terminates the script by typing CTRL+C into the Pythonconsole.

To run the code, I opened up a terminal, navigatedto the directory containing the code using the cd command, and then typed sudo python3 neopixelMirror.

py, which is thename of the script that controls the Neopixel LED mirror.

At this point, it was time to place a stickeronto the frame, and head to the Great Lakes Science Center in downtown Cleveland for the2019 Cleveland Maker Faire! There, the mirror ran continuously for nearly10 hours without any hiccups, and delighted everyone that walked past it.

In case you're here because you saw the NeopixelMirror in person at the event, thanks for checking out my channel! If this is your first time here, please considersubscribing to help Super Make Something reach a larger audience! Overall, the event was a huge success andI now have a digital display piece that I can hang in my office or take to future MakerFaires! In addition to showing a livestream of yourreflection, the LED mirror can also be used as a digital billboard to show pictures orother animations.

A link to the code to do all of this can befound in the video description below.

A big thank you to everyone who came out tothe 2019 Cleveland Maker Faire to see this project in person.

If you enjoyed this video and learned somethingnew, please consider giving this video a like, sharing it with your friends, and subscribingto my channel.

Also be sure to hit the bell icon to be notifiedwhen I upload my latest video.

Your support helps Super Make Something reacha larger audience.

In case you're interested in building yourown Neopixel mirror, a bill of materials and a list of all of the tools I used can be foundin the video description below.

Well, that's all there is to this episode! Thanks for watching! Now go Super Make Something.

.

Leave a Reply