Radxa X4: The SBC Everyone Has Been Asking For
Radxa launched the Radxa X4 without much ado. There was no official post on social media, as customary, or even an announcement on their community forums. Radxa nonchalantly updated their website landing page to include the Radxa X4 front and center. But even that wasn’t enough to catch my attention.
(This post is a work in progress and I will be updating it with more test data and just general info about the Radxa X4)
I was browsing their community forums looking for more information on the Rock 5C when I noticed a thread mentioning a new N100 SBC.
“What? Intel N100? This is probably one of those Mini ITX SBCs”, I thought to myself.
You can imagine how surprised I was when I found out the Radxa X4 is roughly the same size as the Raspberry Pi model B.
“This is going to be a hit”, was my second reaction. As many of you who read this blog know, I’m the person behind rpilocator.com. And, a common sentiment apparent throughout rpilocator’s social media threads was that people were a little taken aback by the cost of a Raspberry Pi 5 system. Specially, once you add all the basic accessories and the much coveted PCIe adapters.
A lot of people looking to use the Raspberry Pi 5 as a server or desktop computer were starting to consider slightly more expensive, but much more powerful x86 systems. This shift began to happen at the same time Mini PCs sporting the Intel N100 chip became so popular.
Overview
Here’s a video reviewing the main differences between the Radxa X4, the Raspberry Pi 5, and a traditional Mini PC.
If you are in the mood to watch the video, here are the highlights:
- Intel N100 CPU
- Almost the same size as a Raspberry Pi Model B
- Onboard M.2 connector for NVMe SSDs
- Has more computing power than Pi 5 but needs adequate cooling
- Consumes more power than Pi 5 and other Arm SBCs
- Lacks expandability of traditional Mini PCs
- No SATA ports, RAM not upgradeable
- Heatsink design needs some improvements
A Lot of Heat
Raspberry Pi computers are not really known for being the fastest computers out there, but they are known for great software support and energy efficiency. The Radxa X4 has an Intel x86 system onboard and it generates a lot more heat than traditional Arm SBCs.
Radxa sells a heatsink separately for $15 but I really think this should be included in the box with the Radxa X4. The X4 needs a cooling solution to perform at its best.
The heatsink is fitted with a 2-wire fan and because of Radxa’s design choices, it’s not possible to control the speed of the fan. It’s also not possible to turn off the fan if the CPU is idling and not producing a lot of heat. The fan is pretty loud and a bit annoying, so I hope to see a redesign in the future.
RP2040 Onboard
The Radxa X4 has two sides: the microcontroller side (MCU) and the computer side (CPU). The computer side of things doesn’t have direct access to the GPIO pins. The communication with GPIO needs to go through the RP2040 chip. Although this makes using GPIO a little bit more complex than on traditional SBCs, it also comes with some benefits.
There is a multitude of tutorials on how to work with the RP2040/Pi Pico platform on the internet. There are also a wide range of libraries available to get the RP2040 talking to other devices and accessories, like inputs, sensors, and screens. I would argue that it is a lot easier to get a project off the ground using the RP2040 platform than trying to use GPIO natively through Linux.
CircuitPython’s USB_CDC module makes this communication super straightforward. For this reason alone, I prefer to run CircuitPython instead of other firmware like MicroPython.
In order to install a new firmware on the RP2040, you have to put it in BOOTSEL mode. This can be achieved by pushing the BOOTSEL button on the board or running the commands below on a Linux terminal on the X4. Make sure to have gpiod
installed.
sudo gpioset gpiochip0 17=1
sudo gpioset gpiochip0 7=1
sudo gpioset gpiochip0 17=0
sudo gpioset gpiochip0 7=0
USB_CDC allows you to have two serial interfaces through USB, which is great if you want to keep the communication between the Intel N100 CPU and the RP2040 alive while you are debugging. To enable two interfaces the CircuitPython boot.py
file should contain the lines below.
import usb_cdc
usb_cdc.enable(data=True, console=True)
Here’s an example that uses the data line to read the information sent from the computer side of things and then send the information back to the Intel N100. This should be saved to the CircuitPython code.py
file.
import sys
import json
import time
import usb_cdc
while True:
# add to that dictionary to send the data at the end of the loop
data_out = {}
# read the secondary serial line by line when there's data
if usb_cdc.data.in_waiting > 0:
data_in = usb_cdc.data.readline()
# try to convert the data to a dict (with JSON)
data = None
if len(data_in) > 0:
try:
data = json.loads(data_in)
# print(data)
except ValueError:
data = {"raw": data_in.decode()}
# As a test, send the received data back
data_out['Send data back'] = {"received data": data}
# send the data out once everything to be sent is gathered
if data_out:
print(json.dumps(data_out))
usb_cdc.data.write(json.dumps(data_out).encode() + b"\r\n")
time.sleep(0.1)
Now, on the Intel side of things, we will be sending a command in the JSON format and read if any data is sent back. First, make sure your user is included in the dialout
user group otherwise, it won´t be allowed to open the serial communication.
sudo adduser <user_name> dialout
Next, save the code below to the Linux filesystem. You can name this file myserial.py
. Make sure to not name this serial.py
as this will conflict with the module named “serial”.
import serial
import time
# usb_cdc data port on RP204 should be ttyACM1
# if this doesn work, try ttyACM0
SERIAL_PORT = "/dev/ttyACM1"
BAUD_RATE = 115200
# Open the serial communication
s = serial.Serial(SERIAL_PORT, BAUD_RATE)
while True:
# Send a command through serial comm
s.write(b"{\"action\":\"temp\"}\n")
# Read any data sent back
data = s.readline()
data = data.decode()
print(data)
time.sleep(2)
Final Thoughts
Although the Radxa X4 is the single board computer everyone has been asking for – an Intel N100 chip onboard a Raspberry Pi-sized computer – it’s not the be-all and end-all of the SBC world.
The Radxa X4 is the “duck” of Mini PCs/SBC. Although a duck can fly, walk, and swim, it is not great at any of these disciplines. The Radxa X4 is not a great Mini PC nor a great SBC.
Man this thing generates a lot of heat even with their heatsink. I’m thinking this chip shouldn’t be used on an SBC. Currently I have Edge open with 10 tabs open. Core Temp shows 58 degrees. The SSD placement is worse. CrystalDiskInfo currently shows 70 degrees. I think I’ve $150 or so on this.
The last sentence should have said: I think I’ve wasted $150 or so on this. I guess live and learn.