Hands-On with the Raspberry Pi Zero, part 4: Wrap-up

Concluding the Raspberry Pi Zero series, today I look at some technical details, compatibility and a summary of a week's Hands-On experience.

This mini-series about the Raspberry Pi Zero has turned out not to be so 'mini' after all. Part 1 was general information and availability; Part 2 was hardware and Part 3 was software. Now I am going to look at some more technical aspects, both hardware and software, then I will wrap it all up with some comments about my actual experiences and opinions this week with the Pi Zero.

The first thing I want to look at is the question of what is 'really required' to get a Raspberry Pi Zero and actually use it -- or to put it another way, what is the 'real cost': is it $5 or is it actually the same as (or even more) than other Raspberry Pi models?

Assuming that you are starting from zero, with no previous experience of Raspberry Pi and no supply of miscellaneous parts and cables laying around that you can cannibalize to get the Zero running. Here is a list of what you would need to get a Raspberry Pi Zero up and running, compared to starting from the same point with any other type of Raspberry Pi.

zerocase.jpg
Adafruit Pi Zero Protector

First off, the basic Raspberry Pi Zero is nothing more than a bare circuit board. This is exactly the same as the other Raspberry Pi models, which are all just bare boards, so there's nothing different about that. There's no case available for the Pi Zero yet, so we can't compare prices at this time. But given the size of the unit, and the fact that it's less complex in terms of the number and variety of connectors it has, I think it is safe to assume that cases for the Zero will be less expensive than for the larger Pi models.

microsd.jpg
microSD Card

You're certainly going to need a microSD card, at least 4GB and preferably speed class 10, to load Raspbian (or whatever operating system) and to hold your user data. All of the other Raspberry Pi models have the same requirement (well, the Type A used a standard SD rather than microSD), so there's no difference in requirement or cost here.

5vps.jpg
5v micro-USB Power Supply

You'll need a 5V power supply with a micro-USB plug. These are available from any Raspberry Pi distributor, for as little as $2.50, but you can also use pretty much any (non-Apple) smartphone or later-model feature-phone AC adapter. Again, all of the other Raspberry Pi models have the same requirement, with the same plug, so there's no difference in requirement or cost here.

hdmi.jpg
HDMI to mini-HDMI Cable

An HDMI cable is required for the display, and I'm going to carefully qualify what I say about this. The Pi Zero has a mini-HDMI connection, while all other Raspberry Pi models use standard HDMI. If you consider the premise stated earler, that we're talking about starting from scratch to assemble this system, then you'll to buy some kind of HDMI cable, and as far as I can tell from a quick look at the distributors, mini-HDMI cables are no more expensive than standard HDMI cables. So there is a difference in requirement, but no difference in cost.

mini-hdmi.jpg
mini-HDMI Adapter

The exception in this case is if you do happen to already have a standard HDMI cable that you want to use with the Pi Zero. In that case you will have to buy a mini-HDMI adapter, which will cost a few francs/pounds/euros/dollars. But I'm not going to count that as an 'extra cost' against the Pi Zero, because if you start from the same circumstances, the cost is the same.

otghub.jpg
USB OTG Hub

Finally, you'll need a micro-USB connection. This is one place where the Pi Zero is at a real disadvantage compared to most of the other Raspberry Pi models. The Type B+ and Pi 2 have four USB ports, and the Type B has two, but the Zero only has one. Assuming you will want/need a keyboard, mouse and some kind of network connection, one port isn't going to be enough, which means you'll need a USB hub of some kind.

otg.jpg
OTG Adapter Cable

What I disagree with here is all of the talk about 'you have to buy an OTG adapter cable', and then also buy a USB hub. That's not necessarily true: there are USB-OTG hubs available that make the connection and conversion in one unit.

Another requirement is a keyboard and almost certainly a mouse, which you would need for any other Pi model as well. You might want to be more careful in choosing them, so that you only need one USB port for both.

