Friday, May 9, 2014

Intel Galileo. What will I make?

Some time ago I applied for the Intel Galileo university program and I was given ten Intel Galileo boards to be used on education projects. I supposed that the first I should do is learn to use the board before giving it to my students. This is the first blog entry about this board.

Intel Galileo Board Box

The Expectation

The Intel Galileo board promises a lot. It is an Arduino compatible board that uses a 400MHz 32 bit Intel® Quark System on a Chip (SoC) X1000 Processor. That makes it the fastest Arduino Board in the market while we wait for the Arduino Tre upcoming board.

Intel Galileo Board

The Galileo board includes a lot of functionality:

  • Ethernet LAN RJ45 socket
  • RS-232 COM 3.5mm Jack
  • USB Client Socket
  • USB Host Socket
  • SD Slot
  • Mini PCIe connector for WLAN Card
  • One SPI port
  • One I2C port
And, of course, the full Arduino UNO headers with 14 Digital lines (6 with PWM functionality) and 6 analog lines. The full board specification can be found in this link.

The board can be programmed using a special Arduino IDE with version 1.5.3. The IDE makes easy to program the board as any other Arduino board.

That all sounds good , ok?
Well not everything is so good in this board.

The Reality

The main problem about this board is in the GPIO implementation.
Intel decided to use a Cypress CY8C9540A I/O expander to implement most of the I/O functionality.

The Cypress CY8C9520A Expander Chip

The selected I/O expander is quite powerful. It gives 40 GPIO lines and 8 of them can generate PWM. I suspect that Intel selected this chip in order to mimic the standard Arduino I/O functionality. The problem is the I2C link that communicates this I/O expander with the Quark CPU. It operates at a only 100kHz. That means that the in practical terms the maximum GPIO frequency is 230Hz for most of the I/O pins.

Two lines (IO2 and IO3) that are normally routed through the I/O expander can be alternatively routed directly to the SoC chip and thus can operate at a much higher frequency. But only those two pins can benefit from high speed operation.

The analog readings are provided by an external  AD7298 ADC but at least this device connects at 4MHz with the SoC chip using a SPI interface.

AD7298 ADC (to the right)
The catch is that most Arduino compatible I/O lines, analog included, are routed trough TS5A23159 multiplexers that are controlled by the outputs of the I/O expander controlled by the slow 100kHz I2C interface. So changing from digital to analog mode on a pin is quite slow.

The final problem is that the SoC chip don't run directly the Arduino sketches. The SoC runs under Linux and the running sketch is one process in the myriad of processes of the Linux operating system. As Linux is not real time you cannot guarantee a deterministic timing on the sketches. If the operating system happens to be under high load you can expect a lot of jitter on the sketches.

All in all, the Galileo Board includes a power hungry (it cannot run on USB only) 400MHz Quark SoC but a lousy ATmega328 at 16MHz on an Arduino UNO runs circles around it in raw GPIO bandwidth.

Arduino UNO

So, what will I make?

In the end the Galileo Board delivers less than I expected due to the small I/O bandwidth that the 100kHz I2C port expander provides. The Linux operating system also don't help to obtain a deterministic reaction time. As a conclusion the Galileo Board is not a good board for fast real time operation. Better use a normal Arduino board or, better yet, a STM32 Discovery board for fast I/O operation.

Following the Arduino path

If you want, however, an Arduino compatible board that includes support for Ethernet, SD card storage and a real time clock and provides a lot of RAM and ROM memory, this is a very capable board if you don't mind the the slow GPIO bandwidth.

I use the Arduino Leonardo board in a mixed analog-digital lab course for students without the proper programming foundations to use a more capable board.

Arduino Leonardo Board
For applications that need more memory and speed I use the PIC32 Pinguino board. For the price of a Leonardo you get a board that features much more memory and speed and includes several goodies as a SD card slot and a 32kHz clock. I don't use this board as the main one because the Leonardo is better supported by the Arduino community.

PIC32 Pinguino Board
Now I have also the Galileo. I plan to use the Galileo in Arduino projects that need a lot of memory or network connectivity and don't need fast GPIO operation.

Following the Linux path

I am more interested, however, in the Galileo as a Linux board, not as an Arduino one. For some kind of projects I'm interested in controlling the board from Linux eliminating any Arduino IDE operation. That puts this board next to the Raspberry Pi and the BeagleBone / BeagleBone Black boards. 

BeagleBone Board

Raspberry Pi Model B
Both of the Raspberry Pi and BeagleBone boards are faster. Also both the Raspberry Pi and the BeagleBone Black provide a video output that the Galileo lacks. So the Galileo will only be useful for embedded operation not as a desktop computer substitute.

Compared with the Raspberry Pi the Galileo has some strong points:

  • One USB client that can work as a serial over USB terminal
  • 14 Digital lines and 6 Analog lines with both 3.3V and 5V functionality
  • A RS-232 level Serial
  • A battery backed RTC clock  
  • Arduino Shield Compatibility
  • Four mounting holes that make it easier to use without a case.
Off course the Raspberry Pi has also some strong points:

  • Faster operation
  • Much more capable Linux distribution
  • Video and audio output
  • Camera and LCD connectors
  • Cheaper price
It's a pity that the Raspberry Pi don't provide a USB client to enable a serial over USB console. For headless operation that could be very handy. The lack of proper mounting holes is also a problem.
For desktop Linux use nothing beats the Raspberry Pi in its price range but it shows that embedded operation was not a priority in its design.

For embedded Linux operation the BeagleBone is my first option. Both the BeagleBone and the Galileo feature digital and analog I/O although the BeagleBone with its GPMC bus features several orders of magnitude higher bandwidth. Both boards feature Ethernet and a serial over USB console. Both boards feature also a USB host socket. In general, however, the BeagleBone is more powerful. It uses a better Linux distribution, has higher clock frequency, consumes less power, and has more I/O lines and bandwidth. The only thing that the Galileo has and the BeagleBone lacks is the battery backed real time clock and Arduino Shield compatibility.

I plan to use the Galileo boards for Linux projects that don't need all the BeagleBone power. As this board includes in the SD card image a Python interpreter and no C compiler I will start using it in Python.

Closing Comments

That's all for now. In the end the Galileo is a quite capable Linux board but it could have been much better if the designers had opted for a higher bandwidth I/O solution. That's a pity because that positions this board in a very bad place against the BeagleBone Black. It's only strong point is the Arduino shield compatibility but I don't really care about that.

I know that it is difficult for Inter to fight against ARM but those kinds of design decisions don't help at all.
Off course I will use for teaching projects the ten Galileo boards I have been given but I'm not sure I would opt for these boards if I needed to buy them myself.

No comments:

Post a Comment