I’ve update the frame with a Raspberry PI Zero 2 W, and with a better “managment” of the Raspberry PI behind the frame. Jump to the Update to read it.
I’ve always been a fan of e-inkink displays, but honestly, I never figured out a cool or useful way to make the most of them. For my Grafana stats I need a big and colorful screen and an e-ink display with these specs would cost in the 4 zero range, I mean 1200-1300€. So it’s absolutely out of budget. Then I stumbled upon this awesome project on Reddit: Raspberry Pi fractal art frame: raspberry_pi. It’s basically a Python script that imports another cool script, mandelbrot.py, which tosses some random fractals onto an e-inkink display using a Raspberry Pi Zero 1.
As usual, first I show you the photos of the final result and then the details of the process. Here’s a gallery with some different fractals that I saw until now. Just to understand what it can displays.
So, the hardware consists in:
A Raspberry PI Zero with headers (you can use also the Zero 2 of course): 15/20€
A frame, I bought two frame from Amazon Basics at 10€ both (link to Amazon)
Total: few bucks less than 100€ for all, using a 7.5” e-ink display.
It’s very very easy to build the setup: you just need to slide the display inside the frame/passepartout, route externally the cable (it fits), attach the Waveshare display hat to the RPi zero and attach it to frame using you imagination or some cable ties.
Here’s what I’ve done if you look for inspiration:
Updated back Link to read the modification:
Older version without the heatsink:
The ZeroW is attached e hidden behind the frame “stick”, I know that is not the perfect solution eastetically but I found it as the only way to have the RPi mounted lower (to hide the cable) and without the case (for dissipation).
And the final result:
Tip: you can use some plastic feet on the bottom to avoid the frame moves/slides around too easily.
I’ve update the frame with a Raspberry PI Zero 2 W, with a better heatsink and with a better “managment” of the RPi behind the frame.
First of all I had to solder the GPIO headers
Then I used this heatsink (for 12€) and I attached the Raspberry PI to the back of the frame with a bi-adesive tape.
Now the frame is much more clean and well built, the only thing that I should change is the white cable with a black one but since I’m unable to see behind the frame, it sits in front of a wall, this is not very important.
About the software, all the credits go to runezor who created the script to import the Waveshare display “drivers” and render the mandelbroke python script using the drivers.
On his GitHub page runezor/PiArtFrame the instructions are a bit essentials, so I’ll write my installation procedure.
First I downloaded and installed the DietPI OS (my favorite OS for any Raspberry PI, especially for the Zero), then you need to install the waveshare drivers to use the display and remember to activate the SPI interface. Here’s the official manual to do both: 7.5inch e-inkPaper HAT Manual. But -long story short- you just need these commands:
sudo apt install python3-pip sudo apt install python3-pil sudo apt install python3-numpy sudo apt install-RPi.GPIO sudo apt install-spidev
And then for the script:
sudo apt install numpy sudo apt install tqdm
Then you can try if the display is working using the Waveshare demo
If it works, you need to download the
waveshare_epd folder from the repo: e-inkinkPaper/RaspberryPi_JetsonNano/python/lib/ into the PiArtFrame folder
Then you can try to run the PiArtFrame main.py script, it should shows you a render bar progress, and if it works just add a line to crontab to start the script at boot
@reboot bash -c 'cd /root/PiArtFrame && /usr/bin/python3 main.py'
Reboot the Raspberry PI and it’s done.
Consider that the render time of any new fractal is about 5-10minutes, I found it perfect as a refresh time for the artwork. I haven’t looked into the script to see if it can be changed but I think the time is linked to the RPi zero render capability.
Of course if you like a lot one fractal, you can remove the power to the RPi and the e-ink display will continue to shows it.
If you want to investigate more inside what the mandelbrot.py script is and what does, you can read this article: Draw the Mandelbrot Set in Python.
Nothing else then a big thanks again to runezor who made the script!