I have reached the conclusion of the Picasso Challenge and I must say it has be quite a challenge journey!. I enjoyed so much working on this project where I learned tons of new things and it gave me the opportunity to stay in touch with awesome members of the Element14 community. I'd like to take this opportunity to present one more Hologram demo, hope you enjoy it!.
Warning: The following video contains loud sounds
Before heading to the conclusion of the project, I'd like to include a summary of useful resources.
Bill of Materials
Complete list of materials:
Electronics
- 1 x Raspberry Pi 3B+
- 1 x Raspberry Pi Touch Display
- 1 x Camera Module V2
- 5 x WS2812B Addressable RGB LED
- 5 x 0.1µF, 6.3V Ceramic Capacitor, 0603[1608]
- 1 x 0.1" pitch (2.54 mm) Female Header: 1x4-Pin, Straight
- 1 x 0.1" pitch (2.54 mm) Male Header: 1x4-Pin, Straight
- Stranded Wire: Various colors, 26/28 AWG
- Heat-shrink tube
Assembly
- 2 x #2 x 3/8" Slotted Round Head Screws
- 4 x #2 x 1/4" Slotted Round Head Screws (to secure the Camera to the 3D printed frame)
- 6 x #5-40 x 3/8" Socket Head Cap Screws
- 2 x #6-32 x 2" Socket Head Cap Screws
- 4 x M3-0.50 x 4mm Socket Head Cap Screws (to secure the Touchscreen to 3D printed frame)
Other
- Small piece of Acrylic (Plexiglass)
- Methylene chloride (dichloromethane or DCM)
- PLA
- Black paint (Matte finish)
- Hot glue
3D Designs
All technical drawings I've used are available here. All the STL files required have been attached to this blog entry.
3-D Print settings
Settings used for all 3D printed parts:
- Printer: Creality CR-10S
- Material: PLA Blue-denim
- Infill: 15%, triangles
- Adhesion: Brim
- Supports: No
- Layer height: 0.2mm
- Nozzle size: 0.4mm
The entire 3D model can be viewed at Myhub on Autodesk.
Acrylic Pyramid
Three pieces of Acrylic must be cut to build the Plexyglass pyramid -perhaps the most important non-electronics piece of the project. Then such pieces are welded together with Methylene chloride (dichloromethane or DCM)
Technical information
Electronics Assembly
The custom made electronics assembly is fairly simple, diagram below is perhaps the most important resource in this area:
All the custom made electronics designs are attached to this blog entry as well.
Source code
The source code is very extensive as I have explained mainly how to display video with Python and OpenCV -an important piece needed for this project to thrive. Also I have explained in detail how to handle the Addressable RGB LEDs with Python.
In this summary, I'm adding one last piece of code; how I managed to show a fire hologram and enhanced the fire effects with Addressable RGB LEDs all in one script:
#!/usr/bin/env python3 # -*- coding: utf-8 -*- # Displays a video and enhances flames effect with WS2812B Addressable LEDs # # Luis Ortiz - luislab.com # May 19, 2019 import cv2 import board import random import neopixel print("OpenCV", cv2.__version__) # Video winName = "Element14" vidFile = "e14Fire.mp4" vid = cv2.VideoCapture(vidFile) if not vid.isOpened(): print("Error: Could not open ", vidFile) exit() vidFPS = vid.get(cv2.CAP_PROP_FPS) waitPerFrame = int(1000 / vidFPS) # in milliseconds print("fps:", vidFPS) print("Time between frames:", waitPerFrame, "ms") cv2.namedWindow(winName, cv2.WND_PROP_FULLSCREEN) cv2.setWindowProperty(winName, cv2.WND_PROP_FULLSCREEN, cv2.WINDOW_FULLSCREEN) numLEDs = 5 ledStrip = neopixel.NeoPixel(board.D18, numLEDs, brightness=0.015, auto_write=True) R = G = B = 0 try: while True: retVal, frame = vid.read() if retVal: cv2.imshow(winName, frame) #Yellow channels (with slightly random red - Front LEDs) R = G = random.randint(100, 255) B = random.randint(0, 50) ledStrip[2] = (R, int(G * 0.8), B) R = G = random.randint(100, 255) B = random.randint(0, 50) ledStrip[3] = (R, int(G * 0.8), B) R = G = random.randint(100, 255) B = random.randint(0, 50) ledStrip[4] = (R, int(G * 0.8), B) #Pure Yellow channels (top LEDs) R = G = random.randint(150, 255) B = random.randint(0, 20) ledStrip[0] = (R, G, B) R = G = random.randint(150, 255) B = random.randint(0, 20) ledStrip[1] = (R, G, B) else: vid.set(cv2.CAP_PROP_POS_FRAMES, 0) #End of video if cv2.waitKey(waitPerFrame) == 27: # ESC to quit print("Aborted at frame:", vid.get(cv2.CAP_PROP_POS_FRAMES)) break finally: vid.release() cv2.destroyAllWindows() ledStrip.fill((0, 0, 0)) print("Bye!")
In order to keep things simpler I have not included the motion detection.
Blogs in this series
- Hologram Pi-ramid - Intro and initial design
- Hologram Pi-ramid - 3D CAD/CAM design
- Hologram Pi-ramid - 3D printed parts and initial assembly
- Hologram Pi-ramid - Plexiglass Pyramid
- Hologram Pi-ramid - My name is Automan
- Hologram Pi-ramid - PCB Design
- Hologram Pi-ramid - Painting the 3D printed parts
- Hologram Pi-ramid - Electronic Parts
- Hologram Pi-ramid - Displaying Holograms
- Hologram Pi-ramid - Project complete!
If you made it this far, thanks for reading. Your thoughts and comments are always appreciated. A big thanks to Element14 and all the community members who showed up in any way.
Luis
|
Top Comments