Recent Updates (Feb 14th 2019)

I’ve added Mike Rankin’s Twitter feed to the ESP32 links section (RH column).  Mike has several ESP8266 and ESP32 projects in his Github repository and usually has some interesting commentary on his Twitter feed (ongoing status, problems, fixes, etc).  His latest project, a rechargeable-coin-cell based ESP32 mini board, is definitely worth a look, as are his previous ESP8266 creations.

Theo and his merry band of helpers have been hard at work pushing out more updates to Sonoff-TASMOTA.  Along with some code refactoring at the end of January to change “boolean” types to “bool” and “byte” to “uint8_t”, some other interesting updates have just slipped out in the last couple of recent releases:-

  • Templates.  This is a great new feature which allows people to  add new device GPIO definitions via JSON templatesA repository for user-submitted templates has already been created.
  • Support for multiple ADS1115 devices on the i2c bus.  If you’ve been limited by the single AtoD pin on the ESP8266, you can now add up to four, four-channel ADS1115 devices (on unique addresses) to the i2c bus and have them automatically recognized.
  • Numeric operators “==”,  “!=” ,  “>=”  and  “<=”  added to rules (the previously existing  “=”  string comparator frequently produced unexpected results when used in a numeric context).
  • HASS discovery and status for sensors.

Martin Ger has just updated his esp_wifi_repeater package to handle MQTT QOS (in version 2.2.5).

Adding Alexa control.  Phil Bowles has released a tiny Wemo emulator library, “weenymo.  It’s about 60 lines of code and adds Alexa on/off functionality to your ESP8266 projects (and don’t forget to check out his “esparto” rapid development library while you’re visiting his GitHub repository).

Otto Winter has integrated the esphomeyaml and esphomelib projects under the umbrella name of “esphome.  If you haven’t come across either (any) of these before, the basic idea is that a user can write a short configuration file and have code automatically generated for an ESP8266 or ESP32.  With esphome, you can have an application up and running on your ESP in a few minutes without writing a single line of code yourself.

Advertisements

ESP32 board pricing

I’ve been a little surprised (and a lot disappointed) that ESP32 board prices haven’t fallen so very much since the introduction of the ESP32 module, so I was very pleased ESP32-DevKit-v1when recently, while searching eBay for something completely different, I came across this vendor selling ESP32-DoIt DevKit v1 style boards (a NodeMCU look-alike) for less than $5 each.  As it was a vendor I hadn’t used before, I cautiously placed an order for a couple and sat back to wait for the postman’s knock.

I received email notification that the boards had shipped within 12 hours of placing the order and the boards themselves arrived nine days later, which is better than normal turnaround (and in fact, the items which I’d been searching for originally and which I’d ordered from a different vendor within a few minutes of the ESP32 order didn’t arrive until five days later).  Having had a couple of bad ESP8266s shipped to me recently, I made a point of doing some initial testing of the modules when they arrived, and both programmed and ran a test application without any problems.

Getting good, working modules at that price and shipped promptly was information which seemed worth sharing and I started writing a post for this blog, only to find when I went back to the vendor’s site that he’d put the price up.  I hit the big “Delete” button and more or less forgot about it.

Over the past couple of days I’ve been playing with one of the modules for another project and I realized two things.  1- I’d forgotten to leave feedback for the vendor (now done) and 2- His updated price is actually still very good (even if it doesn’t break that $5 barrier) …which lead to this post.

As usual, I have to say that I have no relationship with this vendor, other than being a satisfied customer (on the basis of one order), but if you’re looking to help push down the prices on ESP32 modules, he (or she) is definitely worth considering.

-WARNING-  I’m writing this at the start of February, which is also the start of the Chinese New Year holiday, so you can look forward to an extra ten days delay if you order right now.  😦

ESP01S USB Adapter Mod

Up until a couple of months ago, I’d never been interested in ESP01 modules (it seemed fairly pointless to buy an ESP8266 crippled by both lack of memory and lack of IO pins when the price wasn’t substantially different). That changed recently for a couple of reasons. Obviously, the appearance of the 1MB ESP01S modules made a huge difference to the functionality of the ESP01 (TASMOTA would fit comfortably into flash and they became OTA upgradeable), but I also had the need for some physically small modules, as I’m adding functionality to some external light fittings (more on that below†).

