img_0648
You got an idea for a neat electronic device or invention? It might allow you to start your own company (if you don’t already have one)? But then, adding all the hardware costs could it be really sold for an acceptable price? Could you ever compete with Asian suppliers?

Well – you can with the Raspberry Pi zero. With this $5 computer you can build some intelligent hardware that can process images, be a controller for any IoT (Internet of Things) device, be the brains for a robot or drone or as many other things you can think of.

The Raspberry Pi zero is very bear-bone, so you will need to purchase a few things so it can work as a controller computer. A basic system would consist of

  1. Raspberry Pi Zero (e.g. from Adafruit) for $5
  2. pi
  3. A power supply such as this one for $8.99
  4.  power
  5. A WiFi adapter for wireless connection such as this one for $8.99
  6. edimax
  7. USB to micro USB adapter such as this one for $4.99
  8.  adapter
  9. A Micro SD card on which the operating system and your control software will be installed such as this one  for $12.20
  10. -- You probably will need also an adapter that fits into your PC's slot, so make sure the Micro SD comes with one.
    sd

which is almost $40.20 (before taxes). This is the basic system cost if you want to build this computer into a “closed” system. You will need additional wires e.g. to connect to the GPIOs of the Raspberry Pi Zero or you use a USB cable to communicate with other parts of your system.

Normally you will need also a monitor, a keyboard and a mouse. But it would be great if could skip this bulky and costly hardware and instead use your laptop or PC to setup and configure your Raspberry Pi Zero for your amazing invention. Fortunately you can do this. For the here proposed method to set the Raspberry Pi zero up you still need:

  1. A USB+Ethernet to micro USB adapter. I liked to order one that has also USB ports and can be powered such as this one for $15.89 
  2. connctor1
  3. An Ethernet cable such as this one for $8.98 
  4. ethernet

So what do you have to do to install your Raspberry Pi Zero with just the minimum hardware as listed above?

First Step: Installation of the Linux OS Raspbian Jessy

Download the zip file from the Raspberry Pi website and extract it. From my experience the most reliable extracting software is WinZip and 7-Zip. I had with others the experience that they would not extract everything. After extraction you should see one “image” file ending in “.img”.

The following steps for the installation of the operating system (OS) on a micro SD card are very standard for Microprocessors with OS:

  1. Take your micro SD card, put it in the adapter so it fits in your PC's SD slot and insert it into your PC.
  2. img_0652
  3. You can use for example SDFormatter to format your SD card so it is clean and ready for installation of the OS image.
  4. sdformatter
  5. To write the image file in the right way on the SD card you need a tool such as Win32Diskimager. Make sure you deselect promotion software that they try to install on your system.
  6. win32
  7. Connect the "USB+Ethernet to micro USB" adapter to your Raspberry Pi.
  8. img_0650-copy
  9. Take your ethernet cable connect one end to the adapter from 4. and the other end to one of the ports of your router. If you purchased the ethernet cable I listed above it should be long enough to reach far.
  10. img_0649
  11. Insert your SD card into your Raspberry pi.
  12. img_0648
  13. Connect your Raspberry Pi to your power adapter.
  14. power
    This short video shows the setup:

Second Step: Finding the Ethernet Address

At this point give the Raspberry Pi about one minute time to boot up – not having the Pi connected to a monitor you can’t see when the boot-up is done. In the previous step 5 we connected the Raspberry Pi over a long Ethernet cable to the Router. Note that the Raspberry Pi Zero is not yet connected to the Router by WiFi and hence has no WiFi address. At this point we need a browser to get from the router the address of the Raspberry Pi zero. These steps work:

  1. Type in the address of the router to log into the router system. The address for my router is 192.168.1.1 as shown in below screen-shot - your's might be similar.
  2. router
  3. Log in or make an account and then log in. My router shows following screen after login:
  4. router2
  5. Your's might look somewhat different but here I can choose "Network Map" to see visually which computers are connected (over WiFi or Ethernet) to the router, as shown in this picture. Note your Raspbery Pi Zero has at this time a symbol resembling the Ethernet connector (and not the WiFi symbol).
  6. router7
  7. Klicking now on the device with the name of your Raspberry Pi - which at this point should just be "raspberrypi" a menu pops up where you can choose "device"
  8. router4
  9. Clicking on "devices" opens up another window that shows the IP Address for the Ethernet connection.
  10. router5

Third Step: Basic Configuration

Knowing the Ethernet (eth0) address of your Raspberry Pi Zero allows you to log into the Raspberry Pi for the first time. The most common method to log remotely into the Raspberry Pi is by using PuTTy following these steps:

 

  1. Download and install Putty.
  2. putty1
  3. Start Putty.
  4. putty2
  5. Type in field "Host Name (or IP Address)" the IP Address for the Ethernet that you got from your Router (here e.g. 192.168.1.147)
  6. putty3
  7. After clicking ok you will generally see a security window which you can close with an OK. Then the terminal opens where you are logged into your Raspberry pi. The default login is pi and the default password is raspberry.
  8. putty4
  9. Now finally you can start configuring your Raspberry Pi Zero. There is much documentation on that online e.g. here. Don't forget to activate SSH.
  10. putty5

Fourth Step: Configuration of the WiFi Access

Now finally comes the step which allows you to connect wireless to the Raspberry Pi Zero (if you activated SSH in the last step). In the terminal you opened with PuTTy first change into the network folder with

make a copy of the interfaces files for your records:

open the interfaces file using following command:

“Sudo” gives you power-user privileges to modify and save the file.
Modify the content of interface to resemble the following:

Here you can choose any number for the digits after the last point, besides numbers that you are already using – such as e.g. the 1 that is reserved for your router. Go through the IP addresses of all the devices in your network as shown above (“Network Map”) and make sure you are not giving your Raspberry Pi Zero an address that is already in use.

Now open up the file wpa_supplicant.conf where the name and password to your WiFi are saved:

Make the content of this file resemble the following:

Please replace here Your-Router-Name and Your-Router-Password with the corresponding name and password for our router.

After this step you are ready to log into your Raspberry Pi Zero wireless using your static WiFi address. Just open up PuTTy again and type in the address you chose earlier (here 192.168.1.131) and you should be able to login without using any tether.
You are ready to build in Pi-Intelligence into your new invention.

As usual, I am looking forward to any comments and discussions. Please use the form below.