Battery-Powered Digital Picture Frame Using Pimoroni Inky Frame

by kevinjwalters in Circuits > Art

3967 Views, 25 Favorites, 0 Comments

Battery-Powered Digital Picture Frame Using Pimoroni Inky Frame

inkyframe-65-lenna.jpg
inkyframe-65-ukrainian-eye-pc-crop.jpg
inkiframe-with-3dprintframe-65.jpg
lenna.jpg
ukrainian-eye.jpg

The Pimoroni Inky Frame is a 5.7 inch 600x448 colour E-ink display with a Pi Pico W microcontroller designed for efficient operation on battery power. A real-time clock (RTC) chip enables a low-power deep sleep mode. The device can wake up due to a button press, a timer or an external 3.3v trigger voltage.

This article shows how to use the Inky Frame as a battery-powered, standalone digital picture frame capable of showing thousands of JPEG images from a micro SD card. The software is a simple MicroPython program which cycles through the images on a timer. The Inky Frame's buttons can be used to manually advance through the images.

This article includes a power study of the Inky Frame using a Nordic Power Profiler Kit II to check the deep sleep mode and the power required to update the display with a new image.

The seven colour E-ink display is remarkable but the penalty for multi-pigment particles is a slow update process. The display takes 30 seconds to update which limits the applications the Inky Frame is suitable for.

The Inky Frame with some personalised images makes for a great gift and one that might inspire exploration of Pimoroni's example programs and MicroPython programming.

The images used for this article are:

These are presented as photographs of the Inky Frame alongside the originals.

UPDATE: The Inky Frame now comes in three sizes: 4", 5.7" and 7.3" - see Pimoroni Inky Frame Comparison - 4 Inch Vs 5.7 Inch for more detail on the smaller one.

Supplies

  • Pimoroni Inky Frame - comes with small metal rods to make the Inky Frame stand up on a desk. For battery power it needs either a 3xAA /3xAAA battery pack or LiPo battery (Inky Frame does not have an on-board charger).
  • 3D printer - if you want to make a frame for the Inky Frame (optional).

Installing Pimoroni MicroPython on Inky Frame

inky-frame-back-markedbuttons.jpg

The Pimoroni Getting Started with Inky Frame guide has a full description of how to install MicroPython on the Inky Frame. The abbreviated steps are below.

  1. Plug the Inky Frame into a computer using a (non-charge-only) USB cable.
  2. Hold down the BOOTSEL button on the Pi Pico W board on the reverse side of the Inky Frame and press the Reset button button. An RPI-RP2 drive will appear.
  3. Download the latest uf2 file for the Pimoroni version of MicroPython and copy it onto the RPI-RP2 drive, e.g. pimoroni-picow_inky_frame-v1.19.15-micropython.uf2 - Inky Frame specific versions (1.19.11 onwards) may hide under the Show all N assets link.

The Pimoroni 1.19.6 and 1.19.10 versions were used for this article.

Installing Slide Show Program

thonny-saving-main1.png
thonny-saving-main2.png

If you are not familiar with MicroPython on Pimoroni products then it's worth taking a look at the Pimoroni: Getting Started with Inky Frame guide.

  1. Install the Thonny editor.
  2. Setup Thonny for the Pi Pico W.
  3. Under Tools > Options... menu there is an interpreter tab where MicroPython (Raspberry Pi Pico) needs to be selected. Thonny doesn't distinguish between Pi Pico and Pi Pico W.
  4. Ensure Thonny can connect to the MicroPython interpreter on the Pi Pico W. Clicking on the STOP icon should show the interpreter's REPL mode in the Shell at the bottom.
  5. Download the files from GitHub:
  6. Click on the Download button on sdcard.mpy to download the file to your computer.
  7. Click on the Raw button on sdslideshow.py and use Save as in the browser to download the file to your computer.
  8. In Thonny
  9. on the Raspberry Pi Pico pane, the lower part of the Files pane (this has been hidden for screenshots above), select New directory... to create
  10. an sd directory (mount point for the micro SD card file system) and
  11. a lib directory.
  12. Load sdslideshow.py files into Thonny and use Save as to save it to the Raspberry Pi Pico - the file can be renamed to main.py as part of the Save as operation to make it run when the Pico is turned on. The screenshots above show this selection box and saving that file to the Pi Pico.
  13. Open the lib directory on the Raspberry Pi Pico pane. On the This computer pane above open the directory where sdcard.mpy was downloaded to and right click on that file and select Upload to /lib.
  14. On the tab now titled main.py, press the green start icon to start the program.

