Orange Pi Zero2 & 5" Winstar TFT

$60 touchscreen gadget

research | 2023-06-20
At home

While some single-board-computers are not necessarily the fastest, when the goal is to display a graphical user interface on a (touch)screen for some sort of embedded device you do not need a strong or expensive SBC. Especially nowadays, when decent hardware can be bought for very little money.

We were impressed with the Orange Pi Zero series of boards as they go for around $15. This gets you a Cortex A53 with a Mali GPU - more than capable for a wide variety of tasks. For example, when combined with a touchscreen you can build a cool gadget for around $60 total. And before the reader wonders: this article is not sponsored by Orange Pi. Rather we were genuinely impressed with the value proposition and proceeded to review their capabilities.

line-up

Orange Pi Zero 2W 1GB - $15
link
Orange Pi Zero2 1GB - $25
link
Orange Pi Zero3 1GB - $18
link

The above boards are the same in performance but differ in I/O or form-factor. The Zero3 is a minor update with a larger (1MB) L2 cache. We have the 2W variant on the way, currently being shipped to us. This article covers the Zero2 which 2 years ago we purchased for $15.

Specifications
Name Orange Pi Zero2
SoC Allwinner H616
CPU Cortex A53
GPU Mali G31 MP2
Memory 512MB/1GB DDR3 (Shared with GPU)
Ports 1Gbps ethernet, mHDMI (4K@60fps), 3.5mm audio, USB 2.0
Capabilities

The above specs are enough to display a modern GUI application, but we'll need to pick the right software stack if we want it to perform well. For example, applications made with Electron (e.g: Slack, Discord, Teams) are not a good fit as that framework is known for being a resource hog that requires fast hardware.

This goes for any type of HTML renderer. Although feasible (Cortex A53 is capable) - it would not yield the best performance and introduces additional requirements, like increased RAM usage or the need for an X11 server (desktop environment).

QtQuick

QtQuick, part of the Qt framework, provides the ability to create user-interfaces without using C++. Places where one can find QtQuick include: coffee machines, ticket machines, medical devices, infotainment systems, speedometers, and even full-fledged desktop applications (Blizzard's Battle.net). It is designed for use inside embedded systems, resulting in low minimum CPU and GPU requirements. This makes it a good fit for our device.

Note that QtQuick still requires us to code business logic in C++. QtQuick should only be used as the presentation layer. I included this gotcha for those unfamiliar with Qt that were perhaps under the impression that C++ could be avoided.

Something fancy rendered with QtQuick

5" Winstar TFT

When looking for a display, we prefer anti-glare (matte) surfaces to avoid reflections as they affect color representation, brightness, and in general constantly seeing the surrounding environment is not great. Most displays you'll come across are in fact glossy, so we'll need to pay some attention.

We found the WF50BTIFGDHTX that has a bright backlight, wide-viewing angles, and a matte surface.

Name WF50BTIFGDHTX
Resolution 800x480
Color depth 16.7M
Touch Resistive
Video input HDMI
Price $40 - $45

Weather application

We hacked together a silly weather application in a weekend (source).

We ported it to Maemo Leste - a linux operating system for Motorola Droid 4 and Nokia n900 phones.

When we run this on the Zero2, we can observe:

  • Fast application startup time
  • Smooth animations (25fps)
  • Good color representation (24bit)
  • Good touchscreen registration

We start our application on system boot via a systemd service. Note QT_QPA_PLATFORM=linuxfb - this allows Qt to run a graphical application without needing a desktop environment. We also use systemctl mask getty@tty1.service to disable tty1.

performance

It only uses 60M of memory.

 Private  +   Shared  =  RAM used   Program

 55.8 MiB +   2.0 MiB =  57.8 MiB   weather
---------------------------------
                         57.8 MiB

In addition, the CPUs are not doing much.

A lot of resources left for a bigger application.

Conclusion

Our weather display makes for a rudimentary living-room gadget, but can also be used in business products:

  • in-store PoS system (with a bigger display)
  • in-store advertising (with a bigger display)
  • smart home control (Home Assistant)
  • server monitoring statistics
  • stock price ticker display
  • notifications display
  • sales dashboard

The goal of this article was to demonstrate we do not need expensive hardware to create cool products.

Given the multipurpose nature of this hardware we have a small stock of them at the office.