Raspberry Pi Zero W Page

Have been playing with my new Raspberry Pi Zero trying to get it to work. Note that a lot of these pages may/or may not become old over time, but these are just VERIFIED notes for setting up a Pi ZERO W (I’ve found that a lot of the documentation is kind of sparse specifically for the PI Zero W variant).

pizw


IMPORTANT

If you follow the instructions here you will get the specified result. So read what the result is first, ok? All of it is VERIFIED (as in I have done it personally myself so I can vouch that it works, instead of what most people on the Inet seem to do: just comment generally on stuff, accuracy and efficacy be damned.)

Also are some safety procedures that are rarely mentioned that IMO are critical to over-all success with the PiZW.


 

Q: What is a Raspberry Pi Zero?

A: Its the inexpensive version of the Raspberry Foundation’s Raspberry PI line of SBC’s (Small Board Computers). A Pi Zero comes stock with the following specs:

1GHz, Single-core CPU
512MB RAM
Mini-HDMI port
Micro-USB OTG port
Micro-USB power
HAT-compatible 40-pin header
Composite video and reset headers
CSI camera connector (v1.3 only)

How I connect set it up currently (and this can change) is I connect it directly to my Windows 10 PC via USB-to-MicroUSB cable and run in tethered mode (does it have an actual tethered mode? Don’t know yet, but my USB ports supply a nice stady +5VDC, I can tell.)

IMPORTANT: Virtually impossible to find and DEFINITELY not for the marketed $5 price. I got mine from Ebay for like $25 (free shipping) so not sure what’s going to be said about them generally. Even though an S-Type Corp, the R-Pi Foundation seems to have some “issues” dealing with prices and opportunism.

Q: What is the difference between a PI Zero and the Zero W variant?

A: As far as I can tell right now just a swapping out its Ethernet connection with a Wifi chipset. I’m thinking the actual antenna is the shiny chip (a “chip antenna” but don’t quote me on this).

Introduction to the Raspberry Pi Zero W : Ok a lot of good information here but a lot of FILLER in it especially regarding the installation procedure. My point is any flavor of Windows can format FAT32 (so no need to flout 3rd party and open-source for stuff your PC can already do stock).

Q: How do I get my Raspberry Pi Zero W operational?

A: Here is the fastest, most reliable procedure that will get its boot light to come on (Pi ZW’s don’t have a Power LED, but will light up when booting…truly booting as in a functioning operating system or installer, like NOOBS, actively loading within it. So looks as dead as a door-nail until you do a BUNCH of stuff to get it prepared right…this is normal).

