So, here is a prototype-1, made by sacrificing my year-end holidays.
I hope it makes some laughs on its finishing which is comparable to 4th-grade-homework-crafts-thing.
(I admit it's due to 1. my gibberish hands 2. my old Kossel k800 FDM printer. But instead of learning hand crafts and replacing k800 with a new SLA printer, I would try online printing services such as JLCPCB or FusionPCB. HP Jet Fusion 4200 with Nylon PA12? What a tech xxxx.)
Internally this prototype-1 uses the following components:
- 5.9 inch 1920x1080 LCD (Sharp LS059T1SX01) with HDMI driver
- Orange Pi Zero plus 2 (H5)
- 12 bits WS2812B ring
- Simple cuboid frame made with OpenSCAD (.scad and .stl files are available at https://github.com/likeablob/kagedourou/tree/c5b98a41908b3c6a72b444cdd511a78905feda29/structure)
- Some sheets of Washi paper
And here is my work log (for myself);
- Print the parts of the frame, glue them together.
- Make the LCD driver piggy-backed on the LCD with double-sided tape. Solder two wires for powering to the driver board.
- Attach the WS2812 ring on the bottom panel with double-sided tape. (Watch out. It's sticky!)
- Insert the LCD panels into the frame and screw the bottom panel to the frame tightly.
That's it. Then it's time to power the OPi on.
- This time I used Armbian 21.08.1 Focal with Linux 5.10.60-sunxi64: https://www.armbian.com/orange-pi-zero-2-h5/
- Just connect the board to your machine, the board will be detected as a virtual serial device (USB ACM device backed with g_serial).
- `screen /dev/ttyACM0 115200` and then `sudo armbian-config` to get started.
- To bring up X11, just apt get some packages. Here is a snippet based on my macmini project.
$ sudo apt update && apt install -y -q \ chromium-browser \ matchbox-window-manager \ nodm \ xserver-xorg-input-libinput \ xserver-xorg-video-fbdev \ x11-apps \ xinit \ xfonts-base \ xloadimage \ tmux \ x11vnc $ sudo sed -i.orig -e "s/NODM_USER=root/NODM_USER=${USER}/" /etc/default/nodm $ vi ~/.xinitrc #!/usr/bin/env bash xterm -e tmux & matchbox-window-manager -use_titlebar no $ chmod +x .xinitrc
- Install mpv and yt-dlp for streaming YouTube.
# Install yt-dlp with pipx $ sudo apt install -y python3-pip python3-venv mpv $ python3 -m pip install pipx $ echo 'export PATH=$PATH:~/.local/bin' >> .zshrc $ source .zshrc $ pipx install yt-dlp # A workaround for a little bit outdated mpv (v0.32.0-1ubuntu1) $ ln -sf ~/.local/bin/yt-dlp ~/.local/bin/youtube-dl # Bad apple! $ export DISPLAY=:0 $ mpv -fs --panscan=1 www.youtube.com/watch\?v\=on2MUzhuVMw
- To use the WS2812B ring, use the SPI bus and some Python scripts.
# Enable the SPI bus $ sudo vi /boot/armbianEnv.txt ... overlays=gpio-regulator-1.3v spi-spidev usbhost2 usbhost3 param_spidev_spi_bus=1 $ sudo reboot now $ ls /dev/spidev1.0 # Install the required dependencies # You may want to use poetry or pipenv $ sudo apt install python3-dev $ sudo python3 -m pip install spidev $ wget https://raw.githubusercontent.com/likeablob/openvino-opencv-docker/master/demo-face-detection-ws2812/ws2812b.py $ vi test.py # See the following snippet $ sudo python3 test.py
#! /usr/bin/env python3 from ws2812b import WS2812B led = WS2812B(12, spi_bus=(1,0)) led.off() led.show([[250, 250, 200] for _ in range(12)])
Oh, don't forget to wire the ring to the board. WS2812's DIN is connected to OPi's PA15 (SPI1_MOSI).
- Lessons learned;
- The WS2812B ring roughly placed at the bottom of the frame lights the thing perfectly.
- To make it work reliably, I'll need a level shifter. https://hackaday.com/2017/01/20/cheating-at-5v-ws2812-control-to-use-a-3-3v-data-line/?
- Sometimes the LCD comes off from the frame. It would be better to move the screw holes of the bottom panel slightly to the LCD.
- I hope if I could use Markdown in the project log...
- The WS2812B ring roughly placed at the bottom of the frame lights the thing perfectly.
------ cut here ------
To draw a dynamic silhouette onto a surface, the following ways are in my mind;
- A. LCD
- A-1. Full color LCD with backlight
- A-2. Monochrome LCD w/o backlight
- B. Projector
For A: LCD, recently Hi-Res (1080p+) LCDs with HDMI interface boards are available at (relatively) inexpensive prices, mainly for replacement parts for hobbyist-grade SLA printers.
(pros) Does not require an optical system and thus space effective compared to B. Projector.
(cons) It's probably difficult to handle multiple surfaces, especially for a resource-limited SBC. (It's still possible to go with a low-res LCD?)
If we go with a full-color LCD w/ backlight, another light source will be required for non-LCD sides of the lantern.
By using a monochrome, backlight-less LCD, we can unify the light source in the lantern and it save some hassles on tone matching between two different light sources.
Discussions
Become a Hackaday.io Member
Create an account to leave a comment. Already have an account? Log In.