Also required is a display, which again is the same as for any other Pi. But there can be a significant difference here because you could use a TV instead of a computer screen, and if you have an older TV which doesn't have an HDMI connection, then you have a problem because the Pi Zero doesn't have composite video or stereo audio out. However, this is not really a cable or cost problem, so I'm just going to note it here and move on.

My point, then, is that there is not a significant 'cable adapter penalty' inherent in the Raspberry Pi Zero. Many of the distributors who are selling them now (or at least were selling them until they went out of stock) were including USB and HDMI cable adapters in the package because the majority of 'early adopters' were likely to be hobbyists who already had other Raspberry Pi systems, so they were likely to want to use existing cables and hubs.

The things that might be considered to be a 'penalty' are the lack of an RJ-45 wired network connection, and having only one USB port. I would simply point out that this is exactly the same as the existing Raspberry Pi Type A/A+.

Configuration and compatibility

There seems to be some misunderstanding, or incorrect assumptions, about exactly what the Raspberry Pi Zero is. Because it has been released after the Raspberry Pi 2, a lot of people seem to be assuming that the Pi Zero uses the newer quad-core processor that's in the Pi 2. This is incorrect; the Pi Zero uses the same processor as the original Pi Type A/A+/B/B+, but with the clock rate increased from 700MHz to 1GHz. Also, it has 512MB of memory (the same as the original Pi Type B/B+) and not the 1GB that the Pi 2 has.

This is important because it means that software which is specifically for the Pi 2 will not run on the Pi Zero. The most important of these are Ubuntu MATE, Snappy Ubuntu Core and Windows 10 IoT Core. I have a feeling there are going to be a lot of disappointed people who buy a Pi Zero and try to load Ubuntu on it, but I hope that those people will then reconsider and try Raspbian, because it really is a very nice Linux distribution.

Software which works on the original Pi A/A+/B/B+ will also work on the Pi Zero. This includes Raspbian (of course), openElec, OSMC (formerly RaspBMC) and Risc OS. These are available from the Raspberry Pi Downloads page. But even with those there are some caveats, so I need to go into some more detail.

There are two different kinds of software distribution, reflecting two different approaches to software installation on the Raspberry Pi. The absolute drop-dead simplest distribution and installation is called NOOBS (New Out-Of-Box Software), which is a bootable image and installer that lets you choose any one or more of the distributions listed above, and then takes care of partitioning the disk, installing the operating systems, and setting up multi-boot so that you can choose between them each time you boot.

noobs.jpg

NOOBS is really a wonderful tool, and it is probably responsible for a lot of the success of the Raspberry Pi family. Being able to buy an SD card preloaded with NOOBS made it not only possible but very easy for an inexperienced user to get started with a Raspberry Pi. In fact, one aspect of NOOBS that is particularly important but doesn't get much attention is the fact that you can do everything necessary to download the NOOBS distribution and initialize an SD card on a standard Windows PC -- no special hardware, software or wetware necessary.

Another aspect of NOOBS that doesn't get much attention is the fact that even after you have run the installation process, and you are happily using your Raspberry Pi, you can still go back to the NOOBS setup (by pressing Shift during boot), and start the whole operating system selection and load again. That means you can change your mind about which operating systems you want to have loaded! What a great feature!

There is one very important condition that you have to keep in mind, though. Every time you rerun the NOOBS setup, it will wipe the SD card and start again. You can't 'modify' your choices, keeping one thing, adding another or deleting something. You can only start from a clean installation of whatever you select. So think carefully before you do this, and backup any data that you want to keep for the 'new' system.

raspiansd.png

The other way to install an operating system on the Raspberry Pi is by using a more traditional Linux approach, downloading a disk image or ISO file and then copying that directly to an SD card. This kind of image is what's found on the Raspbian download page, and on the other operating systems such as openElec. The download file is generally in zip (or gzip) format, which you first unpack and then copy directly to the 'raw' SD card. That last bit is the trick, to do that you need to use the Linux dd utility, or you have to install a special utility on Windows.