ESP01S module and Adapter

When the modules I’d ordered finally arrived, I was pleasantly surprised by their compact size and by the 8-pin connector (I hadn’t, before now, tumbled to the fact that people might be buying these simply because they were easier to solder than the minuscule, castellated edge connections common to the other modules in the family). After assembling a prototype, I ordered more ESP01S modules and, on impulse, added a $1 USB adapter (left), which looked like an easy method of programming and testing the individual units before installing them into the main boards.

It was only when the adapter arrived that I realized why they were priced so cheaply …no reset switch, no programming switch and none of the RTS/DTR auto-program mode selection of the NodeMCU (and knock-off) boards. Duh! It turns out that there’s a very slightly larger version of the ESP01 USB adapter (with a red PCB, so it’s easy to identify) which does have a programming switch, but it sells for about $3.20.

Anyway, all was not lost; rather than wait another month for another order to perhaps arrive (and we’re getting a little too close to the Chinese new year to have warm and fuzzy feelings about estimated delivery times), I thought I’d just hack the existing $1 version to be programmable. This turned out to be even easier than expected (and even I didn’t expect the addition of one switch to be hard).

I had a bag of about 100 “tact” switches sitting in the parts bin, but if you don’t happen to have any to hand, I recommend dead, ancient, mechanical mice as a source of (usually) good quality tact switches.

Switch supported by yellow connector body

After fiddling with a switch and the USB adapter for a couple of minutes, it seemed obvious that attaching the switch to the side of the board (with the button facing horizontally outwards) at the yellow connector end of the board was a pretty good position; the switch connections were next to the ESP01S pins and the body of the yellow connector provided mechanical support. My board had the characters “HW-305” on the top surface of the PCB, just where I situated the switch.  I’m not a huge fan of hot glue, but in the spirit of a $1 hack, it looked like a good choice for this assembly. Cutting a bit of fairly dense, firm foam (shipping protection for the pins of some ICs) to shape provided a nice shim between the side of the connector and the bottom of the switch and with hot glue on both sides (as well as just a smear down the edge of the PCB), the switch was firmly held in place, even when pressed.

 

Bottom, showing switch connections

On the reverse side of the board, both of the pins we need (GND and GPIO00) are on the inside row of the connector. The ground pin is right next to the edge where the switch is situated and GPIO00 is the third pin in. I decided to use a resistor between the switch and GPIO00 for a couple of reasons …first, I have an aversion to connecting pins directly to VCC or GND and secondly, the resistor body provides extra support for the switch. I happened to use a 1k5 resistor, but the value isn’t critical and anything between 3k3 and 100Ω should work fine.  As the unit comes with unprotected soldered connections on the bottom anyway (and I’m using it on a wooden tabletop), I’m not going to worry too much about insulating it. 

Completed adapter mod with ESP01S mounted

Does it work?  Heck yes!  The switch is firmly supported against the connector body, so it’s very easy to press it at the same time as inserting the adapter into a USB port.  Obviously, inserting the adapter without pressing the switch drops the ESP straight into normal “run” mode.

 


 

† – We have about a dozen outside lights scattered around the property.  They all use E17 base bulbs (the little brother to the normal E26/E27 screw type base).  Unfortunately, there’s a severe dearth of “smart” bulbs with E17 bases and zero (that I can find, anyway) that are “smart” and (importantly) have any sort of useful light output.  I’ve started using these LED (“dumb”) bulbs, which give way better output than the older, equivalent compact fluorescents and are much smaller, too.  Using these, I can cram a mini PSU, ESP01S and a Triac (plus driver) into a cut-down compact-fluorescent base and still fit it into the oblate glass cover that these lamps all have (saving myself the hassle of running an extra neutral wire into a dozen switch boxes and/or the cost of replacing a dozen outside light fittings with E26 versions).

The ESP01S runs TASMOTA which makes control fairly trivial.  The default mode is “on”, so the light switch still works.  The lamps have a couple of  TASMOTA rules enabled; one to switch on at dusk, plus or minus a few minutes and another to switch off at about 4.5 hours after dusk (nice for coming home after dark and being able to see the keyhole).  As a bonus (though not, I have to admit, particularly useful), they all become voice controllable, too.

 

