Manage cookies

We use cookies to improve our services. Read more about how we use cookies and how you can refuse them.

The necessary cookies help to make the website work properly.

Anonymous statistical cookies help to understand how visitors use the website.

  • Product Reviews, Single-board Computers
    6 min | 33809

    #Orange Pi Zero LTS: An 'upgraded' alternative to the old Raspberry Pis

    Product Reviews, Single-board Computers | 6 min | 33809


    The Allwinner H2+, which integrates four ARM-Cortex A7 cores that can clock up to 1.2GHz, is powering the Orange Pi Zero LTS. The tiny board, which measures just 52 x 46 mm, features 802.11 b/g/n Wi-Fi, Ethernet, up to 512 MB of RAM, USB 2.0 Type-A and a microSD card slot. There is also a 26-pin unpopulated GPIO header along with a 13-pin header for a headphone, USB 2.0, TV-out, microphone and IR signals.

    This board is the next generation of the Orange Pi Zero that was first launched in November 2016 for $7 and up. It should solve various issues with the Allwinner XR819 WiFi module that many developers reported. The main modification on revision v1.5 (vs. v1.1 - I did not find the datasheet for v1.4) is the power supply logic to reduce the interferences on the Wi-Fi module.

    orange_pi_lts_image.jpg
    Fig. 1: Orange Pi Zero LTS

    The Orange Pi Zero LTS costs between US$8.49 and US$10.49 depending on the version you buy (256/512MB of RAM) and is available to order on AliExpress (shipping cost about US$4.89).

    In this article, I will install the Armbian Buster OS. Then, using VSC and the Remote-SSH extension, I will install Pip3 to install some Python libraries and finally I will test the performance of the board using my testbench algorithm: N-Queens-Problem written in Python.

    Hardware and Software

    In this article, the following hardware and software will be used:

    The Orange Pi Zero LTS v1.5 specifications are the following:

    Orange Pi Zero LTS v1.5
    CPUSoC – Allwinner H2+ quad-core Cortex A7 processor @1.2 GHz
    GPUMali400MP2 GPU @600 MHz
    Supports OpenGL ES 2.0
    System Memory256 to 512 MB DDR3-1866 SDRAM (Shared with GPU)
    StoragemicroSD card slot
    Connectivity10/100M Ethernet
    802.11 b/g/n WiFi (Allwinner XR819 WiFi module) with u.FL antenna connector and external antenna
    USB1x USB 2.0 host ports
    1x micro USB OTG port
    Expansion headersUnpopulated 26-pin GPIO header mostly compatible with Raspberry Pi (1) header
    13-pin header with headphone, 2x USB 2.0, TV-out, microphone and IR receiver signals
    Debugging3-pin header for serial console
    Misc2x LEDs
    Supported OSAndroid 7.0, OpenWrt, Ubuntu or Debian Desktop/server
    Armbian’s Debian 10 Buster or Ubuntu 18.04 Bionic
    Power Supply5V via micro USB port or optional PoE
    Dimensions - Weight52 x 46 mm - 26 g

    Armbian Buster

    I tested the board using Armbian Buster. I've downloaded the 7-zip zipped image and I used the Startup Disk Creator of Ubuntu to write the image on a Kingstone 16GB SD-card, which is the same SD-card that I used to test the Raspberry Pi performances.

    To use VSC and the Remote-SSH extension, you need first to change the default password (user: root, password: 1234). Use a terminal and connect to the board using SSH (enabled per default). You'll get something like Fig. 2. After changing the password, it is possible to connect to the remote OS using VSC and the Remote-SSH extension.

    Armbian Buster
    Fig. 2: Orange Pi running Armbian Buster: Changing the default password.

    It is possible to monitor the CPU temperature using armbianmonitor -m under Armbian, but I got temperatures between 10.9°C and 14.5°C (Fig. 3), and this didn't sound very good to me. The CPU had definitively a higher temperature!... It should be a wrong thermal calibration. Reading the temperature directly, it also reported some wrong values (see Fig. 4)

    orange_pi_2.png
    Fig. 3: Temperature monitor using armbianmonitor -m... The values are too low!

    orange_pi_3.png
    Fig. 4: Temperature monitor. The values are too low!

    WiFi on Armbian

    To configure the wlan0 interface on Armbian, modify the following file:

    • sudo nano /etc/network/interfaces:

      auto lo
      iface lo inet loopback
      
      auto eth0
      allow-hotplug eth0
      iface eth0 inet dhcp
      
      allow-hotplug wlan0
      iface wlan0 inet manual
      wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
      iface default inet dhcp
    • sudo nano /etc/wpa_supplicant/wpa_supplicant.conf:

      ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
      update_config=1
      
      network={
      ssid=""
      psk=""
      }

    Then, you need to disable the NetworkManager and use iwd:

    apt install iwd
    systemctl disable wpa_supplicant
    echo -e "\n[device]\nwifi.backend=iwd\n" >> /etc/NetworkManager/NetworkManager.conf

    More info: here.

    If you use the standard NetworkManager you are going to get following errors when activating the wlan0 interface:

    root@orangepizero:~# sudo ifconfig wlan0 up
    SIOCSIFFLAGS: Invalid argument
    
    root@orangepizero:~# rfkill list
    0: phy0: Wireless LAN
            Soft blocked: no
            Hard blocked: no
    
    root@orangepizero:~# sudo ip link set wlan0 up
    RTNETLINK answers: Invalid argument
    

    Performance Test

    The N-Queens Problem library needs the tqdm module. And to install that, type the following:

    root@orangepizero:~# sudo apt-get install python3-pip
    root@orangepizero:~# pip3 install tqdm
    # check if all cpu were identified:
    root@orangepizero:~# grep -c ^processor /proc/cpuinfo
    4

    Because the Orange Pi Zero LTS does not have a GPU temperature sensor (or any function that provides that information), I modified the get_gpu_temp(...) function in the temperature.py file as:

    def get_gpu_temp(self):
        #res = os.popen('vcgencmd measure_temp').readline()
        #res = float(res.replace('temp=','').replace('\'C\n',''))
        return self.get_cpu_temp()

    to return the CPU temperature.

    For the test, I used the same heatsink as for the Raspberry Pi:

    E-ink Screen
    • Aluminum Heatsink Kit

    The N-queens-problem benchmark (N=12) was launched and repeated 100 times with multi-thread and single-thread configuration:

    root@orangepizero:~# git clone https://github.com/lemariva/N-Queens-Problem.git
    root@orangepizero:~# cd N-Queens-Problem
    root@orangepizero:~/N-Queens-Problem# python3 queenpool_multithread.py multithread_output.csv 12 4 100
    Calculating loop number 1 (of 100)
    Starting calculation
    
    Elapsed time: 67.737995
    
    There are 14200 solutions for 12 queens.
    1566140517, 12, 4, 14200, 67, 737995, 51.79, 51.79
    
    [...]
    root@orangepizero:~/N-Queens-Problem# python3 queenpool_multithread.py singlethread_output.csv 12 1 100
    Calculating loop number 1 (of 100)
    Starting calculation
    
    Elapsed time: 252.97670
    
    There are 14200 solutions for 12 queens.
    1566148971, 12, 1, 14200, 252, 97670, 27.71, 27.71
    
    [...]

    The N-queens-problem is a well-known problem that consists of placing N chess queens on an N×N chessboard so that no two queens attack each other. In this case, there are 14200 solutions for 12 queens.

    The multi-thread and single-thread performances resulted as described in Fig. 5a and 5b, respectively.

    Multi-thread ConfigurationSingle-thread Configuration
    Fig. 5a: Multi-thread Configuration Fig. 5b: Single-thread Configuration


    The multithread performance of the Orange Pi Zero LTS is comparable to the performance of the Raspberry Pi 3B. In Fig. 5a, as the CPU temperature was under 70°C, the performance was better: It took the Orange Pi Zero LTS less than 67 seconds to solve the N-queens problem. After the 17th iteration, the temperature increased to over 70°C (as I mentioned, the sensor could not be correctly calibrated!) and the CPU performance was affected. Regarding the temperature, it increased slowly compared to the temperature of the Raspberry Pi 3B. The single-thread performance of both boards (OPi and RPi 3B) is also comparable. They needed about 252 seconds to resolve the N-queens problem.

    The folowing table sumarizes the performance of the Orange Pi Zero LTS and compares it with the Raspberry Pi 3B and 3B+ models using Raspbian Stretch.

    oPi

    Zero LTS

    rPi

    Model 3B+

    rPi

    Model 3B

    Avg. Multi-Thread Solving Time69.97 s62.66 s70.85 s
    Multi-Thread Max. Temperature71.75 °C68.78 °C78.69 °C
    Avg. Single-Thread Solving Time251.65 s213.34 s251.30 s
    Single-Thread Max. Temperature31.10 °C54.22 °C52.61 °C


    For the tests, the Orange Pi Zero LTS was running Armbian Buster with kernel 4.19.59-sunxi (TA: 21°C), while the Raspberry Pis run Raspbian Stretch with kernel 4.14.27-v7+ (TA: 19°C).


    The single-thread test was in average 3.65x slower than the multi-thread test (184.60 min vs 50.75 min to solve 45 N-queens problems). However, the temperature remained under 70°C and the system performance was not affected. The max. temperature for the single-thread solution seems too low for me (again, I think it is not calibrated!).

    Conclusions

    With the release of the Raspberry Pi 4, the market has become more difficult for competitors. But in the low-cost segment, it is still worth thinking about alternatives to raspberry. Thus, the Orange Pi Zero LTS is definitely an alternative to the old Raspberry Pi models (older than 3B+). Its price and size make it optimal for small designs. Moreover, it supports more OS than the Raspberry Pi. Its performance is comparable to the Raspberry Pi 3B and positions itself here against the much lower-power, single-core variants of the Raspberry Pi Zero.

    The problems with the temperature that the older versions have seem to be resolved. Unfortunately, the internal temperature measurement is not working properly (from my point of view)! However, I was positively surprised by the board. This was my first Orange Pi and it didn't disapoint me at all, I'm thinking of buying one of its big brother (Orange Pi 3). I will test the performance of Docker running on this system in a next article.


    Comments

    Elmario 12.16.2019

    Hello!

    Where did you get your Zero v1.5? How much was it? On AliExpress I only find 1.4 And what about the WiFi? Have the issues been resoved? I am searching for a cheap device for building an print and scan server and need the WiFi for this.

    Thank you.

    Thor 01.02.2020

    It seems the temperature is correctly reported using 5.3.9-sunxi #19.11.3 SMP Mon Nov 18 18:49:43 CET 2019 armv7l GNU/Linux on my OrangePi Lite LTS.

    Running unprivileged. CPU frequency will not be displayed. Stop monitoring using [ctrl]-[c] Time CPU load %cpu %sys %usr %nice %io %irq CPU C.St.

    22:47:38: --- 0.00 8% 0% 8% 0% 0% 0% 53.4°C 0/4^C

    I have two of these, and one is running PiHole. Excellent little replacement for my old PiHole that was running on a RPI3b.