The advantage of this kind of installation is that it uses less space on the SD card (because NOOBS keeps copies of things so that it can re-run the setup), and it results in a 'cleaner' layout (partitioning) on the SD card (because NOOBS has to have a place to store all that stuff it keeps around, and a place to boot and work from when it initializes the disk).

noobs.png
NOOBS Disk Paritions

Here is a simple example. When I installed only Raspbian from the NOOBS 1.5 distribution to a microSD card for the Pi Zero, it created the following partitions:

  1. RECOVERY (Primary partition, FAT32, 1.12GB). This is where NOOBS lives and works. It keeps the Raspbian distribution image and the scripts and links necessary to initialize/re-initialize the installation and to download the other available operating systems. When you boot a Raspberry Pi which was installed with NOOBS, this is actually the partition that boots first.
  2. Extended partition. This is created to hold all of the other partitions which will be created for whatever operating systems are chosen for installation, because the standard MBR disk limit of 4 partitions is nowhere near enough for what NOOBS can do.
  3. SETTINGS (Logical partition, ext4, 32MB). This contains NOOBS configuration info for the card -- things like what operating systems are installed where, languages, licenses and such. Note that NOOBS used to keep this as a Primary partition, outside of the extended partition segment where the operating systems are located, but it doesn't seem to do that any more.
  4. BOOT (Logical partition, FAT16, 63MB). Raspbian-specific boot files
  5. ROOT (Logical partition, ext4, variable size). This is the bulk of the operating system. It will usually be created to fill whatever unallocated space is left in the Extended partition.
raspbian.png
Raspbian Disk Partitions

By contrast, when I install from the latest Raspbian jessie image (2015-11-21), the partitions are:

  1. BOOT (Primary partition, FAT16, 60MB)
  2. ROOT (Primary partition, ext4, < 4GB)

The Raspbian distribution image is made so that it will fit on a 4GB SD card, so the root partition is initially 3.6GB. After installation and boot it can easily be extended to fill whatever available space there is on the card, using the Raspberry Pi Configuration utility that I discussed in the previous post.

OK, so I can hear everyone saying "get to the point, Jamie". Fine. The first point here is, if you are trying out a Raspberry Pi Zero as your first Pi system (or first Linux system), then the easiest way to get it working is to use the NOOBS distribution. In fact, the absolute easiest way is to buy an SD card that is preloaded with NOOBS, but even loading one yourself is not a big deal; you just need a PC with an SD card slot and a utility that can unpack a ZIP file.

If you already have some other Raspberry Pi, or other Linux (or Unix) system, and you only want to run one operating system on your new Pi Zero, then you might prefer to use the direct operating system install/boot method. But in this case I have to warn you about one other thing.

The Raspbian downloads page contains images for jessie (based on Debian stable) and wheezy (based on Debian old-stable, the previous release). I believe that only the (new) jessie images include support for the Pi Zero. I haven't seen this actually documented anywhere -- the closest is a comment in the latest release notes which mention "support for Pi Zero". But I have seen comments from some people saying that SD cards from existing Pi systems didn't work in the Pi Zero, and from others saying the opposite, that it worked just fine. My own experience has been that SD cards from a Pi B+ and a Pi 2 both did not work in the Zero, and both were created from the NOOBS 1.4 distribution. When I re-initialised both of them from NOOBS 1.5 (which contains jessie) they both worked in all three Pi systems.

Latest news: I have just tested this, and the above statement is correct. Raspbian wheezy does not boot on the Raspberry Pi Zero, even though the same card boots with no problem on all other Raspberry Pi models.

OK, so far so good? Good. Well, I have to complicate things even more.

I said above that using the NOOBS distribution you can install one or more of a selection of operating systems, not only Raspbian. However, the structure and content of NOOBS changed some time ago. It used to contain installation images for each available operating system. That made the distribution image very large, and it meant that the image had to be updated very frequently because of changes to one or another of the included operating systems. It was not much fun to download (took a long time), and I'm sure it wasn't much fun to maintain.