Here is the procedure I used to get it to the NOOBS-loaded stage. NOOBS (or New Out-of-the-Box Software) is the official OS loader for the PiZW so I would recommend using that (available from the R-Pi Foundation at: https://www.raspberrypi.org/downloads/noobs/ ). It has Raspberian in it (a Pi-optimized distribution of Debian UN*X).

A lot of the tutorials out there either expect you to be a stone UN*X guru or treat you like you’ve never even touched a keyboard before. This is a nice procedure for the average computer user.

How you get it prepped is you do the following operations to a MicroSD card that you then slip it into the SD card holder on the PiZW, and apply power.

 1. Format MicroSD card to FAT32

 2. Copy NOOBS files over to the SD Card

 3. Insert card into PiZW and apply power

The PiZW only understands FAT32 file system, so what you have to do is format a MicroSD card for FAT32. FAT32 is an older standard (different from let’s say NTFS) but a standard. With this said, it DOESN’T matter HOW you format it this way (as it is…a standard).

“Wait, wait, wait” I hear you saying. “I heard I had to use Win32DiskImager and a *.img file to do this.” On a PiZW you don’t (seriously); they have it set up nicely this time that it uses the file system purely to allow installation without even having to make the SD card “bootable”. Hense this section on how to do it (its a lot different I understand than older installation procedures with other Pi’s).

What you do is download the current NOOBS ZIP file (I believe the current version is 2.3 or “2_3_0” from here https://www.raspberrypi.org/downloads/noobs/) and extract it to your Windows computer or tablet. You extract the files from the ZIP file to a new directory.

Next you format/partition the SD card to FAT32.

IMPORTANT: what a lot of people don’t tell you is that a lot of inexpensive (and expensive) devices out there require the presence of the DCIM directory in the root of the MicroSD Card in order for the card to be detected/used. While this is somewhat contrary to the UN*X understanding, I believe you SHOULD leave the DCIM directory there to avoid “bricking” the MicroSD for other devices. So right after formatting, create a new DCIM directory if its not there already.

So how do I format the SD card? Million ways to do it either with Windows or a 3rd Party program. What you do is make sure that the card mounts to a drive letter on your PC (or filesystem on an Android) and then invoke your formatter. You want a nice large single FAT32-formated partition when you are done.

Don’t use an excessively large card as FAT32 maxes out at some large gigabyte value (an 8GB would be more than sufficient, I’m thinking).

So you have your card formated/partitioned to FAT32 so all you do is take your NOOBS files (that you extracted to its own directory before hand) and copy them verbatim to the root of the MicroSD card. IMPORTANT: not the NOOBS_2_3_0 directory itself, your root on your card should have a few directories and a bunch of files hanging out in the wind. Don’t do this and it won’t boot.

Rational: I’ve read up on a lot on the bootloading processes on various computers, so I was surprised at the lack of loaders (boot sectors, boot images, etc. etc.) and the like. If I had to guess the PiZW is set up with a tiny bootstrap loader internally (like in ROM) that looks for the *.BIN files in the SD card’s toot directory and executes those to perform an actual boot. I’m guessing here but that is really THE way to do something like this (ie. run it directly from the filesystem) so I’m glad they got it right with the Pi Zero.

Insert the card and power up headless (ie. just power, no keyboard or monitor) for now. If you got it right, you’ll notice the boot light blinking. What we were looking for to begin with (as it really does look like a dead soldier when you originally plug it into power or USB).

Q: “Ok…so NOOBS is my Operating System right?”

A: No. NOOBS is the installer for the OS which is Raspian (Debian Linux).

The previous procedure was just to get you to the point where the board shows you some feedback (in this case the boot LED flickering) so you don’t worry that you got hustled on eBay for a dead board.

If you are using your PiZW in the standard mode, you now have enough on your board to finish the installation procedure for the OS. You just let it boot and the following pops up (assuming you have your keyboard and mouse hooked up to a USB hub, then connected to the board AND the HDMI monitor attached…all powered):

os-selector-1024x766

I’ll have to check if the data files for Raspian is in NOOBS (or if you have to configure your USB or Wifi to connect to your broadband to get the required files…I’ll check over the next few days and continue writing here).

At this window, select Rasbian and hit the Install button. Follow instructions until you have it set up.

The trick from what I understand is a systems administration task that you basically modify various configuration files until you get your little board connecting to your cable/DSL router, the usernames and passwords all set up…what most people are looking to do with it. Just dinking with it, having fun, learning UN*X.

“HEADLESS”

I tend to use my SBC’s “headless” (by telnet-ing into them, as opposed to putting on a monitor and keyboard) and there are procedures to finishing the installation process, called “silent install” that you can do from shell.

On a side note, when you factor in the mouse, the keyboard, the USB Hub to make them work, power supply and the monitor, its almost the same price as a regular computer, so it makes more sense, I think, to use them as a small, powerful IoT device than to try to turn them into a naked Chromebook.

I’m planning on using my PiZW as a brain for an advanced drone or robot. The direction I’m working towards.

Q: Why NOOBS instead of directly installing from Raspian.Org?

A: My rational was my focus. I’m not big into sys admin stuff but want a working board to program with.

A lot of people are into the sys admin side of it (tweaking and working with configuration files, custom OS builds, etc. etc) but I just wanted my board working as fast as humanly possible so I can start programming and integrating circuitry. It really depends on what you consider fun is my point.

If you use NOOBS, its a linear process. This procedure will work every time with a minimum of fuss. Some people like the fuss. I don’t.

Q: Are ESD (Electrostatic Discharge) procedures important?

A: Oh GOD yes! It makes my skin crawl how many tutorials have the person plugging directly into an exposed board. I’ve had so many motherboards go south on me with static electrical shocks over the years. I’m sure the PiZW is no exception.

Here is a picture of my set-up:

PICT0001

You will notice I’m not fanatic about ESD (like “Hey, where is the ESD on this?”….I’ll explain). When messing with a board like this, you just don’t want to be touching it all the time. A cold day, thick carpet and all of a sudden you can’t get it to do anything. You just want to STOP touching it all the time.

It doesn’t require much: see here that all I did was rat belt it to an old tackle box (with some standoffs so I could get the USB cable plugged into it). When ever I plug in stuff I just touch the large amount of grounded metal on the MicroSD card connector (this makes me and the board electrically neutral) and manipulate it by grabbing the tackle box NOT the board itself.

When you are finished experimenting, just get a case for it and not worry about ESD ever again.

Q: How does the unpopulated GPIO “pins” work…I mean in real life?

A: Forget “HAT” or whatever they call it. Its JUST 0.1″ header (States-side…Pi’s are British btw). What I would do is just break it out with 0.1″ header pins (available for just pennies on Mouser or Digikey). http://www.mouser.com/ds/2/1/ts0766-242217.pdf

NOTE: Check if the British HAT spec is IDENTICAL to USA 0.1″ header first! (unverified)

HOWEVER, I have heard that you can get the female version that’s also solderable like its “male” counterpart for a reasonable price. With the female you can poke connecting wires directly into it. Big plus. http://www.mouser.com/ds/2/1/TS2187-335945.pdf

You just heat up your soldering iron, insert the pins, and solder each pad carefully. Its easy.

Q: “I DON’T have a MicroSD slot on my computer.”

A: Chances are you have something around the house that does. I thought this too for a few minutes but then I realized I could do it on my web cam. When you plug a card in, it works like a flash drive. I found I could even format it over my web cam (W-O-W).

Then I got tired of that and remembered that, low and behold, I had a slot on my Windows 10 tablet. So I could use the formatter in Windows itself. Just ask Cortina the word “partition” and the format program is shown.

Can I do it on my Android? Err, yeah, FAT32 is a standard (so it doesn’t matter which platform you do it on) and you can even copy the files over on an Android. You might have to hunt for some 3rd-party apps to do it, but it WILL do it.

Q: “Where should I get a good MicroSD card?”

A: I got mine down at the dollar store ($10 for a 8Gb SanDisk). I would recommend a brand name but also think going to a photography store is a little overkill. I would be careful of really low prices on places like Ebay though.

 


 

Q: What can you do with a Raspberry Pi Zero W?

A: Since its wireless, you can set one in “hotspot” mode, set up an FTP server on the master, and use it as a centralized location to store communication files, perfect for a low-speed IoT solution.

…Ot you can direct each to your broadband router and communicate via TCP/IP packets (ie. with UN*X sockets they are called) directly to each other in a P2P mode.

With the integration of an “embedded” web server (Mongoose Meerkat being typical) you can also have web interfaces with it (intranet style).

You can configure and use the various pins on the GPIO header to communicate with Arduinos, PIC chips, sensors, relay boards, other Pi’s and Beagleboards and even PC’s to build robots, drones, home automation controllers and the like.

 

x-black-drone-quadcopter-3d-model-animated-sldprt-sldasm-slddrw

 


 

Select-Based Socket Client/Server for SBC’s for IoT : ever wanted to know how to set up a networked IoT solution (commercial/industrial sensing and control, home automation, security system) based on inexpensive powerful SBC’s (small-board computers) working together either wired (Ethernet) or wireless (Wifi).

This document contains the C source code (and compile/link instructions) necessary to set up such a system with linear, procedural code on a UN*X SBC’s and/or PC’s.


 

 

 

 

Advertisements