Introduction: Hologram Projector With Pi
This was a project created for an Robotics class. It was done following another instructable page https://www.hackster.io/hackerhouse/holographic-au...
It uses a Raspberry Pi, along with a computer, and monitor to create a 3D hologram that projects an image along with a musical playlist.
Step 1: List of Materials Needed.
Here is a list of materials needed, and the PDF's of the 3D printed brackets you will need.
The list of materials are as follows:
- 2 x (0.093 Acrylic sheet 24 x 36)
- 2 x (foam board 12 x 12)
- 1 x (case of #6 x 1 ¼ screws(beveled head))
- 1 x (case of #6 x 1 ¾ screws(beveled head))
- 1 x (3d printed fulcrum (the stl file can be found on the original instructables))
- 4 x (3d printed L-brackets (the stl file can be found on the original instructables))
- 1 x (Plastic sheet cutting knife)
- 1 x (1 x 1 x 8 pieces of wood (we used spruce but it can be anything as long as it's small enough)
- 2 x ( 1x 2 pieces of wood)
- 1 x (24 inch screen (we used a acer k242HL with a dvi to hdmi adapter)
- 1 x ( dvi to hdmi adapter (totally depending if you have hdmi on your monitor)
- 1 x (Raspberry Pi Model B)
- 1 x (laptop able to run visualizer (in the original they didn't specify a minimum requirement))
- 1 x breadboard (most likely from arduino kit
- 4 x buttons ( from kit)
- 4 x 110 ohm resistors
- 6 x female to male connectors (in kit)
- 4 x male to male connectors (in kit)
- Node JS
- Raspbian OS
- Soundcloud Account with Playlist
- Hand Drill
- Saw (mitre or hand)
- Drill bit # 6 or so
- Optional - Clamps for holding the pieces
Step 2: Building the Frame
Start by building the top frame that holds the monitor and will project the image. We used a 24" widescreen monitor. You exact dimensions will depend on the dimensions of the monitor you wish to use.
The frame is simply a rectangle with a lip on the inside to hold the monitor. We used 1.5" x .5" wood for the frame and .75" x .75" for the inner lip.
Once the lengths are cut for your size, use a drill to drill pilot holes to avoid splitting when screwing the pieces together. I recommend attaching each inner lip piece to its corresponding outer frame piece before attaching them all together.
The bottom frame is similar to the top, but without the inner lip. We used the same wood as the outer upper frame. The attach 2 columns to the back of the bottom rectangle to attach the top bracket to. The height will be determined by the size of your monitor, but we used 13" for our 24" monitor.
Step 3: Cutting the Acrylic
Using the clear Acrylic you need to cut 3 pieces to form the frustum that will hold the hologram. This part can be tricky and if you mess it up it is likely you will need another sheet and start over. Using a plastic sheet cutting knife you will score the edges that you wish to cut off. Use a straight edge along the measurements you have made, score the line over and over until it is ready to snap off quite easily.
Step 4: Paint and Assembly
The frame would not look very good if it was just wood, so we used black spray paint to cover everything (except the acrylic of course).
Make sure you are in a well ventilated area to do this.
The back and bottom of the frames need to be covered in order for the projection to work properly. This can be achieved a number of ways. You can use a foam board cut the to the right size and painted as we did, or any other kind of solid sheet that can be made to fir the size you need and attached securely.
Now you are ready to attach the frames together using the 3D printed materials. Each triangle bracket will be used in the corners of the top and bottom frame to attach to the vertical columns that are attached to the bottom frame. These will provide the strength it needs to hold the monitor. The frustum joint is attached in the center of the top frame where the acrylic sheets will slide into place to make the half pyramid. These are all attached using the screws in the materials list, and we recommend drilling pilot holes first to avoid splitting the wood.
Once the frames are screwed together with the brackets and the acrylic set in place you are ready to program the raspberry Pi.
Step 5: Running the Code and Making It Work
Making the app and hologram show up:
- Now we need to take our laptop and install node.js, you can find it here, https://nodejs.org/en/
- After its installed, go to the original instructables and download the code package from zip file or github clone.
- You can get all the node modules and install them with the command “NPM Install” or “sudo npm install”
- Then you can start the visualizer with npm start, test it out and see it pop up, there should be default songs on it.
- You then will need to create a soundcloud playlist to put in your own music, create an account here and add your own music, https://soundcloud.com/
- After that you will need to change the playlist in renderer.js you will see a section with const playlist = ‘path/to/playlist’ change the ‘path/to/playlist’ part to your playlist you only need to grab the end section so it should be like this, user-496629426/sets/robotics-playlist
- You should now have the fully running visualizer with your music playing in the background
Setting up the Raspberry Pi to change visualizer and music:
- First off you will need to git clone or get the swipe-controller.py file onto the raspberry pi, up to you how you would like to do that (*note, the raspberry pi can only handle a certain amount of power for a USB connection)
- After getting the file onto the raspberry pi you will need to change the HOST_IP section to the IP of the computer running the visualizer. The section should look like ‘http://:3000’. You will change the section to the IP from the visualizer computer. (Note* the raspberry pi and the host ip need to be on the same network for this to work)
- After that is done you can run controller with ‘python swipe-controller.py’ I would recommend changing the name to be more aligned with what your using to control the changes (e.g. button-controller.py)
- You will just need to setup the breadboard and pi with the buttons now and that can be found in the schematics section.
As you can see from the schematic or the pictures you will need to choose your GPIO’s on your raspberry pi and make the connections.
Or you can use the schematic attached (Note* The layout of the buttons is irrelevant to doing the actions, we merely put them in that formation because it was easier to know which is doing what)
After that is done boot up the program swipe-controller.py (or whatever you named it) using Python “name of file”.py it should run without any errors.