At some point NOOBS was changed so that the distribution image contained only Raspbian, and then it had scripts and links to download any of the other operating systems only if you chose to install them. This was a major win -- smaller image, less frequent updates, and you always got the latest version of the other operating systems. Good stuff.

But now along comes the Raspberry Pi Zero. One of the biggest differences between it and all previous Raspberry Pi boards is that the Zero doesn't have a wired Ethernet connection. But, to install anything other than Raspbian from NOOBS, you have to download the image, which means you need an internet connection.

unifying.jpg

On top of that, the Zero only has one USB port. If you're installing from NOOBS then you must be booting and installing manually, which means you need a keyboard and mouse. Even if you get very clever with a wireless keyboard/mouse combo that uses the same receiver, you have still used your only USB port.

pihub.jpg

So now, with the Raspberry Pi Zero, you're going to need a USB hub so that you can connect at least a keyboard, mouse and a network interface (either a wi-fi or wired-to-USB dongle).

Which brings me to the next topic: what would I like to see for the first Pi Zero 'bling'?

Now that I have been trying out the Raspberry Pi Zero for a week, which has entailed loading, booting, configuring, testing and shutting down innumerable times, there is one thing I have wished for more than any other: more USB ports, conveniently located and easy to access. In the second post of this series I included a picture of the Pi Zero with a PiHub attached. This is obviously a silly configuration, because the PiHub is actually bigger than the Zero. But the idea is good -- only one power connection, and at least three standard USB ports with power, easily accessible. I am hoping that someone will make a Raspberry Pi Zero case with an integrated USB hub -- the more ports the merrier -- and a single power supply.

Conclusions

Finally, first-week impressions of the Raspberry Pi Zero. First, the speed. If you have never used a Raspberry Pi before, you're likely to think it is extremely slow -- because, comparatively speaking, in most ways it is. But if you've used a Pi before, I think you'll find it to be quite reasonable. It's not a Pi 2, and you notice that right away. But it is noticeably faster than the older Type A/A+/B/B+. As a trivial example, when booting from exactly the same microSD card my Pi Zero takes about 30 seconds from power-on to usable desktop, while my Type B+ takes almost 45 seconds.

I haven't been happy fumbling with so many mini- and micro- connectors, and because my fingers are rather old and getting stiff, I have been constantly afraid that I would damage one of the sockets on the Zero. I assume that once there is a case available that will give some degree of mechanical reinforcement to the cables, as well.

Although it's not specifically a Pi Zero item, the latest Raspbian release is very nice, and has been a pleasure to use on the Pi Zero. The changes in this release are not big, flashy attention-getting things, but they are useful and practical, and have obviously come from people who work with it every day. The software manager and epiphany improvements are very welcome, and actually have me considering giving up on synaptic and midori on the Pi.

One other note about the new Raspbian release and the Pi Zero: I found the answer to the question I asked in the previous post about overclocking the CPU. In a comment on the Pi Blog about the new Raspbian release, Simon Long explains that it's not possible to overclock the Pi Zero CPU, and this setting in the configuration should be left on None. Setting it to anything else will actually slow down the Zero.

The bottom line is that I like the Raspberry Pi Zero a lot. It's certainly not a general-purpose replacement for any of the other Raspberry Pi models, but it isn't intended to be. But I can think of lots of specific situations where I would be happy with the smaller, simpler and lower-cost Zero than with the other models -- education, development, monitoring, some kinds of household servers, and more.

I still haven't even tested the Pi Zero with openElec or OSMC, so I will probably do that next, when I have some time. For now I need to get back to work on the Customizing Linux Desktops series. In fact, that's a perfect example of where I can use the Zero -- it will be the system that I use as an example for the LXDE desktop.

Read more on the Raspberry Pi Zero