Our website is made possible by displaying online advertisements to our visitors. Please consider supporting us by disabling your ad blocker.

Three Simple Ways To Get Online With A Raspberry Pi Zero IoT Device

TwitterFacebookRedditLinkedInHacker News

As you know from the guides that I put out, I’m a Raspberry Pi collector. I collect the full size units as well as the Pi Zero units. In a previous post I explained how to emulate ethernet over a USB as a way to connect to a Pi Zero that is not using WiFi or ethernet. However, what happens when you decide you’re at a point where you’d like to bring your Pi Zero online?

I’m going to show you three quick, easy, and cheap ways to get WiFi internet on your Raspberry Pi Zero IoT device, none of which will require any soldering or advanced hardware knowledge.

In all scenarios listed, you’ll need a USB WiFi dongle. These dongles can be picked up for around $5.00 on Amazon, so don’t worry as it won’t make you poor.

Using a USB On the Go (OTG) Cable with WiFi Dongle

Using an OTG USB female to male micro USB cable is probably one of the most common methods for getting internet access to your Pi Zero. The reason why I think this is the most common way is because OTG cables are commonly used for adding USB ports to Android tablets and smartphones. In other words, these cables are not hard to come by.

Pi Zero OTG Cable

The above pictures demonstrate a setup that would work.

Assuming that your Raspbian Linux installation is configured towards your wireless network, plugging the USB WiFI dongle into the OTG cable, then the cable into your Pi Zero should result in internet access.

The OTG cable I have and the one used in my picture can be purchased from Amazon for ~$2.00.

The thing I don’t like about the above approach, and it is personal preference, is that now you have more cables coming out of your tiny IoT device. I personally like to keep it small and consolidated. That is where the next approach comes into play.

Using an On the Go (OTG) Adapter with WiFi Dongle

Just like with OTG cables, there are OTG adapters which really cut down on the mess surrounding your Pi Zero. While a little less common than the cable form, these adapters are still a valid option.

Pi Zero OTG Adapter

You can see from the above pictures that the OTG adapter is only slightly larger than a small coin and it plugs into the data port on the Pi Zero.

Just like with the OTG cable alternative, you’ll need WiFi already configured in your Raspbian installation before the adapter becomes useful. After all, how will it know which network to connect to on a fresh installation.

The OTG adapter I have and the one used in my picture can be purchased from Amazon as a pack of five for ~$4.00.

Using a Zero4U Accessory Board

I find this next approach to be a more interesting approach. As interesting as you can get without actually soldering components onto the Raspberry Pi itself. There is an accessory called a Zero4U made by UUGear which acts as a USB hub for the Pi Zero. It connects to the Pi Zero via pogo pins that provide it power and data transfer.

Pi Zero Zero4U

As you can see in the above pictures, the Zero4U is attached to the Pi Zero via screws. When assembled, the whole thing is rather sturdy.

The Zero4U that I have was purchased from The Pi Hut for ~$13.00.

There is something very important to note if using the Zero4U approach. If you’ve configured your Pi Zero to emulate ethernet over USB as explained in my previous tutorial, you’ll have to disable it in order to use the Zero4U hub. I found this out the hard way. Apparently there are two different USB modes, one for recognizing USB hubs and one for OTG type activities. While the USB WiFi will work fine regardless of mode, the hub will not. Luckily, the process to remove emulation is as easy as editing two files.

Conclusion

You just saw three trivial ways to get a WiFi adapter working on a Pi Zero that by default has limited USB ports. All three are good solutions and in the end, it comes down to preference. As of right now I have two Pi Zero devices where one of them uses the Zero4U and the other uses the OTG adapter. When I’m brave enough, I will try to solder a WiFi chip instead.

Nic Raboy

Nic Raboy

Nic Raboy is an advocate of modern web and mobile development technologies. He has experience in C#, JavaScript, Golang and a variety of frameworks such as Angular, NativeScript, and Unity. Nic writes about his development experiences related to making web and mobile development easier to understand.