Saturday, June 20, 2015

Comparing Microcontroller + Wifi Breakout Boards

There was a large interest in last week's post on WiFi solutions for microcontrollers.  These days Makers are often looking to choose development boards that contain both a microcontroller and a WiFi transceiver. There are many benefits:

  • The solution is pre-made and debugged - ready for integrating into a project
  • Size is often smaller
  • FCC certification is most often done for the module
  • Often cost is lower than separate WiFi and microcontroller breakout boards
With that, here is the comparison:
For a larger view, click here
and here are the caveats:
  1. The data is gathered via the whole web and the web is often wrong, so don't take every value as fact, use it as a value which you can check if interested.
  2. Some of the prices have a "+" next to them - those boards require additional circuit boards with breakout capabilities, power, etc.
  3. Some boards are due out in the next 3 months, noted in "Availability"
  4. Some values are not clear from manufacturer data, so the values may be from components or left as unknown.
  5. Prices can vary, they are retail prices and probably have shipping, taxes, etc.  For the ESP-12, they are available from eBay to retailers, the amount of Flash memory may vary depending on how they were manufactured.  Also FCC markings may or may not be valid depending on manufacturing to the tested configuration.  Companies using ESP8266 modules generally buy FCC compliant subsystems.
  6. Wireless boards that do not have 802.11 b/g/... WiFi were not compared.  That would be for a separate comparison.
  7. All boards were TCP and UDP capable (as far as I saw) and can do Client and Server duties so I didn't compare those characteristics.
  8. The data may change over time (especially price), and additional boards will become popular.
I didn't add the ESP8266 ESP-01 module to this list although it qualifies.  See last week's post and use the ESP-12 values with only 2 GPIO, no analog pin and costing a bit less.

I didn't add every board on the market.  I am trying to keep the list to popular and commonly available boards.  You can use the table to compare features with other manufacturer's boards.

Thoughts


I am very happy that we are not stuck with the status quo of 3 years ago, where adding a WiFi capability to a microcontroller board costs over $75.  Manufacturers know that the Internet of Things really needs small, low cost, programmable WiFi communications and control devices.

Some of these solutions have very good cloud infrastructures provided by the manufacturers to program and communicate.  These may help overcome the learning curve for programming and/or it may provide easier methods for Internet communication.  The downside could be if the manufacturer decides to leave the product, the web service could close.  

As for Arduino IDE programmable capability, this is as of today and is for the arduino.cc versions of the software.  Many boards are billed as "Arduino compatible" but that may be electrically or programmable via a similar language.  Personally I like the ability to take code from existing projects and libraries and use them on a different board.  I recently ported NeoPixel and LED matrix code to the Adafruit Huzzah.

Last


The choice of what product to use is up to you.  Everyone has their top requirements which could be compute power, connectivity. price, etc.  For a large segment of the market, price is a large factor.  Then again size for wearables may be a factor - all these modules are fairly small but may require larger batteries for long life.

If you like these comparisons, leave comments on what else would be good to compare.  And again, if there is an error, leave a comment and I'll look to change the inaccuracy.

Links


Here are primary links to the boards.  Some of the information in the table is from other sources web-wide.

  1. Adafruit Huzzah ESP8266
  2. NodeMCU Version 2
  3. Generic ESP-12 (not E)
  4. Electric Imp imp001
  5. Intel Edison
  6. Particle Core
  7. Particle Photon
  8. WiPy WiPy
  9. Digistump Oak


Sunday, June 14, 2015

Comparing Modern Microcontroller WiFi Solutions



Comparing modern microcontroller WiFi solutions, even in the Internet age, requires a great deal of searching.  So to provide a list of popular microcontroller WiFi transceivers, I compiled the data in the table below.

    Product Info:          Link                  Link                 Link                 Link               Link                Link

Note 1: Also comes in Arduino Shield size with SD card slot for $39.95
Note 2: Adafruit and Sparkfun sell tested units with AT Firmware for $6.95.  eBay prices and quality vary.
Note 3: Adafruit sells tested units with AT Firmware for $6.95.  eBay prices and quality vary.
Note 4: Currents are probably somewhat higher than stock ESP-12 due to onboard LED and regulator.  

The data should be taken as  informative, not authoritative.  I may have not gotten the data 100% correct or comparing some information may not be a one-to-one comparison.  The cost information is in United States dollars - prices in other countries are comparable but may vary.

If there is data that appears incorrect, please leave a comment on the blog and I will see about correcting things.

Why these devices?


I tried to choose the most commonly used WIFi devices today.  There are several smaller manufacturers with WiFi boards and there are devices like the NodeMCU DevKit that implements an ESP-12 board with similar features to the Adafruit Huzzah ESP8266.  Sparkfun also sells a CC3000 board similar to the Adafruit Huzzah CC3000.  So the table does not list all available boards but does have a number of the more popular / different boards.  There are also some WiFi radios in Xbee form factors (one is in the picture, upper right) but use of the Xbee socket has waned in the last two years.

My thoughts