ENC28J60 Gateway (Was:- Not-So-Recent Changes)

While answering a question in another thread, I realized that I’d missed an exciting change which, from the number of hits related pages get, is sure to be of interest to readers of this blog.

Back in the March/April time frame, Martin Ger updated his ESP WiFi Repeater to support an SPI-connected ENC28J60 ethernet module.  The work was quite well hidden, way down the page in a very long README (which catalogues the tremendous amount of work that Martin has put into this project).  Martin credits Andrew Kroll “…for his great work on getting [this] right”, so kudos to both of them for a very useful addition.

ENC28J60 hardware

You’ll need to run your ESP at 160MHz and have a decent power-supply to have this mod work effectively, but as Martin points out, once you have the ENC28J60 hardware configured with his ESP WiFi Repeater package, you’ve got yourself a super-cheap, DIY access-point.

CNX Give-away

Just a very quick plug for one of my favourite techie sites, CNX Software.  They always have interesting stuff there and frequently cover the latest ESP8266/ESP32 modules.  This week they’ve been having their great, annual give-away of boards and modules.  Unfortunately, you’re already too late to join in on the ESP32 sound board, but if you hurry, there’s still a chance to pick up a nice little Friendly Arm NanoPC-T4 board (knock three times and tell them ESP8266Hints sent you).

 

Recent Updates (20th Oct 2018)

esp-go  –  Pete Scargill’s re-badged “Hackitt & Bodgitt” code for a universal i2c Nano peripheral extender for the ESP8266.

Pete has mainly been updating the documentation for his code over the past couple of weeks.  In the latest release, the name has changed to “esp-go.doc” to reflect the re-branding.

 

badgy  –  SQFMI’s “Swiss Army” e-Ink badge,based on the ESP-12F.

SQFMI has updated the code to work with the latest version (3.0) of the GxEPD library.

 

mobile-rr  –  idolpx’s ESP8266 Mobile Rick-Roll Captive Portal.

idolpx has added some images to the documentation to help novice ESP8266 users get a better grasp of what they’re doing, as well as updating the code to add DNS overrides and improve the WiFi scan filtering.

 

Sonoff-Tasmota  –  Theo Arends’ all-purpose replacement for Sonoff firmware.

Theo has been steadily updating and improving the 6.2.1 version of his firmware with (in no particular order):-

  • A change to a non-blocking MQTT library as the default.
  • Add support for the DS3231 RTC.
  • Add TasmotaModbus library.
  • Add support for the HX711 load cell.
  • Add support for Pzem energy monitors.

…as well as various fixes.

 

IRremoteESP8266  –  A library to enable IR send and receive on the ESP8266.

Mark has updated the package to support Disney’s “Made With Magic” protocol.

 

 

 

Recent Updates

JLed – a library to provide painless control of LED blinking, breathing and fading effects.

Jan Delgado has updated his JLed library a couple of times over the past week.  The first update was a change specific to the ESP8266 to improve the 8-bit to 10-bit scaling, so that LEDs now reach full brightness.  The second change is the addition of a boolean return value to the Update() function to indicate whether the target effect is still active, or has completed.

OpenMQTTGateway – Bidirectional gateway for the integration of 433MHz, BLE and IR devices with MQTT.

Florian has made a small change to his OpenMQTTGateway to make the “TRACE” function compile-time selectable, in order to reduce the overall code size for those who don’t use it.

IRremoteESP8266 – A library to enable IR send and receive on the ESP8266.

Mark and his various contributors (including “crankyoldgit”) have added initial support for Elektra, Samsung and Whirlpool air-conditioners and experimental support for  Coolix and Lutron.  There are also additional fixes for Mitsubishi A/C and the IRMQTTServer code.

Esparto – A rapid development framework for ESP8266

Phil Bowles has added MQTT username & password functionality to his (relatively new) rev-2 version of Esparto, as well as fixing a couple of minor bugs.

 

esp8266-weather-station-color – An ESP8266 and ILI9341/XPT2046 based weather display.

Daniel and Marcel continue to update the colour weather-station display, with fixes for some I18N and WiFi issues.