Posts Tagged ‘power’

Power Consumption of Amlogic S812 and Rockchip RK3288 TV Boxes

February 17th, 2015 6 comments

The recent post comparing the power consumption of ODROID-C1 vs Raspberry Pi boards, as made me want to give another try at power consumption measurements. Regular reader already know I made a power measurement board and cables capable of hading different connectors (micro USB, mini USB, power barrels,  etc..), but eventually it failed to deliver enough current to the boards for any meaning testing. But since I now have a better power supply, and multi-meter, it was worth another try, especially since I could draw some pretty charts.

I decided to test the three most popular Chinese SoCs for mini PCs namely Amlogic S812 (4x Cortex A9), Rockchip RK3288 (4x Cortex A17), and Allwinner A80 (4x Cortex A15 + 4x Cortex A7) using respectively Eny M8S, Open Hour Chameleon, and A80 OptimusBoard. If you are paying attention, you must have noticed Allwinner A80 is not part of the title, that because the board got stuck in the animation logo drawing 1.1 to 1.3 A forever, so I don’t have any results to share for that platforms. Neverthess I still have some interesting charts for the two other platforms, but before sharing the results, let’s go through my setup and some of the issues I encountered.

Power Measurement Testbed

That’s what my setup looks like.

Testbed to Measure Current (Click to Enlarge)

Testbed to Measure Current (Click to Enlarge)

From left to right:

  1. 5V/8A – 12V5A Switch mode power supply (SMPS)
  2. DIY power measurement board and multimeter test leads
  3. Device under test, in this case Open Hour Chameleon
  4. UNI-T UT61E digital multi-meter
  5. Windows XP netbook with UT61E Interface Software and a USB to RS-232 dongle

Initially, I wanted to use Sigrok in Ubuntu 14.04, as it’s more convenient for me simply because I use Ubuntu on my main computer, but unfortunately there are some compatibility issues with my USB to RS232 dongle leading to the error message:

sr: es51922: Invalid function byte

I bought another different looking one on Ebay, but unfortunately it came with the exact same PID and VID, leading to the same issues, and it did not even work with the multimeter in Windows… So I had to fall back to using Windows.

The first time I had the exact same problem as with my $7 multimeter with the device rebooting as soon as 400 mA was reached. The critical issue when measuring current is the impedance of the equipment of the multimeter itself, and any board or cable used for testing. Since the multimeter is in series, even adding 1 Ohm would lead to a voltage drop of 1V at 1 ampere (ohm’s law U=RxI). The multimeter itself will make the voltage drop a bit, as I understand it measures the current using a low impedance resistor, but first I checked my cables.

  • Test lead pair #1 – ~0.15 to 0.30 Ohm but measurement fluctuates a lot even to pretty high values (That’s the pair included with UNI-T UT61E DMM)
  • Test lead pair #2 – ~0.13 to 0.15 Ohm
  • Crocodile clip cables – 0.90 Ohm

At first, I thought it would be a good idea to connect the test leads to the measurement board via crocodile clip in order to get a good connection. But I  measure the impedance of two such cables in series to be 1.80 Ohm, and shorting the measurement board with two of these, could not boot the board at all due to voltage drop (1.8 * 0.4 = 0.72V).

