Everything for Electronics

Tech Forum





June 2016

Wi-Fi For The Pi

Could someone please tell me if the ESP8266.01 module is compatible with the Raspberry Pi? And/or where can I find a Wi-Fi and GPS module that are?

#6162
Timothy Harner
via email



Answers

There is an instructable on how to use the ESP8266 with the Raspberry Pi  at www.instructables.com/id/Connect-an-ESP8266. However, I don't recommend that you use it because it communicates over the hardware UART. This will result in an extremely slow 115kbps Internet connection, about 1/100th of the speed of a typical 10mbps cable system connection. It will also tie up the UART which you will need for the GPS.

If you have a Raspberry Pi model 3, you do not need to add a Wi-Fi adapter at all since one is already built into the board. Use a version of Raspbian dated March 2016 or later to avoid driver issues. For older boards the simplest solution for Wi-fi is to use a small USB adapter. I have had success with the Edimax EW-7811Un, available from Amazon and others for $9. It supports 802.11b/g/n up to 150mbps and it's supported by any recent version of Raspbian.

GPS is also straightforward. Most receivers use a simple async serial port and are pre-configured to transfer data at 4800 bps, no parity, 8 data bits, 1 stop bit though this can be overridden in software. Data is transferred using the NMEA (National Marine Electronics Association) protocol. Google "GPS protocol specification" for information about this text-only protocol made up of 'sentences' that are easily parsed to get time and location information. If you are technically adept you can get a ublox NEO-6M or similar 3.3 volt serial GPS module for around $15 from eBay or Amazon and wire it to the serial port. Using the 26/40 pin I/O connector port, 3.3V power is on pin 1, ground on pin 6, Tx on pin 8, and Rx on pin 10.

A more expensive, but beginner-friendly solution, is to use an extender board known as a HAT that requires no hardware interfacing. One such HAT is the "Adafruit Ultimate GPS HAT for the Raspberry Pi", adafruit.com product #2324. This board includes a GPS receiver, internal antenna, Real Time Clock (RTC), and a holder for a CR1220 RTC backup battery. It also has a U.FL connector for an optional external antenna. This will only work with an original or model 2 Pi as changes to the hardware in the model 3 has made it incompatible with this HAT, at least for now. The original Pi and model 2 Pi work fine. This limitation likely exists with other GPS HATs. If you have a model 3 make sure the GPS HAT mfg. specifically claims support for it before you buy.

Mark Lewus
Denville, NJ