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:-
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).
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).
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 when 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. 😦
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†).
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.
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.
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.
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.
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.
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.
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.
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.