Add easy wifi connectivity to your Teensy 3.2Designed by Pesky Products in United States of America
What is it? This is a small (18 mm x 15 mm) board with Espressif's ESP8285 SoC with Tensilica's Xtensa 32-bit, 80 MHz low-power processor and an integrated wifi engine (integrated TCP/IP stack) tha...Read More…
This is a small (18 mm x 15 mm) board with Espressif's ESP8285 SoC with Tensilica's Xtensa 32-bit, 80 MHz low-power processor and an integrated wifi engine (integrated TCP/IP stack) that is designed to mount directly onto the Teensy 3.2 and use the Teensy UART Serial2 port to provide wireless communication to any Teensy-based project.
I redesigned the board to make use of the ESP8285, which is the same as the ESP8266 but has 1 MByte of SPI flash embedded in the package. This makes it easier to assemble and offers all of the same capability as the previous ESP8266 + external SPI flash version.
I designed this board without an LDO voltage regulator since Teensy 3.2 already has enough current to support operation of this device. It won't work on Teensy 3.1 since to start wifi operations requires current of >200 mA during transmission. 3V3, GND, RX2 and TX2 line up with the corresponding pins at the non-USB end of the Teensy 3.2; this way the board may be mounted directly onto the Teensy 3.2 for the most compact package.
Of course, you can also use this on a breadboard and connect it to any microcontroller, but there are many cheaper alternatives for the ESP8266. It's true, these alternatives tend to be large and not the appallingly small size of this ESP8285 board. Even though this board is designed as a Teensy 3.2 add-on you still might find it useful off the Teensy if space is at a premium and your project can benefit from a very small-sized wifi solution. I have broken out all of the GPIO pins of the ESP8285 except the ADC and RTC_OUT (not sure what this does). As a standalone board, this means you can have a UART port and an I2C port (I use GPIO 0 and 2 since they already have 4K7 pullups) and still have seven GPIOs left over which can be used to access PWM, SPI, or even an I2S peripheral. There's a lot of versatility available on this very small board! You will need an external power source able to supply 3V3 to the board with at least 300 mA.
There are lots of ways to make use of the ESP8285 add-on, but two basic modes when attached to the Teensy 3.2:
You can load Espressif's latest firmware which supports the AT protocol so that AT commands entered on the Serial monitor are sent to the Teensy 3.2, relayed to the ESP8285 add-on via Serial2 and the response sent back. There is a simple Teensy sketch that enables this once the Espressif firmware is loaded onto the ESP8285 that can be found here.
There is also a nice Arduino core written for the ESP8266 allowing the Arduino IDE to be used to program the ESP8285 add-on. I have a repository of Arduino sketches showing how to use the ESP8285 as a stand-alone microcontroller. You can get some idea how to configure the add-on for other more interesting uses in concert with the Teensy. There is a sketch showing how to use the ESP8285 to manage sensors and read their data. The data is then sent to both the serial monitor and a web server where it can be displayed on the local network. This is a bare bones example of how to use the ESP8285 as a microcontroller to manage sensors and as a wifi server. The full capability of the ESP8266 Arduino IDE is discussed here. The ESP8285 is a remarkably versatile device by itself; it is even more useful when combined with a Teensy 3.2.
There is a nice example by Greg Tomasch of using an Arduino sketch to create an ESP8285 wifi bridge between a host MCU (in this case the STM32L4 but the sketch can be easily modified for the Teensy 3.2) and another ESP8285 used as a laptop dongle. This allows data read by the Teensy 3.2 to be sent to your laptop with very little fuss.
It might even be possible to use the ESP8285 add-on to update the Teensy flash over-the-air, but I haven't heard of anyone succeeding in doing this yet. Maybe you will be the first and tell us all how to do it!
Espressif hosts an ESP8266 forum with a lot of information about how to use this powerful device.
How do I program the ESP8285 Add-On?
First of all, when you get your ESP8285 add-on you will have to solder on a 1.25-inch-long 24-gauge insulated copper wire to the through-hole at the top left corner of the board to serve as the antenna. But before you solder the module itself to anything please use the breadboard and hooked test leads to program, connect and get an idea of how you intend to use the add-on.
Just to be sure you got that:
DO NOT SOLDER YOUR ESP8285 ADD-ON TO THE TEENSY 3.2 UNTIL YOU ARE SURE HOW YOU ARE GOING TO USE IT AND IT IS PROPERLY PROGRAMMED.
Now, the add-on is designed to mount directly onto the Teensy 3.2, taking its power and GND from the top edge and using Serial2. You can mount the add-on on top of the Teensy 3.2 or on the bottom of the Teensy 3.2, but there is really only one way it can fit without a lot of wire.
In order to program the ESP8285 you will need to use an FTDI connector with FTDI GND, TX, and RX connected to ESP8252 add-on GND, TX2 (top silkscreen), and RX2(top silkscreen). If you are looking at the bottom of the add-on, then connect the FTDI GND, RX, and TX to ESP8285 add-on GND, TX, and RX. In general, the FTDI connector does not have enough current capability to allow the ESP8285 add-on to properly run, so connect 3V3 from the Teensy 3.2 and GND to the 3V3 and GND of the ESP8285 add-on (see why this ought to be done at least the first time on a breadboard?).
Now, finally, before you connect the three devices to power, GPIO 0 of the ESP8285 add-on must be connected to GND so that when the ESP8285 powers up it will enter boot mode and allow for flashing of a new program via the FTDI connector. So connect GPIO 0 to GND, power up the ESP8285 and Teensy 3.2 and connect the FTDI.
In the Arduino IDE, select Generic ESP8285 module, compile and flash whatever program you want and you can read the serial output coming through the FTDI connector to make sure everything is OK.
Flashing new sketches this way is not very convenient, but it is the way to be sure you understand how to program the ESP8285 add-on. Once you understand how to do this, you can think about soldering the add-on to your Teensy 3.2 (or using female headers so it can be removed without destroying either the add-on or the Teensy 3.2). GPIO 0 is conveniently on the back edge of the add-on, so you can use a wire jumper to tie this pin to GND when you want to program the ESP8285 add-on. If you use female headers, or leave enough space for attaching hooked test leads to Teensy 3.2 Serial2, you should be able to reprogram the ESP8285 add-on without ever removing it from the Teensy 3.2 You will have to think this through, since there are a lot of possibilities.
Why did you make it?
The Teensy is a great platform for prototyping but it lacks connectivity. I wanted to take advantage of the inexpensive ESP8266 and all of the development work going on around this chip and provide a means to get easy wifi connectivity for my Teensy-based projects. I still have a lot to learn about how best to use the ESP8285, but I was able to produce a web page using the Teensy to construct the content and the ESP8285 to send it to the web. This is exactly the kind of capability I am after. I want to be able to use the Teensy to read sensors or process sensor data, and send the results to a web server or smart phone. The ESP8285 makes this a piece of cake, and this small ESP8285 add-on makes it convenient to do this for all Teensy-based projects!
Additionally, the ESP8285 add-on has several GPIO pins available providing additonal peripheral ports to augment those of the Teensy. These include RTS/CTS for UART with flow control, an SPI peripheral, and an I2C peripheral capability. The ESP8285 even has an I2S audio port!. Providing Teensy-based projects with an additional SPI port might be possible to augment the one and only hardware SPI port available on the Teensy 3.2. This would require having the ESP8266 manage the SPI communications but then report them to the Teensy via serial2, or maybe just send the data to a server via wifi. I am not sure how best to use the extra GPIOs made available by the ESP8285 add-on but someone is going to be tempted to do so in their Teensy-based project.
Lastly, the ESP8285 can provide an over-the-air program update for the Teensy 3.2 itself. The idea is to use the wifi connectivity provided by the ESP8285 to allow Teensy reprogramming without having to connect a USB cable! Over-the-air Teensy programming...now that would be useful!
What makes it special?
It is small, designed to mount right onto the Teensy 3.2, which provides enough current to run the wifi engine at full speed. In my limited testing I was getting -50 dBm at my desk 20 feet away from the wifi router in my house. I've done away with the pcb antenna and replaced it with a through-hole for a wire. I did some simple testing comparing a pcb antenna, ceramic chip antenna, and a wire antenna using the RSSI reported by the ESP8266 itself and I got the best reception (strongest signal) with a wire either clipped or soldered onto the add-on. This is great because it allows a smaller and cheaper board as well as the most compact application solution. The board comes without the wire antenna so you will have to solder on your own 1.25-inch-long wire. I recommend stranded 24 or 26 gauge copper wire, but almost anything will do. The ESP8266 is very forgiving in the RF realm.
This ESP8285 add-on is not as cheap as the ESP8266 modules you can buy elsewhere on Tindie or on ebay, etc. If you don't care how much wire it takes to connect to your Teensy, don't buy this ESP8285 add-on board, you'll be paying too much! However, if you want a compact wifi solution to your Teensy 3.2-based connectivity problems, with all of the ESP8285 GPIOs broken out, this is the add-on for you.
Order the board from OSH Park and assemble your own ESP8285 add-on, or buy the fully assembled and tested board from me and see how easy it is to add wifi connectivity to your Teensy-based projects!
|Shipping Rate||Ships From||First item||Additional items|
United States Postal Service: Standard Ground Rate with tracking
United States Postal Service: Priority Mail with tracking
Priority mail for faster delivery only available within the US.
Harry | June 11, 2017
Robert | Oct. 3, 2016
We recognize our top users by making them a Tindarian. Tindarians have access to secret & unreleased features.
We look for the most active & best members of the Tindie community, and invite them to join. There isn't a selection process or form to fill out. The only way to become a Tindarian is by being a nice & active member of the Tindie community!