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

    [table id=1 column_widths=”80%|20%”/]

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:

    [table id=2 column_widths=”80%|20%”/]

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:

    [table id=4 column_widths=”80%|20%”/]
    This short video shows the setup:
      [embedyt] http://www.youtube.com/watch?v=K-uEMneP6Uo[/embedyt]

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:

    [table id=5 column_widths=”50%|50%”/]

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:

 

    [table id=6 column_widths=”50%|50%”/]

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

cd /etc/network/

make a copy of the interfaces files for your records:

sudo cp interface interfaces_orig

open the interfaces file using following command:

sudo nano interface

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

auto lo
iface lo inet loopback

iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet static
        address 192.168.1.131
        netmask 255.255.255.0
        gateway 10.1.1.1
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

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:

/etc/wpa_supplicant/wpa_supplicant.conf

Make the content of this file resemble the following:

country=us
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="Your-Router-Name"
psk="Your-Router-Password"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}

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.