So I got rid of those, connecting the test leads (pair #2) directly to the measurement board, and it went better, but I noticed the screen would turn off from time to time. I also decided to calibrate my SMPS to 5V (it was 5.25), and the symptoms became more frequent, so I measured the voltage right after UNI-T multimeter with my older multimeter, and noticed voltage drops of up to 0.5V at times due to the impedance introduced by the DMM and cables, which led to reboots. So I turned the voltage adjustment screw on the power supply to output 5.4V, which should be safe enough, and everything worked much better, at least with the Amlogic S812 device.

The test procedure goes as follows:

  • Power the board, and wait for boot to complete
  • Run Antutu benchmark
  • Connect an external hard drive via a USB port
  • Run XBMC/Kodi/SPMC and play a 4K H.264 videos (Chimei video).
  • Go to standby

I gather the data with the windows software, and load the results into LibreOffice Calc to generate the power consumption charts with sample numbers on the X axis, and the values in Amperes on the Y-Axis. 2 samples are taken every second, so a 900 sample test duration is 450 seconds (7 minutes 30 seconds).

Eny M8S (Amlogic S812) Power Measurement

Eny M8S Power Consumption Chart (Click to Enlarge)

Eny M8S Power Consumption Chart (Click to Enlarge)
Vertical Axis: Amps; Horizontal Axis: Sample number (every 0.5 second)

The fully test went very smooth on the Amlogic platform, as I never had the screen turn off during testing. The part of Antutu that consumes the most is the 3D GPU benchmark at around 1.4A. We can see a jump of 0.5A when inserting the hard drive. XBMC consumes some power even in the UI, because it’s always refreshing the display, so the power consumption is somewhat similar to the 2D GPU benchmark in Antutu. Playing a 4K video consumes a little over 1A, and it’s normally not to demanding as it’s mostly handled by hardware. Standby mode power consumption is pretty high at about 500 mA with the hard drive connected, and still powered on in this mode.

Open Hour Chameleon (Rockchip RK3288) Power Measurement

Open Hour Chameleon Power Consumption Chart (Click to Enlarge)

Open Hour Chameleon Power Consumption Chart (Click to Enlarge)
Vertical Axis: Amps; Horizontal Axis: Sample number (every 0.5 second)

I had a few more problems with Open Hour Chameleon, as the HDMI signal would turn off from time to time including during multi-threaded floating point benchmark, 3D GPU benchmark, and playing a 4K video. At the end of the video playback, I completely lost video output, and even after removing the hard drive I could not access the UI, so I just press the power button on the remote and it went into standby. The value on the chart above is about 350 mA, but had I waited a few more seconds before stopping measurements it would have dropped to 100 mA.

3D GPU is not the most power hungry task on Rockchip RK3288, as the crown goes to multi-threaded floating-point benchmark consuming close to 2A. I did not play the 4K video from the hard drive, because the screen would go black so often, so instead  I played it from the network (SAMBA share), which should explain why the power consumption of this part is lower on RK3288 than on S812. Mali-T764 GPU power consumption in RK3288 also seems a bit lower compared to the one of Mali-450MP6 GPU found in Amlogic S812.

The “cut-off” current (where I lose video output) on RK3288 seemed to be around 1.3A, while I had no problem even at 1.4A on M8S, which must be because boards are different tolerances with regards to the minimum input voltage.

Since I did not play the video from the hard drive, the test are not really identical for both platforms, but for reference the average amperage on Open Hour Chameleon was 880 mA, while M8S averaged 811 mA.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Raspberry Pi, Banana Pi, and ODROID-C1 Boards Power Consumption

February 12th, 2015 9 comments

Mikronauts has recently reviewed MIPS Creator CI20, ODROID-C1, and Raspberry Pi 2 Model B. R-PI 2 review is especially interesting since this is the last one, and the reviewer goes to compare all Raspberry Pi models (A, A+, B, B+ and 2 B) with Banana Pi, Banana Pro, MIPS Creator CI20, and ODROID-C1 development boards. The benchmark results are good to know, and expected with ODROID-C1 the fastest of the bunch both in terms of CPU and storage performance, but here I’ll just share the results of his power consumptions testing.

Raspberry_PI_ODroid_Banana_Power_ConsumptionSince all platforms are powered by a 5V power supply, I’ve converted the results into watts.

Model Max (W) Avg (W) Off (W)
A 1.07 0.80 0.15
A+ 0.76 0.48 0.125
B 2.45** 2.12 0.62
B+ 1.20 1.15 0.35
2 B 2.25 1.55 0.325
Banana Pi 2 1.25 0
Banana Pro 2.3 1.62 0
Odroid-C1 2.3 1.62 0.735*

* Connecting an ON/OFF switch to ODROID C1’s power header will allow for turning off the board completely (0W).
** Updated with correct value

For battery powered applications, Raspberry Pi A+ is clearly the best choice out of the list, ODROID-C1 and Raspberry Pi 2 Model B+ have quite similar power consumption values with a slight advantage to the latest Raspberry Pi model, except for soft power off where ODROID-C1 power consumption is about double.

The downside of these measurements is that there’s no indication of the program(s) running during measurements. He only shared the following chart for the Raspberry Pi 2 Model B, which made me assume the measurements are made when the board is idled, and after power off.

Raspberry_PI_2_Power_ConsumptionHowever, looking at ODROID-C1 measurements,  the chart looks a bit different with a spike, and the measurement duration is also longer (130 seconds vs 100 seconds), but this should not affect the conclusion that much.

ODROID-C1_Power_ConsumptionThe procedure is also clearly explained with “the chart showing ODROID-C1 powering up, waiting a few seconds, opening the web browser, waiting a few seconds, and shutting down the desktop”.

Thanks to José for the links.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Linaro Connect Hong Kong 2015 Schedule and Demos

January 27th, 2015 2 comments

Linaro Connect Hong Kong 2015 will take place on February 9 – 13,2015 in Hong Kong, and the organization has released the schedule for the five days events with keynotes, sessions, and demos.

Linaro_Connect_Hong_Kong_2015Each day will start with the keynote including speakers such as:

  • George Grey, Linaro CEO, who will welcome attendees to Linaro Connect, and provide an update on the latest Linaro developments
  • Jon Masters, Chief ARM Architect, Redhat, who will present Red Hat update and latest ARMv8-A demonstrations
  • Dejan Milojicic, Senior Researcher & Manager, HP Labs
  • Bob Monkman, Enterprise Segment Marketing Manager, ARM, will discuss about  the impact of ARM in next generation cloud and communication network infrastructure
  • Greg Kroah-Hartman, Linux Foundation Fellow, will introduce the Greybus Project (Linux for Project Ara modular phones)
  • Warren Rehman,  Android Partner Engineering Manager, Google

The agenda also features sessions covering Android, ARMv8-A, Automation & Validation, Digital Home, Enterprise Servers, LAVA, Linux Kernel, Networking, Power Management, Security, Toolchain, Virtualization and multiple training sessions. I’ve gone through the full schedule to make my own virtual list of sessions.

Monday 9th

  • 14:00 – 14:50 – maddog: ARMv8 Optimization (No abstract)
  • 15:00 – 15:50 – ACPI Power Management on ARM64 Servers (No abstract)
  • 16:10 – 17:00 – Standardizing Linux Kernel Power Management on ARM 32/64-bit

The 32-bit ARM kernel supports a wide variety of processors harking back to ARM v4 architecture up to the latest v7 SMP processors. This huge legacy forced kernel developers to adapt the power management code for the newest processors (eg v7 multi-cluster systems) to an infrastructure that was developed to support simpler uniprocessor (UP) ARM architectures, resulting in code fragmentation and lack of unified drivers.

The brand new ARMv8 architecture provides kernel developers a clean slate to start developing new code, a nice opportunity to learn lessons from the past and bring about a kernel power management (PM) subsystem completely generic and up to the latest standards. This talk will provide details of the undergoing effort carried out at ARM to develop a kernel PM framework for ARM v8 systems, with kernel design details of the respective DT and ACPI implementations.

Tuesday 10th

  • 10:10 – 11:00 – UMEQ (User Mode Emulation Quest)

UMEQ (user-mode emulation quest) and has been developed to eliminate the functional deficiencies of qemu in user mode (multi-threaded applications, signal handling, etc). Umeq primarily targets ARM 64-bit. The presentation will focus on the architecture principles of umeq and on its implementation.

  • 11:15 – 12:05 – Solving the year 2038 problem in Linux

The concept of ‘time’ in Linux is encoded in many different ways, but the most common one is based on the ‘time_t’ type that counts the number of seconds that have passed since Jan 1, 1970. This type is currently defined as ‘long’, which on 32-bit systems is a signed 32-bit number that will overflow on Jan 19 2038 and likely cause all systems existing today to stop working.

In our presentation, we give an introduction to range of problems that we see across user space and kernel, and we talk about the work that we are doing to address some of these issues.

  • 12:10 – 13:00 – Browser Testing Framework for LHG

The purpose of this talk is to provide the audience with an introduction to the testing framework used in Web browser performance testing as implemented by LHG (Linaro Home Group). The browser test suite is used to compare browser performance and compliance by using a series of benchmarks in key test categories. Sample browser results for both Android and RDK will be presented.

  • 14:00 – 14:50 – Training 1 – FOSS
  • 15:00 – 15:50 – Training 2 – Upstreaming 101
  • 16:10 – 17:00 – Training 3 – Upstreaming 200

Wednesday 11th

  • 10:10 – 11:00 – Art’s Quick Compiler: An unofficial overview

One of the important technical novelties introduced with the recent release of Android Lollipop is the replacement of Dalvik, the VM which was used to execute the bytecode produced from Java apps, with ART, a new Android Run-Time. One interesting aspect in this upgrade is that the use of Just-In-Time compilation was abandoned in favour of Ahead-Of-Time compilation. This delivers better performance, also leaving a good margin for future improvements. ART was designed to support multiple compilers. The compiler that shipped with Android Lollipop is called the “Quick Compiler”. This is simple, fast, and is derived from Dalvik’s JIT compiler. In 2014 our team at ARM worked in collaboration with Google to extend ART and its Quick Compiler to add support for 64-bit and for the A64 instruction set. These efforts culminated with the recent release of the Nexus 9 tablet, the first 64-bit Android product to hit the market. Despite Google’s intention of replacing the Quick Compiler with the so-called “Optimizing Compiler”, the job for the the Quick Compiler is not yet over. Indeed, the Quick Compiler will remain the only usable compiler in Android Lollipop. Therefore, all competing parties in the Android ecosystem have a huge interest in investigating and improving this component, which will very likely be one of the battlegrounds in the Android benchmark wars of 2015. This talk aims to give an unofficial overview of ART’s Quick compiler. It will first focus on the internal organisation of the compiler, adopting the point of view of a developer who is interested in understanding its limitations and strengths. The talk will then move to exploring the output produced by the compiler, discussing possible strategies for improving the generated code, while keeping in mind that this component may have a limited life-span, and that any long-term work would be better directed towards the Optimizing Compiler.

  • 11:15 – 12:05 – Secure Media using DMA-buf

Secure data path for media streams involve lots of differents software and hardware elements and is very complexe. The goal of this talk is to expose an hardware independent proposition using open-TEE and dmabuf. Feedback from all SoC experts is more than welcome.

  • 12:10 –  13:00 – OP-TEE for Beginners and Porting Review

Explains the building blocks involved in Security including TrustZone, OP-TEE, Trusted Firmware etc. Goes into detail on how Secure Boot Works.. and Why. Explains how a simple secure Trusted Application interacts with OP-TEE and works. Brief overview on how to port OP-TEE to an ARM platform. Opens discussions for Potential Challenges and Hardware limitations and how they can be overcome.

  • 14:00 – 18:00 – Hacking sessions or training (no description provided)

Thursday 12th

  • 10:10 – 11:00 – Chromium Blink on Wayland with HW accelerated video playback using Gstreamer

Linaro and STM implemented an integration layer between Chromium and Wayland/Gstreamer. The solution allows HW accelerated video playback, high performance GPU accelerated HTML5 rendering. The approach uses hole punching mechanism to compose the UI layer on the top of the video content. The Gstreamer Chromium plugin is implemented trough the Pepper API. The presentation will provide implementation details on the Wayland/Chromium/Gstreamer integration.

  • 11:15 – 12:05 – EME implementation in Chromium: Linaro Clear Key

An example of a key system from a Clear Key point of view. Linaro implemented a sample CDM plugin for Chromium capable to exercise the EME implementation of the browser. The presentation gives an insight to the EME/CDM implementation in Chromium and the guidelines to integrating various DRM systems. We will present call flows with example classes, experiences learned, and example of things to watch out for.

  • 12:10 – 13:00 – ARM v8-A NEON optimization

With FFT optimization as an example, the following topics are discussed:

  1. Performance boost using ARM v8-A NEON
  2. NEON-optimization workflow for Ne10
  3. Some tips with example of Ne10 FFT and Android libraries
  4. Performance comparison between assembly and intrinsic
  • 14:00 – 18:00 – Hacking sessions or training (no description provided)

Friday 13th

  •  10:10 – 11:00 – Toolchain Performance Analysis and Investigations

This session will present a workflow of analyzing application or benchmark performance and ways investigate how performance can be increased by improving the toolchain. The session will cover use of profiling tools, reading of compiler optimization dumps, reducing optimization problems using compiler debug counters, and submitting optimization request/bug report to compiler developers

  • 11:15 – 12:05 – Power Management interactions with OP-TEE and Trusted Firmware

Understand what use cases related to Power Management have to interact with Trusted Firmware via Secure calls. Walk through some key use cases like CPU Suspend and explain how PM Linux drivers interacts with Trusted Firmware / PSCI (Power State Coordination Interface).

That’s it for the schedule, I find there are a lot of sessions about security, mainly OP-TEE, so this should become something important.

Linaro 2015 Demos

Beside keynotes, sessions, and training, there will be several demos during the event including:

  • Linaro Clear Key CDM
  • Chromium on Wayland with Gstreamer
  • Linaro Web Browser Test Framework
  • Demo of VLANd
  • l2fwd (See code on github)
  • OVS – x86 – ARM
  • ODP on Cavium platform
  • OpenJDK running on ARMv8 hardware
  • OpenStack running on ARMv8 hardware
  • Android support for clang 3.6 and gcc 5.0
  • Ceph on remote server cluster
  • UEFI on BeagleBone Black

If you want to attend Linaro Connect HK 2015, you can register online for £941.50 (~$1420 US). Live and recorded sessions should also be available for free via Linaro OnAir YouTube account.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

CubieTruck Metal Case Kit Getting Started Guide and Review

December 21st, 2014 4 comments

I’ve received CubieTruck Metal Case kit just over a month ago, but just like for Ubuntu on ODROID-XU3 Lite, the board could not get HDMI EDID info from my Panasonic TV, which led to a crash at boot time. CubieTech has now fixed the issue, so I’ve finally been able to complete the review with Cubieez (Cubie Easy) distribution, pre-installed on the board, and based on Debian 7.6. You can get the full hardware specs on my previous post, but the kits is comprised of four parts: CubieTruck development based on Allwinner A20 dual core processor, a rugged metallic enclosure, a 128GB SSD, and a 5,300 mAh battery acting as a UPS. I’ll start by showing how to setup the board, test SATA and Gigabit Ethernet performance,  check if the battery acts as expected, try to use the board as a desktop replacement with LibreOffice, Chromium, and so on, and run Phoronix Benchmark. I’ll also explain how to mvoe the rootfs from NAND flash to SSD to extract more performance from the kit.

Getting Started with CubieTruck Board

Even though the board is pre-loaded with Cubieez 2.1, it’s still good to know how to flash the image by yourself, and do the initial setup.

There are some tutorials for CuebiTruck, but the one dedicated to Cubieez is completely empty at the time of writing.

But the important part is to know that the firmware can be found @ with images for HDMI or VGA output, and NAND flash or SD card boot.

So this is what I had to do to reflash Cubieez (Cubieez 2.2 has been released since then, probably with a fix with my HDMI issue):

7z x cubieez-ct-nand-hdmi-v2.1.img.7z

You’ll need LiveSuit (Linux or Mac), or PhoenixSuit (Windows) to flash the firmware, which you can download here. I’ve already explained how to install LiveSuit to flash firmware on A80 OptimusBoard, and the procedure is the same for all Allwinner devices. Once the installation is complete simply run:


And load the uncompressed image (cubieez-ct-nand-hdmi-v2.1.img) as shown below:


Now connect a micro USB to USB cable between your computer, and CubieTruck OTG port, press the FEL button on the right side, power on the kit, and flash should complete automatically.

Then you can just reboot the board, and it should boot into LXDE, unfortunately for me, it did not work that way, and all I could see was the boot log on my HDMI TV.  So I asked some help on CubieBoard Google group, and got some help one or two days later pointing me in the right direction. However, it may have been better to ask on, these forums are more active than on Google group.

Nevertheless, the issue was a segfault reported in /var/log/Xorg.0.log:

[    47.423] (II) FBTURBO(0): using /dev/fb0
[    47.423] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[    47.423] (**) FBTURBO(0): Depth 24, (–) framebuffer bpp 32
[    47.423] (==) FBTURBO(0): RGB weight 888
[    47.423] (==) FBTURBO(0): Default visual is TrueColor
[    47.423] (==) FBTURBO(0): Using gamma correction (1.0, 1.0, 1.0)
[    47.424] (II) FBTURBO(0): hardware:  (video memory: 16200kB)
[    47.424] (**) FBTURBO(0): Option “fbdev” “/dev/fb0″
[    47.424] (**) FBTURBO(0): Option “SwapbuffersWait” “true”
[    47.427] (II) FBTURBO(0): processor: ARM Cortex-A7
[    47.429] (EE) FBTURBO(0): Unknown EDID version 0
[    47.429]
[    47.430] Backtrace:
[    47.430]
[    47.431] Segmentation fault at address 0x8
[    47.432]
Fatal server error:
[    47.432] Caught signal 11 (Segmentation fault). Server aborting
[    47.432]

The bold line showed that my TV did not return EDID information, and fbturbo did not check for this case. So CubieTech sent me an updated, which I copied to  /usr/lib/xorg/modules/drivers/, and I was finally able to access the login prompt in LXDE. I believe this fix must be included in Cubieez 2.2 image.

You can login with cubie / cubieboard, or root / cubieboard. I normally prefer running the system as a user, and run sudo when needed, so I logged in with cubie user.


Cubieez LXDE Desktop (Click for Original Size)

Cubieez features LXDE running on top of Debian 7.6 with Linux 3.4.79, and the default resolution is set to 1080p50, but you can click on Monitor Settings to change the resolution as needed.

The README recommends to run cubie-config in LXTerminal the first time, so let’s do that.

Cubie_configExpand Filesystem is only used for SD card images. Internationalisation Options lets you change the locale, timezone, and keyboard layout, and you can change the hostname, and enable/disable SSH in Advanced Options. Once you;’re done, select Finish, and you may have to reboot.

You’ll probably want to install some packages with apt-get or the Software Center, but the repositories are set to Spanish mirror, and changing the mirrors to one in your country may speed up download a lot. Changing from Spain to Thailand, increased the download speed with apt-get by 10 times in my case.

You can find the list of mirrors @, once you have found the right mirror for your country, edit the source list:

sudo vi /etc/apt/sources.list

And replace

deb stable main contrib non-free
deb wheezy-updates main contrib non-free

by your country’s mirror. For example:

deb stable main contrib non-free
deb wheezy-updates main contrib non-free

Finally refresh the system with:

sudo apt-get update

You may want to install your favorite programs, for example:

sudo apt-get install libreoffice gimp nautilus

I found some XMBC binaries for an earlier version of Cubieez, that you need to extract to the root of the system. You have to install some dependencies, then run XBMC as shown below:

sudo apt-get install libssh-4 libmicrohttpd10 libtinyxml2.6.2 libyajl2 liblzo2-2 libpython2.7 libpcrecpp0 libhal1 libhal-storage1

But unfortunately XBMC will crash, so this version is not suitable for Cubieez 2.1/2.2.

Finally, the SSD included in the kit is not partitioned nor formatted, so it’s also something you’ll want to do, but I’ll explain that in the next section.

SSD SATA Performance and Gigabit Ethernet

CubieTruck is certainly not one of the fastest ARM Linux system currently available, but its SATA interface and Gigabit Ethernet port could make it one of the best platform for storing and moving data around.

First let’s prepare the SSD for testing. Most people will make a single partition, but since the SSD may be use for Android SATA testing as well in the future, I’ve create two partitions, one formatted with NTFS and the other with EXT-4. To create the partitions, start a Terminal windows in CubieTruck, and type:

sudo fdisk /dev/sda

Now create primary partition(s) with by selecting ‘n’,  and type the start and end of the partition. If you want a single partition, that’s easy as fdisk will select the start and end for you, and you can just press enter to confirm the choice. Finally press ‘w’ to write the partition table and exit.

Format your partitions are needed, and in my case:

sudo mkfs.ntfs /dev/sda1
sudo mkfs.ext4 /dev/sda2

The SSD is now ready. Let’s mount the partitions:

sudo mkdir -p /mnt/sda1
sudo mkdir -p /mnt/sda2
sudo mount -t ntfs /dev/sda1 /mnt/sda1
sudo mount -t ext4 /dev/sda2 /mnt/sda2

In Linux, I’m normally using Bonnie / Bonnie++ to benchmark storage device:

sudo apt-get install bonnie++

By default, bonnie will write a file with double the size of your RAM to perform its testing, which is a way to reduce the influence of the cache, and provide more accurate results.

bonnie++ -d /mnt/sda1
Version  1.96       ------Sequential Output------ --Sequential Input- --Random-
Concurrency   1     -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine        Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP  /sec %CP
cubietruck       4G     3  13  8726  12  8640  14   424  99 50567  28 787.3  56
Latency              2352ms    1824ms    1807ms   21041us   17141us    2591ms
Version  1.96       ------Sequential Create------ --------Random Create--------
cubietruck          -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP  /sec %CP
16  1321  15  3549  19  1788  13  1344  16  3756  19  1769  14
Latency              5620us   10305us   49666us    8780us    8080us    5673us

bonnie++ -d /mnt/sda2
Version 1.96 ------Sequential Output------ --Sequential Input- --Random-
Concurrency 1 -Per Chr- --Block-- -Rewrite- -Per Chr- --Block-- --Seeks--
Machine Size K/sec %CP K/sec %CP K/sec %CP K/sec %CP K/sec %CP /sec %CP
cubietruck 4G 85 99 36310 30 23916 26 464 98 179457 89 1199 115
Latency 164ms 1974ms 214ms 39690us 15721us 104ms
Version 1.96 ------Sequential Create------ --------Random Create--------
cubietruck -Create-- --Read--- -Delete-- -Create-- --Read--- -Delete--
files /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP /sec %CP
16 5738 56 +++++ +++ 10671 82 8671 84 +++++ +++ 10397 83
Latency 891us 2857us 3987us 4931us 125us 5187us

Since bonnie output is not always easy to read, I’ve run the last line with bon_csv2html to have prettier results in HTML, also including the results for the NAND flash (bonnie++ -d /) as comparison.

Cubietruck_SSD_NAND_BonnieYou can check the full Bonnie++ results including sequential and random create results.

Sequential Output is write speed, and Sequential Input is write speed. Most of the time, Block speed is the important metric here. So first we see a large difference in performance between NTFS and EXT4 read and write speed on the SSD with respectively 8.7 MB/s and 50.5 MB/s for NTFS versus 36.31 MB.s, and 179.45 MB/s for EXT-4. That means CubieTruck can read data at 180MB/s from the SSD, or about 6 times faster than the typical performance of a USB 2.0 drive, and faster than the USB 3.0 drive connected to my Ubuntu computer (AMD FX8350) which achieves 115 MB/s read speed in the same test on its EXT-4 partition. As a side note, the maximum performance I’ve ever got from another ARM device via USB 3.0 was about 48 MB/s with ODROID-XU3 Lite, but this was in Android, and an NTFS partition, and with another tool (A1SD).

The NAND flash used in CubieTruck is also much slower than the SSD, writing at 6.4 MB/s and reading at 19.46 MB/s, and that’s why if you purchase this kit, you should probably move the rootfs to the SSD.

I’ve also tested raw Ethernet performance with the command line: iperf -t 60 -c -d. Unfortunately Cubieboard Gigabit Ethernet performance (full duplex) is not that good, albeit still faster then Fast Ethernet.


Throughput in Mbps

Battery Life, Monitoring and UPS Function

This kit comes with a 5,300 mAh battery that’s mainly used as a UPS. So I’ve tried to disconnect the power while in used, and the system runs as expected. Once the battery is depleted, and the system off, as soon as the power comes back the system will boot again, so that part is also good in most cases, but not all…

I always wanted to check the battery life, to see how long the board could run on batteries. In my Ubuntu computer, I can run “last” to check the last power on./off event, bit with this firmware, it won’t work, complaining that /var/log/wtmp is missing. So instead I installed uptimed:

sudo apt-get install uptimed

Once I left the battery discharge over night, and after 3 hours, I assumed it was fully charged, and in idle mode, the battery lasted two hours. I had only connected the HDMI cable, an Ethernet cable, and connected to the board with SSH.

We can check the record uptimes with uprecords:

     #               Uptime | System                                     Boot up
     1     0 days, 03:20:26 | Linux 3.4.79              Fri Dec 19 09:59:28 2014
     2     0 days, 02:00:40 | Linux 3.4.79              Fri Dec 19 13:20:32 2014
->   3     0 days, 00:08:11 | Linux 3.4.79              Fri Dec 19 15:31:12 2014

However, afterwards I had a doubt whether I had a full charge or not, so let it run all day, and tested it again, and this time, the battery lasted for over four hours and 20 minutes, meaning the first time, the battery was not fully charged, and it might take many hours to charge the battery:

     #               Uptime | System                                     Boot up
     1     0 days, 07:43:48 | Linux 3.4.79              Fri Dec 19 14:31:12 2014
     2     0 days, 04:26:36 | Linux 3.4.79              Sat Dec 20 11:51:35 2014
     3     0 days, 04:12:17 | Linux 3.4.79              Sat Dec 20 16:20:07 2014

LXDE desktop will not run the system run on batteries (or I missed that), but you can monitor the battery status, health, voltage and more with sysfs:

cat /sys/class/power_supply/battery/health
cat /sys/class/power_supply/battery/status
cat /sys/class/power_supply/battery/voltage_now

So that means your program, or a script, could detect when the battery is charging or discharging, check the health status and/or voltage, and decide to run in lower power mode, and cleanly turn off the system when the voltage drops too low.

More options can be found on power_supply_class.txt kernel documentation.

Installing Debian rootfs to the SSD

Have we’ve seen above the read speed of the SSD is about 9 times faster than the NAND flash, and the write speed nearly 6 times faster, so you should really move the rootfs to the SSD, unless you have specific reasons not to do so. Another advantage will be the increased space for programs.

Let’s check the rootfs usage n the NAND flash first:

cubie@cubietruck:~$ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 6.9G 2.8G 3.9G 42% /
/dev/root 6.9G 2.8G 3.9G 42% /

So we have a 6.9GB rootfs out of the 8GB flash, with 3.9GB free after I installed a few programs.

The rootfs is located in /dev/nandb partition, and you’ll want to move it to /dev/sda1 (in my case /dev/sda2, but I’ll use sda1 in this section, as it’s what most people will do). I’ll assume here that you have already partitioned and formatted the SSD as specified in the SSD SATA performance section.

First we have to copy the rootfs in the NAND flash to the SSD partition:
sudo mkdir -p /mnt/nandb
sudo mount -t ext4 /dev/nandb /mnt/nandb
sudo mount -t ext4 /dev/sda1 /mnt/sda1
cd /mnt/nandb
sudo cp -a . /mnt/sda1

Then we have to tell the system the root filesystem is located in the SSD, by changing uEnv.txt located in nanda partition of the flash:

sudo mkdir -p /mnt/nanda
sudo mount /dev/nanda /mnt/nanda
cd /mnt/nanda

sudo vi /mnt/nanda/uEnv.txt

Where you’ll need to change:




Now unmount the partitions, sync, and reboot

umount /mnt/sda1
umount /mnt/nand*

After login, you can check that the rootfs is now on the SSD with close a 120GB partition (in my case 60G since I have two partitions):

cubie@cubietruck:~$ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 59G 2.9G 53G 6% /
/dev/root 59G 2.9G 53G 6% /

Using CubieTruck Metal Kit as a Desktop PC

Just like I did with ODROID-XU3 Lite and Ugoos UM3, I’ve tried to use this Linux computer as a desktop computer, and shot a video with:

  1. Boot time from SSD: 42 seconds. Note that the LED on the front panel take about 10 seconds to lit up.
  2. Checking UPS function by disconnecting the power
  3. cubie-config utility for setup
  4. List of installed applications
  5. LibreOffice (Writer)
  6. Chromium – Multi-tabs, YouTube (embedded / full screen; VP9 / H.264/AVC1), and Candy Crush Saga (Flash game) in Facebook
  7. Video Playback with GNOME Player
  8. Power off

CubieTruck (Cubieboard 3) can be used as a desktop computer for Office tasks, but web browsing may become an issue with high CPU usage in Chromium, and watching YouTube video amounts to torture. Video playback (software decode) appears to be relatively OK up to 720P using GNOME player, but 1080p/H.264 video are not watchable. There are now VPU driver for Allwinner A10/A20, but these do not seem to be in use in this image, same for Mali drivers for 2D/3D GPU acceleration.

Phoronix Benchmarks

I’ve also run some of Phoronix Test Suite benchmarks:

sudo apt-get install php5-cli php5-gd php5-gd libpcre3-dev
sudo dpkg -i phoronix-test-suite_5.4.0_all.deb

After configuring batch test, I’ve run MP3 encode, 7-zip compression, and Apache server tests:

phoronix-test-suite batch-benchmark pts/encode-mp3 pts/compress-7zip pts/apache

Contraty to ODROID-XU3 Lite, where compress-7zip failed because of a lack of memory, all three tests could complete successfully. I find Openbenchmarking website very confusing to use, and I did not find a way to compare to old results. So I included CubieTruck NAND, CubieTruck SSD, and ODROID-XU3 Lite in the picture below.

Cubietruck (NAND / SSD) vs ODROID-XU3 Lite (Click to Enlarge)

Cubietruck (NAND / SSD) vs ODROID-XU3 Lite (Click to Enlarge)

You can also click on the pages on OpenBenchmarking for Cubietruck (NAND), CubieTruck (SSD), and ODROID-XU3 Lite (eMMC) for full details.

I was not expecting the SSD to make much difference with the MP3 encoding, and 7-zip compression benchmarks, but I though it would yield a significant increase in performance for the Apache test. I was wrong, as the Apache test only improved from 771.6 requests per second to 785.20 rps, so it must mean this benchmark is not a I/O bound test. As should be expected ODROID-XU3 Lite is much faster for both MP3 encoding (45 seconds vs 165 seconds), and Apache (2382 rps vs 785 rps).

CubieTruck Metal Case kit includes CubieTruck board, a 120GB SSD, a 5,300 mAh battery, a rugged metallic enclosure, a 5V/2.5A power, and relevant cables. It can be purchased for $169 on Seeedstudio, or 149 Euros exc. VAT on

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

MT87 Digital Clamp Multimeter Hands On

October 11th, 2014 5 comments

When you want to measure power/current on electrical device, a kill-a-watt is the easiest method, but it’s not always possible for items like air conditioner, water pumps, etc… because they may simply be no plug to disconnect. Luckily, current clamps are made just for this purpose, where you simply place one of the two wires in a clamp / loop, and it magically measures the current.  You can’t put both wires inside the loop or measurement will not work at all. The good news is that such devices are very inexpensive, and I bought MT87 digital clamp multimeter, which is also a multimeter adding voltage and resistance measurement capability, for just $11.33 on DealExtreme.

MT87_Digital_Clamp_MultimeterMT87 comes with measurement leads (voltage/resistance only), and a user’s manual. The linked user’s manual is not exactly the same document, but very similar, and also refers to MT87C model which adds temperature measurement.

There are three ranges for alternative current (20A, 200A and 400A), 600V ranges for alternative and continuous voltages, a 200 kOhm range with 100k resolution, and a diode and continuity option with buzzer. So it’s pretty much for heavy duty measurements, and not useful for low power devices, but it’s not what it’s for. The button of the right on the device is used to hold data, so if it’s in location you can’t read the display during measurement, you can press the button, take out the clamp and read the measurement.

I haven’t tried the voltage and resistance measurement. After inserting two AAA battery in the device, the first challenge was to find an electric appliance with the two cables already separated, since I did not want to use a cutter on the power cords of my appliances. First I found I could do that with my water pump, measuring around 2A @ 230V, so 460W. But them I realize the cables from the street to my house were easily accessible, and properly insulated, so I should be able to measure the full power consumption of my house, but simply clamping the device to one of the cables.

MT_87_House_power_consumptionAnd I did get measurements which are consistent with the results I got for my computer and fridge using my now defunct kill-a-watt clone:

  • Computer only – 0.74 to 0.80 A (~ 180 Watts)
  • Computer + fridge – 1.18 A (~ 270 Watts)
  • Computer + 9,500 BTU aircon – 3.99 A (~ 920 Watts)

So based on these few results, it works nicely, and it can be a useful and affordable tool to evaluate how much power your household appliances consume.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Categories: Hardware, Testing Tags: power, review

DIY Power Measurement Board

July 23rd, 2014 7 comments

When I review media player or development boards, I’m often asked about power consumption figures. One way to measure power consumption is to use a Kill-a-Watt, but for low power devices it’s not always accurate enough, and it also includes the heat dissipation from the power adapter, which may or may not be useful depending on what you want to measure. For USB powered devices or boards, an easy way to measure power consumption is to use CHARGER Doctor, a small $5 USB dongle that displays both voltage and current alternatively. Unfortunately, most products I’ve received lately use barrel type connectors, so this little tool has not been as useful as I hoped. The only solution is then to measure voltage and current with a multimeter. Voltage is measured in parallel, so you just need to point the multimeter’s leads where you want to perform the measurements. However, the current is measure in series, so you need to insert the multimeter in the circuit somehow. A few possibilities:

  1. Unsoldering a component on the board to place the multimeter in series.
  2. Cut one wire of the power cable to insert the multimeter.
  3. Get and make a board to insert the multimeter.

Solutions 1 and 2 are not really desirable, so I decided to look into solution 1, and since I could not find any board that could match my requirements, I decided to work out a solution by myself allowing various power inputs and outputs.

Click to Enlarge

Click to Enlarge

The board can take power adapter using micro USB, mini USB or 5.5/2.1mm barrel connectors, 32 different output connectors thanks to two cables, and header pins are used to connect the multimeter’s leads.

Here’s the different components required for this solution:

  • 1x perfboard or veroboard
  • Some 2.54mm pin headers (straight and right angle)
  • micro USB breakout board – $1.50 on Adafruit, but shipping + insurance was $12, so instead I purchased 5x micro USB charging board for $4.24 on Ebay (asp_ezone)
  • mini USB breakout board – $1.95 on Sparkfun, but shipping killed it again, so I purchase 2x mini USB charging boards for $2.75 on asp_ezone shop.
  • 5.5/2.1mm DC power socket –  $4.18 for 10 pieces
  • USB Female DIP Socket Connector – $1.73 for 10 pieces
  • 6-in-1 Universal USB charging cable – $3.41
  • Universal 28-in-1 DC power socket / plug converter for laptop – $11.30

If you purchase everything from scratch the cost would be around $35.

In case the introduction is not clear, the board description below may help.


Iv’e also included the back of the board with the soldering for reference.

Power_Measurement_Board_BackAfter double checking I had not made a mistake inverting GND and VCC, which could be fatal, I tried it out by making some power measurements with Tronsmart Vega S89 Elite.

Tronsmart_Vega_S89_Elite_Power_Off_Power_ConsumptionIn power off mode, I get 115 mA (~ 575 mW @ 5V), so I’m confident it’s working just fine… Unfortunately, I quickly realized something is wrong as the boot does not complete most of the time, as it reaches 1A, the boot just simply stops, or I just get a blue screen. Only once or twice did I managed to get to the home screen (about 0.52A after most background tasks are done), but starting an app will hang the system most of the time. So  I’ve tried to replace the multimeter by a breadboard female to female cable, and everything works normally. So I suspect the contact surface with the leads is not large enough, or the multimeter introduces some noise that disturbs the device…. I’ll get some crocodile clips to see if things work out better…

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Categories: Hardware Tags: how-to, power, tutorial

iFans EL-PB-17 is a 3-in-1 USB Wall Charger with a Battery and an SD Card Slot

May 27th, 2014 2 comments

I’ve noticed TYLT ENERGY 2K a USB wall charger with an internal 2,300 mAh battery, is currently on Kickstarter for $20, and received some press coverage. The main advantages of this system is that it saves space ,and you don’t need to remember charging your phone and your USB power bank separately, it will just charge both within 3 to 4 hours. However, since I’ve recently purchased a USB solar power bank with a 30,000 mAh battery (actual 8,000 to 10,000 mAh) for about $25, I thought there must be better options with a larger batter and similar price, or cheaper price with a similar battery size. It turns out there aren’t so many options, but I did find NewTrent Travelpak Plus with a 7,000 mAH battery that sells for about $40 on Amazon and even $19 on Ebay. But I’ve found a product even more original and versatile with E-link Technology’s iFans EL-PB-17 that can either be a simple USB wall charger, a standalone 3,000 mAh power bank, a USB wall charger with internal battery, or an SD card reader.

ifans_usb_wall_charger_with_batteryJust like TYLT charger it has a US-type foldable plug, but you can also use the power bank directly, if you wish to charge it from your PC or laptop for example. If you combine the AC adapter with the 3,000 mAh, you can charge your phone / tablet and power bank in one go, and it’s small enough to carry easily.

Here are the specifications listed on the company website:

  • Battery
    • Capacity – Lithium Ion 3,000 mAh
    • Input – DC 5V – 800 mAh
    • Battery Output – DC 5V – 1A
    • Misc – Power button, battery life indicators
  • USB Wall Charger
    • Input – AC 100~240 V ~50/60Hz, 0.15 A
    • Output – DC 5V – 1A

If you’re thinking it could do a neat ARM board / device UPS, it may not work as expected because there might be a delay while switching between AC power to battery (TBC). At least, this is the way TYLT charger works.

I could not find this exact model for sale anywhere yet, but the 2-in-1 model (also called EL-PB-17?), without an SD card reader, for $29.99 on Amazon or $36.99 on Aliexpress.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Categories: Hardware Tags: power, usb

USB Solar Power Bank Review

February 21st, 2014 10 comments

A few months ago, I won a $5 coupon for DealExtreme, and decided to buy a “Portable 5V (30,000mAh) Li-ion Battery Solar Power Bank w/ Dual USB + LED – Black + White” for just over $20. For the price, solar charging was a nice bonus, and the 30,000 mAh was probably a “mistake” but it did not really matter. The SKU is gone, but 1BA-2 Solar power bank ($23.97) appears to be a very similar product. I did not plan to write about this gadget, but a few things happened that made me change my mind.

First. it took over two months to reach me, instead of the usual 2 to 4 weeks. I ordered on the 9th of November 2013, and received the package on the 25th of January 2014. The reason being that the package got declined by Thai immigration (I live in Thailand). DealExtreme could not explain me why, but I assume it could be because of stricter regulations regarding batteries. They then sent the power bank via Sweden Post which usually takes an awful lot of time, as it goes to Sweden first, before coming back to Asia.

But let’s check the device itself which I received in the parcel below.

You’ll find the power bank, a USB cable, adapters (mini USB, micro USB, and proprietary crap for Samsung, Nokia, and Apple devices), a user’s manual entirely in Chinese mentioning the model is XHL-2000 or XHL-3000, and a pouch.

On the power bank, you’ll get 2 USB output (1A and 2A), a power button to start charging, or lit up the white LED (long press), a micro USB port to charge with a power adapter, and 4 blue LEDs to indicate charging status and current charge level.

Click to Enlarge

It came with a charge and I could charge my phone a couple of times. Then I decided to charge it outside, placing it on a location with good sun exposure (a roof) to see how fast it would charge, and after 6 days, the charge level showed 2 LEDs on (26% to 50% charge).

Chiang_Mai_Winter_Weather_SunIt’s winter here, so it might charge faster when temperature and day length rises. It got about 7 hours direct daily sun exposure. The weather during the test is shown on the right. The power bank will also charge when it’s cloudy or there are shadows, albeit probably at a slower rate.

I could charge my phone (1800 mAh battery) twice after 6 days of charge. That means a full charge would typically take between 10 and 20 days depending on conditions, and that you can’t expect to charge your phone daily with this device.

I should have known this at the time of purchase based on the specifications:

  • Solar Panel – 1.5W
  • Capacity – 30,000 mAh/111wh
  • Input – 5V/1A
  • Output – 5V/1A and 5V/2.1A
  • Dimensions – 120x75x26mm
  • Weight – 350g
  • Temperature range – -20 to 65 C

Under ideal & theoretical conditions charging at 1.5W for 10 hours day would take over 7 days to fully charge the power bank.

If instead of charging with solar power, I use a standard 5V/2A power adapter, the power bank can be fully charged within 9h30. I can then charge my phone about four times, which means the actual capacity is closer to 8,000 or 10,000 mAh instead of the 30,000 mAh advertised. Charging my phone from the power bank takes about 2h10 from the 5V/2A output (15% to 100%), and 2h55 from the 5V/1A (9% to 100%), which is only slightly longer than using directly a power adapter.

I’ve also tried to open this gadget, but failed to completely dissemble it.. I could however see it’s based on four 3.7V Lithium-ion batteries as found in mobile phones without being able to read the capacity. You may also want to remove the plastic protection for better efficiency.


In any case, I got taught a few lessons, some of which I already knew:

  • Purchasing batteries overseas may be a problem with customs due to new regulations.
  • Specifications can be wrong or misleading (no kidding)
  • Some people sell products with virtually useless features (with regards to solar charging)
  • Sweden post can be terribly slow

I’ll still use this power bank, especially when traveling, but I’ll keep charging my phone the old-fashioned way, i.e. with a power adapter, for now.

Digg This
Reddit This
Stumble Now!
Buzz This
Vote on DZone
Share on Facebook
Bookmark this on Delicious
Kick It on
Share on LinkedIn
Bookmark this on Technorati
Post on Twitter

Categories: Hardware Tags: power, review, smartphone, solar, usb