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 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.
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.
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.
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.
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.
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.
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.