The Orange Pi series of machines lets you run a small Linux machine dedicated to a specific task for a very attractive price — less than $20 for setup. Some ideas for using an Orange Pi include adding network connectivity to an older printer, transcoding a USB webcam and sending it over the network, or just connecting some hardware to the 40 pins and being able to interface to chips faster than a microcontroller could.
The Orange Pi One is a credit card sized quad-core ARM machine that sells for about $13, including shipping (Figure 1). You will have to buy a 5-volt wall plug and bring your own micro SD card, but the total cost should still be under $20. Many people are familiar with the popular Raspberry Pi offerings that have brought the cost of ARM machines to below $50. Now, the entry price for a Linux machine with Ethernet and HDMI has dropped to under $20.
A range of Orange Pi machines gives you the option to include WiFi, put some flash storage on board, and pick how much RAM you want, depending on how much you need to spend for the task at hand. In this article, I’ll look at the Orange Pi One, which has a quad core A7 ARM CPU, 512MB of RAM, 100Mbit Ethernet, two USB ports (one On The Go), HDMI output, and a micro SD card slot to boot from. There is also a camera interface on the back of the board and a row of 40 pins (apparently compatible with Raspberry Pi B+) for hardware tinkering. You’ll also find a range of distribution choices for the Orange Pi One, including Fedora, Debian, Ubuntu, Raspian, OpenSUSE, Arch, and Android.
Hardware IO
The Debian 8.1 image I used had Linux kernel version 3.4.39. Without doing anything with modules, I noticed two TWI interfaces at /dev/i2c-0 and /dev/i2c-1 and a SPI at /dev/spidev0.0. There was no GPIO interface in /sys/class by default. It seems there is some sort of mix up in the version strings for the gpio-sunxi kernel module, but after doing modprobe -f gpio-sunxi, I could see a filesystem tree at /sys/class/gpio_sw.
The pin out information shows two 5-volt outputs next to a ground at the end of a single row of pins. The pin next to the 5 volts at the end is a 3.3 volt pin. A little probing with a multimeter revealed a setup with 5 volt outputs on the Orange Pi One on the inner side (not the edge of the board) at the end farthest away from the network connector.
To test GPIO, I hooked up an LED with resistor in series to the ground and the GPIO pin next to the ground. It seems the GPIO pin should be GPIO 14 — or pin 8 using physical numbering. I found this pin to be PA13, and I could turn the LED on and off using the following commands. This supplied power to the GPIO when set to 1, and with the other end of the small circuit attached to ground allowed the LED to glow.
root@OrangePI:~ # echo 1 > /sys/class/gpio_sw/PA13/data
root@OrangePI:~ # echo 0 > /sys/class/gpio_sw/PA13/data
Performance
Because the Orange Pi One uses a micro SD card to boot from storage, performance will depend on the quality of the card you use. I used a cheap card I had lying around; with it, extracting openssl-1.0.1e.tar.gz took about 0.6 seconds. Compiling openSSL took a little more than 6 minutes. The OpenSSL speed benchmark is a single core test, which you should keep in mind if a machine has 4 or 8 cores and another only has one core. It is interesting how well the Orange Pi One keeps up with the Raspberry Pi 2 in the digest and cipher tests (Figures 2 and 3).
Unfortunately, I couldn’t get Octane to run on the Orange Pi One. Both iceweasel version 38.8.0esr-1~deb8u1 and firefox-esr version 45.3.0esr-1~deb8u1 closed part way through the test. I suspect this is due to the machine running low on RAM and electing to kill the browser process.
To test 2D graphics performance, I used version 1.0.1 of the Cairo Performance Demos. The gears test runs three turning gears; chart runs four line graphs; the fish test is a simulated fish tank with many fish swimming around; and gradient is a filled curved edged path that moves around the screen. For comparison, I used a desktop machine running an Intel 2600K CPU with an Nvidia GTX 570 card that drives two screens — one at 2560×1440 and the other at 1080p.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
The memory bandwidth benchmark copies an array of data using different methods and reports how quickly such a copy can be performed for a given size array. Because the test requires me to allocate two arrays in memory of the nominated size, I chose 64MB as the array size in order to fully fit the entire test into the RAM on the Orange Pi One.
Testing this way required a little over 134,217,728 bytes of memory to be allocated by the test. I have included a desktop Core i7 machine for comparison. You can see that the Orange Pi One has a noticeable speed advantage over the Raspberry Pi 2 in all bandwidth tests.
Test |
Orange Pi One (MiB/s) |
Raspberry Pi 2 (MiB/s) |
Intel i7 2600 (MiB/s) |
memcpy |
426.872 |
322.477 |
3031.351 |
dump |
843.550 |
552.171 |
6035.288 |
mcblock |
726.389 |
590.180 |
8347.899 |
As a real world raw CPU test, I downloaded the Linux kernel version linux-4.7.2.tar.xz and uncompressed it. The pbzip2 command will compress data using as many CPU cores as the machine has. I supplied the -9 option to select the best compression during the test. The Intel Core i7 took 12 seconds to complete; this was assisted by the entire archive being in the disk cache. The Orange Pi One took 3 minutes and 45 seconds, with the Raspberry Pi 2 needing 3 minutes and 41 seconds. The micro SD card I used for storage on the Raspberry Pi 2 was much better than what I used for the Orange Pi One, although I think this test is purely CPU bound.
Power
During boot, power usage spiked to about 4 watts, then dropped to a steady 3.3 watts at the text console. Starting an X window server at 1080p moved power to around 3.4 watts at idle. All these readings are with a keyboard, hub, and mouse connected. Building OpenSSL with four jobs ramped power up to 5.4 watts. Running a single openssl speed job consumed 3.9 watts, and running glxgears took around 4.1 watts.
Final Words
You are probably unwilling to spend $50 to set up a printer server, but maybe the $20 price tag of the Orange Pi tips the price to convenience ratio in favor of the latter. Performance is surprisingly good for such a low price point. Cairo graphics performance was around the same as for a Raspberry Pi 2. The memory bandwidth test showed the Orange Pi One to be quite a bit faster than the Raspberry Pi 2. The bzip2 compression was neck and neck.
Additionally, playback from YouTube did not seem to be hardware accelerated. Further investigation is needed to see if this situation can be improved and what video formats can be decoded in hardware on the Orange Pi series.