The MicroPython interpreter runs the main.py file at start-up. CircuitPython can confuse here as it also looks for code.py.

Another description of how to use Thonny to copy mpy files to the lib directory on a Pi Pico can be found in Adafruit Learn: CircuitPython Libraries on MicroPython using the Raspberry Pi Pico.

The (free to download) book: Get Started with MicroPython on Raspberry Pi Pico may also be of interest.

Preparing Images

gimp-letterboxing-for-43.png
gimp-exporting-jpeg-non-progressive.png
microsdcard-file-list1.png

The MicroPython JPEG library works best with images that match the resolution of the device, 600x448 pixels. The images need to be non-progressive JPEGs.

The screenshots above show a 512x512 image being both cropped and letter-boxed with black borders in GIMP to produce an image with the correct ratio. It's then exported as a non-progressive JPEG file.

Increasing the colour saturation may improve the look of certain images on the Inky Frame - in GIMP this be adjust using Colors > Hue-Saturation.

The images files should be placed in a slides directory on the micro SD card. The order the files are copied into the slides directory determines the order the slide show program shows them in. This is probably not documented behaviour so could change in the future!

An introduction.jpg file in the root (top-level) directory is required for the instructions on the introduction screen.

3D Printing Optional Frame

ingurumframe-inkyframe-printables1.jpg

Ingurum has created an attractive two-part, 3D printed frame with enough space for a flat LiPo battery designed to allow the Inky Frame to be mounted on a wall. This is discussed in Pimoroni Forums: Inky Frame slide show.

Power Profiling Inky Frame I

Nordic Power Profiler Kit II and Pimoroni Inky Frame

The video above shows the Inky Frame connected and being powered by the Nordic Power Profiler II using the battery connector.

  • 00:09 Start of logging, initial current surge as Inky Frame is powered which then falls to 33.94uA, the deep sleep current level.
  • 00:26 Button B pressed waking up Inky Frame, another current surge as Pi Pico W powers up then MicroPython interpreter starts up and runs the slide show program which reads the next file from micro SD card, decodes it and dithers it.
  • 00:31 Start of E-ink display update with average current of approximately 50mA.
  • 01:01 End of E-ink display update.
  • 01:11 Back to deep sleep, 33.91uA.

The voltage is set to 4.5V to match typical output from fairly new alkaline AA batteries. The total charge is logged as 1.74 coulombs. A 2000mAh battery is equivalent to 7200 coloumbs.

Power Profiling Inky Frame II

ppk2-sdslideshow-image-update1.png
ppk2-inkyframe-into-deepsleep1.png

The screenshots above show the data from the previous video:

  • complete period of time where the Pi Pico W is powered and
  • the Inky Frame going back to deep sleep mode where only the RTC chip is left powered.

Some later testing (not shown) proved the Inky Frame works on 3.3V. The total charge was slightly higher for an image update, 2.33C and 2.15C from two updates. The deep sleep current was lower at 24.84uA.

For a fresh set of batteries with a capacity of 2000 mAh (down to 1.1V) and at 2C per image the Inky Frame could show 7200C / 2C = 3600 images on one set of batteries. In continuous deep sleep at 30uA the life time is many years, 2000mAh / 0.030mA / 24 / 365.25 = 7.6 years.

Powerstream have some interesting tests of AA batteries at various (constant) discharge currents.

Notes on the Inky Frame

inkyframe-65-tims-vermeer.jpg
tims-vermeer.jpg

The image above renders well. There's some detail lost in the faces from dithering but the painting looks very convincing. The plastic screen protection has been left on for all of the photographs of the Inky Frame in this article.