Like many experimenters, I have some criteria and  requirements for specific projects.
  • Price is always a factor, from hobbyists on a budget to groups manufacturing large product quantities.  There are generally three tiers of pricing.  Older modules cost above $70 US.  The CC3000 brought reliable communications down to half that, at about $35.  Then the new ESP8266 based devices have shattered the price points at $10 or less.
  • Software is one of my factors (and I'm sorry it isn't in the table). The Arduino.cc WiFi Shield is a benchmark for many developers for a standard.  I rate Adafruit's CC3000 comparable on use, better on examples - Adafruit's tutorials on device use are very good (I'm biased having written for them some).  The ESP8266 information was pretty poor in the beginning but the number of people experimenting with these modules has generated a great increase in information.  So I rate ESP8266 as still a bit "wild west" but getting better.
  • Usability is a factor for specific projects.  Arduino shield form factors are easier for beginners but typically use more power, are larger, and are convenient only for those boards that have shield sockets.  Smaller boards are much easier to put into finished projects and novel uses such as wearable electronics.  This is a factor for each individual to judge.
  • Power must be considered for battery-operated projects.  Arduino shields do not lend themselves to low power.  The CC3000 has very good power management with one Adafruit tutorial providing excellent information.  Use of ESP8266 in low power modes is possible but standard examples are elusive.
Other criteria you might have are: manufacturability (putting chips into custom solutions), features (does the solution have what I need), etc.

Product lines are continually evolving.  Espressif has two new chips on their website which may lead to more hobby solutions and other companies may be working on new designs.

Lastly


WiFi radios are very useful as many different types of devices, from cell phones to tablets, laptops to desktops, can communicate with these boards.  But most WiFi radio signals do not travel great distances.  They are also not very tolerant to data loss.  Other radio frequency solutions may be better for different applications.  But for ubiquity (finding these everywhere), WiFi is hard to beat.  That and they "speak" the language of the Internet (TCP and UDP), so a project could communicate (via a gateway device) with devices anywhere around the planet.

Saturday, June 13, 2015

ESP8266 Basics and Direction

The ESP8266 has become the price/performance darling of the Maker community.  What is not to like: small size, connectivity, powerful microcontroller.
ESP8266 Modules - the ESP-01 on the left, the ESP-12 module on the right

Well, there are frustrations.  Wiring the modules is not so easy, as pinouts are not breadboard friendly.  The microcontroller is new and not well documented in English, with some information proprietary, yes not Open Source (but processors generally are not fully open).

So what is driving the interest: size and cost.  The ESP-01 module is 14.54 mm x 24.9 mm(about an inch by a bit over half an inch - tiny compared to modules that proceeded it (which did not include a microcontroller).  And the cost of the ESP-01?  $6.95 from Adafruit (flashed with a reliable firmware and tested) down to $2.88 or so on eBay from China.  Compare to a $25 Arduino Uno and a $35 CC3000 wifi module.  A tenth the cost or less and perhaps a tenth the size.

The basic ESP-01 version has limited input/output pins.  Other models,up to the ESP-13 have additional pins of the microcontroller available.  A list of various versions is at www.esp8266.com.

So if you see the connections on the modules above, The ESP-01 has two rows of 4 pins, making it hard to breadboard.  The ESP-12 module has metric pin spacing which does not connect to 0.1 inch breadboard spacing.  What to do?  Various people have various solutions.  On the ESP-12, companies have mounted them to larger 0.1" boards.  From plain carriers on eBay to Adafruit's new Huzzah board.

Power

The following data are based on a 3.3V power supply, ambient temperature 25C and use the internal regulator measured. Data is from https://nurdspace.nl/ESP8266
ModeMinTypicalMaxUnits
802.11b, CCK 1Mbps, POUT=+19.5dBm215mA
802.11b, CCK 11Mbps, POUT=+18.5dBm197mA
802.11g, OFDM 54Mbps, POUT=+16dBm145mA
802.11n, MCS7, POUT =+14dBm135mA
802.11b, packet size of 1024 bytes, -80dBm60mA
802.11b, packet size of 1024 bytes, -70dBm60mA
802.11b, packet size of 1024 bytes, -65dBm62mA
Standby0.9uA
Deep sleep10mA
Saving mode DTIM 11.2mA
Saving mode DTIM 30.86mA
Shutdown0.5uA
The units should never be powered off more than 3.3 volts DC.  Using a voltage other than 3.3 volts, you will need to use a power regulator.  Looking at the power requirements above, a 250 ma regulator like the L4931-3.3 is pushing the limit.  If you are breadboarding, most people appear to be using the LD1117.3.3 800 ma linear regulator which gives plenty of current without requiring a heat sink on the regulator.  It is best to use a 10 microfarad capacitor on the input and especially the output to keep the output smooth.  If you are breadboarding only, there are breadboard power supplies that make it easier to generate 3.3 or 5 volts when you want it.

Firmware

There are currently two general variations on firmware.  The first implements an "AT" command set to instruct the module how to connect via wifi.  A second firmware has been developed by NodeMCU implementing the Lua scripting language.  There are some other firmware images including one implementing the MQTT protocol.

User Software

Some smart folks have added the Espressif code compiler to the Arduino IDE.  This allows for the average person to write code that runs on the ESP8266 board itself (no Arduino or other controller required).  This makes it exciting that in a one inch size board, you have a complete Internet of Things node.

Where to go from here

While Lua allows for web apps with a small amount of code, I believe there is a great deal one can do to interface hardware with the ESP modules and compile code directly.  As a person who has done Arduino code for 2+ years (and a C die hard), that's where I'll be looking to provide projects.

For my first published project, See an ESP-01 connected to a temperature and humidity sensor, available via any web browser - at https://learn.adafruit.com/esp8266-temperature-slash-humidity-webserver/overview.