An alternative to the Raspberry Pi 3

ODROID-C2

Article from Issue 213/2018
Author(s):

The inexpensive ODROID-C2 module runs two to three times faster than a Raspberry Pi 3.

The ODROID series of single-board computers is manufactured by Hardkernel [1] out of South Korea. The ODROID-C1+ ($35) and the ODROID-C2 ($46) have a form factor similar to the Raspberry Pi 3 (RPi3) (Figure 1). The higher end ODROID-XU ($59), which is around five times faster than the RPi3, has a significantly different board layout.

Figure 1: ODROID-C2 and RPi3 compared.

I've been happy with the functionality and openness of the Raspberry Pi platform; however, I find its desktop performance a bit sluggish. For only a few dollars more than an RPi3, the ODROID-C2 CPU, RAM, and GPU specs are impressive (Table 1). My goal was to see whether I could use the ODROID-C2 for some typical Raspberry Pi applications.

Table 1

ODROID-C2/RPi3 Hardware Comparison

Feature

ODROID-C2

Raspberry Pi 3

CPU

Amlogic S905 SoC, 4x ARM Cortex-A53 1.5GHz, 64-bit ARMv8 @28nm

Broadcom BCM2837, 4x ARM Cortex-A53 1.2GHz, 64-bit ARMv7 @40nm

RAM

2GB 32-bit DDR3 912MHz

1GB 32-bit LPDDR2 450MHz

GPU

3x ARM Mali-450 MP 700MHz

1x VideoCore IV 250MHz

USB Ports

4

4

Ethernet/LAN

10/100/1000Mbps

10/100Mbps

Built-in WiFi

No

Yes

Built-in Bluetooth

No

Yes

IR Receiver

Built-in

Needs add-on

I/O Expansion

40+7-pin port, GPIO/UART/I2C/I2S/ADC

40-pin port, GPIO/UART/SPI/I2C/I2S/

Camera Input

USB 720p

MIPI CSI 1080p

List Price (US)

$46

$35

First Impressions

The ODROID-C2 has almost the same footprint as the RPi3, but not exactly. Because the microSD mount is different, I could use some, but not all, of my Pi cases (Figure 2). When you are designing your projects, it is important to note that the ODROID-C2 does not have built-in WiFi or Bluetooth adapters, so you'll need wired connections or USB adapters. Like some of the Orange Pi modules, the ODROID-C2 has a built-in infrared (IR) connection.

Figure 2: ODROID-C2 in a Pi Lego case.

ODROID-C2 can be loaded with Ubuntu, Arch Linux, or Android images. For testing, I used the Armbian 5.40 Ubuntu desktop, and the performance was significantly faster than my RPi3 Raspbian desktop. I could definitely see ODROID-C2 being used as a low-cost web browser station.

The ODROID-C2 images are quite lean, so you will need to go to the ODROID wiki [2] for instructions on loading additional software components.

The ODROID-C2 has 40 general-purpose input/output (GPIO) pins arranged as on the RPi3, so it is possible to use Pi prototyping HATs on the ODROID-C2 (Figure 3). Some differences in the pin definitions between the two modules are noticeable, so for this reason, I didn't risk using any of my intelligent Pi HATs on the ODROID-C2. The gpio command-line tool shows the pin definitions (Listing 1).

Listing 1

Pin Definitions

 

Figure 3: Pi prototyping HATs (left and right) with an ODROID-C2 (center).

The Pi's GPIO numbers range from 2 to 27, whereas the ODROID-C2 pins are in the 200s; therefore, don't expect to be able to run all your Raspberry Pi code "as is" on the ODROID-C2.

Unlike Arduinos, the Raspberry Pi platform has no built-in support for analog inputs, so I got pretty excited when I noticed that the ODROID-C2 had two built-in Analog-to-Digital Converter (ADC) pins (AIN.1 on pin 37 and AIN.0 on pin 40). However, after some investigation, I found that these pins had virtually no example code, and they only support 1.8V. Most of my analog input sensors require 3.3V or 5V, so I'm not sure how often these ADC pins will be used.

Python Applications

The ODROID-C2 wiki references the RPi.GPIO and WiringPi Python libraries. I tested both of these libraries and found that standard reads and writes worked, but neither of these libraries supported the callback functions like the Raspberry Pi versions. For existing Pi projects in which you are using callback functions for rising and/or falling digital signals (e.g., intrusion alarms), you will need to recode with a polling method.

Also note that the ODROID RPi.GPIO library is a little confusing because it uses the Pi pin names and not the ODROID pin names. For example, ODROID-C2 physical pin 7 is referenced as GPIO.04 (as on a Pi) and not GPIO.249 (the ODROID-C2 name). Listing 2 is a simple Python example that polls for a button press and then toggles an LED output when a button press is caught.

Listing 2

Python Read/Write Example

 

Some excellent Python libraries are designed to work with the Raspberry Pi; however, it will require some trial and error to determine which libraries will and won't work with the ODROID-C2. I tried testing the DHT11 temperature and humidity sensor with the ODROID-C2, and unfortunately the library had a Segmentation Error when I tried running an example.

Node-RED

Node-RED can be installed on ODROID-C2 by using the manual install instructions for Raspbian at the Node-RED website [3]. This install procedure will add a start item to the desktop Application menu, but because of hardware differences, the Raspberry Pi GPIO input/output components will not load. To read and write to the GPIO, a simple workaround is to use exec nodes to call the gpio utility (Figure 4). The command-line syntax for writing and reading with gpio is:

gpio write <pin state>
gpio read <pin>
Figure 4: GPIO access in Node-RED.

One of the limitations of this workaround is that you will need to add a polling mechanism. Luckily, you can use a good scheduling node like Big Timer.

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More

News