Some other aspects of the Inky Frame worth noting are listed below.

  • The viewing angle is very good.
  • The E-ink display is made from thin glass making it fragile.
  • Only certain micro SD cards work. Quoting Pimoroni: "We've found Pico flavoured C++/MicroPython is quite fussy about SD cards so if yours doesn't work, try another or formatting using FAT".
  • There are only seven colours and dithering is used to render full colour images. Some images look better than others, examples are scattered through this article.
  • There is no LiPo charger.
  • The Inky Frame can work from lower voltages. There doesn't appear to be a specified lowest voltage but 3.3V works ok. The Inky Frame has a maximum voltage of 5.5V which means a 4xAA cannot be used with alkaline (1.5V) batteries.
  • Turning on battery power to the Inky Frame does not wake it from deep sleep.
  • The five buttons on the front do not respond to a quick press in deep sleep mode.
  • There isn't much memory left over in MicroPython mainly due to the 107520 bytes required for the screen.
  • The sensitivity of the Pi Pico W's wireless antenna is not as good as many other devices, e.g. a smartphone. If you want to extend the slide show program to download files over Wi-Fi it's worth checking the viability of Wi-Fi first in your chosen location.
  • The Inky Frame display, like its cousin the Inky Impression, works best at room temperature.

Colour Rendering

adafruit-testcard-a-comparison2.png
adafruit-testcard-a-600x448.jpg
inkyframe-65-adafruit-testcard-a-600x448.jpg

This is a basic test card without the refinements of one from a standards organisation like SMPTE. The first image shows the original 600x448 scaled up three times without interpolation and the photograph of the Inky Frame approximately aligned and presented next to two sections of the original. The dithering for the magenta section doesn't work well close-up but is more convincing from a distance. The cyan looks peculiar and is either the result of the absence of suitable particles with useful pigment colours or a bug/deficiency in the dithering algorithm. For the primary colours the red and the green are good, the blue has a purple quality to it.

Image Suitability - Blues

inkyframe-65-midnight-drive.jpg
midnight-drive.jpg

This is a challenging image to reproduce. The Inky Frame blues and purples seem to get a bit lost but the detail is rendered surprisingly well.

Image Suitability - Colour Saturation

inkyframe-65-fighting-temeraire.jpg
fighting-temeraire.jpg
inkyframe-65-fighting-temeraire-sat25.jpg
fighting-temeraire-sat25.jpg
inkyframe-65-fighting-temeraire-sat50.jpg
fighting-temeraire-sat50.jpg

The Fighting Temeraire doesn't look great at low resolution and the Inky Frame's dithering detracts further. Two versions with increased saturation (+25 and +50 in GIMP) to bring out the colours in the sky are shown for comparison.

Image Suitability - Landscapes

inkyframe-65-big-evening-storm-clouds.jpg
big-evening-storm-clouds.jpg

The image on the Inky Frame looks ok but detail is still lost despite the original image not being detailed. There's some very apparent banding in the sky. This is more like a re-interpretation of the original that's interesting in its own right!

Going Further

inkyframe-65-jubilee-maamalade-tea.jpg
jubilee-maamalade-tea.jpg
inkyframe-65-tony-de-peltrie.jpg
tony-de-peltrie.jpg

The ink and watercolour art work and some early computer generated imagery work well on the Inky Frame.

Ideas for areas to explore:

  • Slide show program improvements
  • Make button D show a status page.
  • Use the display to show errors and exceptions where possible.
  • Add an index file to order the images.
  • Support images in sub-directories.
  • Look at using Wi-Fi to download images over the Internet. The code which reads VSYS may need modifying to stop it interfering with Wi-Fi hardware.
  • Check the RTC timer accuracy. It's possible this varies per chip.
  • Check how the current varies for the display refresh and deep sleep mode with voltages between 3.4V and 4.9V. Check to see if it varies with the current image and the new image.
  • Adapt an existing Frame for the Inky Frame. The IKEA RIBBA 23x23cm frame is very close to the Inky Frame size if the mount is used.

Other Inky Frame projects:

Further reading:

Christmas gift ideas: