ESP-NOW
-
ESP-NOW means that ESP8266 and (?) ESP32 nodes can directly communicate, without having to go through lengthy delays at the gateway after waking from sleep. This means much lower current consumption than before for battery powered ESP nodes.
Anyone here try this out?
https://www.espressif.com/en/products/software/esp-now/overview
Aggressively Low Power with the ESP8266 – 10:18
— CNLohr
-
Answering my own question: yes, esp-now does ALSO work with ESP32.
http://www.instructables.com/id/ESP32-With-ESP-Now-Protocol/
That's significant because it means the much lower sleep current of the ESP32 (as compared to the ESP8266) can be leveraged.
-
Are you suggesting a new transport layer for MySensors gateway and nodes?
-
I'm not sure what you're asking.
Put simply: if it turns out that a $1.70 ESP8266 can "do it all" without using much power, then it would be good to know.
-
I was asking if you were suggesting to investigate if it was possible to use the ESP-NOW as a new transport like the NRF24 or RFM69
-
@gohan Yes, I believe that's what I said.
-
In addition, the ESP8285 allegedly has a deep sleep of 10ua with full memory retention:
https://www.aliexpress.com/item/ESP8285-ESP-M3-serial-port-transparent-wireless-WiFi-control-module-Compatible-with-ESP8266/32825926676.html?spm=2114.search0104.3.16.76915236yw7rvD&ws_ab_test=searchweb0_0,searchweb201602_4_10152_10151_10065_10068_10344_10342_10343_10340_10341_10696_10084_10083_10618_10307_5711215_10313_10059_10534_100031_10103_10624_10623_10622_10621_10620,searchweb201603_6,ppcSwitch_5&algo_expid=3515e37f-3b93-43c6-ac3a-ca2655bb5718-2&algo_pvid=3515e37f-3b93-43c6-ac3a-ca2655bb5718&transAbTest=ae803_4&priceBeautifyAB=0
That's much better than the ESP8266.
-
-
This is very intriguing! Looking forward to following this.
-
@neverdie I like the discussion as I like the ESP features, especially because of much mor RAM and Flash (also ESPnow etc.). However, I think the biggest problem so solve is not only to introduce a new protcol like ESPnow (which I and my friends have tried successfully) but the drastic code changes in MySesnors core as the ESP chips (8266, 8285, ESP32) do a reboot/wartstart after a deep sleep wakeup and that is completely different than AVR/ATMEGA chips like the 328p which continues right after the sleep command. I have a newer discussion with the MySensors main developers on that. So even if ESP8266 or ESP32 is yet supported, the sleep command is not supported (check the recent code, it will return false and does not sleep). Thus the ESP's can only be used as Gateways or always power on MySensors devices.
-
Noticing that over the last year ESP-NOW has become a lot more mainstream, with all sorts of videos describing how to do it fairly simply, e.g.:
ESP-NOW - Peer to Peer ESP32 Network – 43:02
— DroneBot WorkshopGiven how inexpensive ESP8266's are for a compact integrated MCU and radio, but now free of the slow overhead of keeping a wifi connnection maintained, it maybe opens up some interesting options. The only downside seems to be that the sleep current on these devices is still relatively high, though admittedly not terribly high in an absolute sense. Not sure what the current state is of ESP chips and whether any of them can match, or even approach, the 100na sleep current of an atmega328p. Anyone know? Of course, you could always add some custom sleep circuitry that could bring it down to 30na or so for around $1 in parts. If the wake-up time from a cold start isn't too long, maybe it's a win.
-
@NeverDie The DFRobot FireBeetle (ESP32) has around 10ua deep sleep current, can be flashed by USB, can be run directly from a lithium ion battery, has a charging circuit, and only costs ~6$.
The lolin32 lite has 70-90ua deep sleep current and the same peripherals for ~2.3$ and is the one I'm personally using.
I'm actually working on writing a dedicated ESP-NOW to HA TCP gateway (instead of the plethora of available MQTT ones). If Mysensors supported ESP-NOW it would be considerably better and more secure.
As for the sleep circuit you mentioned, do you mean a MOSFET connected to a sensor/button and an MCU pin to latch it on?
Right now i'm also trying to implement a low power remotely activated node with an external BLE tag circuit wakeup or an external RF433 "key finder" circuit wakeup (~70ua).
-
@idanronen said in ESP-NOW:
As for the sleep circuit you mentioned, do you mean a MOSFET connected to a sensor/button and an MCU pin to latch it on?
As a "for instance," a TPL5010 external watchdog consumes just 35na. In https://www.openhardware.io/view/534/Extremely-Simple-Arduino-Pro-Mini-LoRa-Water-Leak-Detector I use it to periodically wake-up a sleeping atmega328p, but it could just as easily be used to turn-on a mosfet or load switch to then turn-on a completely powered down mcu of any type, including an ESP32 or an ESP8266.
You can see the TPL5010 mounted on it here:
That was 4 years ago. I haven't re-surveyed the market, but maybe by now there exist watchdogs that consume even less.
-
@idanronen Quick question for you: At what bitrate can ESP-NOW transmit packets? Is it 54Mbps? More? Less? If it can achieve those high speed rates at good range, then one could easily afford high Tx power. [Edit: I see from https://blogs.ntu.edu.sg/ps9888-2020-g16/2020/07/11/esp-now-data-transfer/ that there appears to be a 54mbps bitrate, but less than a megabyte per second effective speed in whatever their test conditions were at 1 meter apart. Does that match what you're observing?]
-
@NeverDie That sounds like a really nice idea. Since most of my project are 1 off, I don't have experience with designing pcbs or working with such small package components. If anyone ever designs a general purpose board with a tpl5010, a resistor for the timer, a mosfet, feedback from the mcu to latch the mosfet or signal the timer the work is done, and maybe even an optional spot for a low quiescent LDO regulator like the ht7333, me6211, or mcp1700, capacitors, and a manual override for a button or sensor interrupt, I would love if you could share it. I'm sure such a board could be useful for many MCUs.
As for the data rates, I've never measured, nor would I get the maximum speed even if I did, since I'll never be that close to the router with a clear line of sight. Either way I wouldn't choose the highest bitrates even if I were, as there are maybe a handful of use cases (like the esp-cam), and the drawback of reduced reliability and range at those rates. Esp-now long range mode seems like a better use case overall.
That being said, in a non sterile environment (in terms of 2.4ghz noise), and the distance they've mentioned, 1MBps (8mbps) out of the possible 54mbps sounds right to me for real life speed.
-
@idanronen said in ESP-NOW:
@NeverDie That sounds like a really nice idea. Since most of my project are 1 off, I don't have experience with designing pcbs or working with such small package components. If anyone ever designs a general purpose board with a tpl5010, a resistor for the timer, a mosfet, feedback from the mcu to latch the mosfet or signal the timer the work is done, and maybe even an optional spot for a low quiescent LDO regulator like the ht7333, me6211, or mcp1700, capacitors, and a manual override for a button or sensor interrupt, I would love if you could share it. I'm sure such a board could be useful for many MCUs.
Have you seen these?
https://www.adafruit.com/product/3435
Adafruit has some other variants as well.As for designing PCB's, it's easier than you think. Watch a youtube video or two, and you can design your own.
-
@NeverDie yes, however at 20uA quiescent and 5$ I'd rather just buy a firebeetle for 1$ more and have 10uA sleep
-
@idanronen It sounds like you've found the set of tradeoffs that you like.
https://forum.mysensors.org/topic/11933/best-mcu-radio-successor-chips
-
@idanronen It sounds like you've found the set of tradeoffs that you like.
https://forum.mysensors.org/topic/11933/best-mcu-radio-successor-chips
Yes and no. I'm fine with the lolin32 lite for a couple of bucks for most things, especially solar. For example I've made several units of esp-now capacitive soil moisture sensors with it. When solar is involved, the 2mah extra per day are a non-issue. However a general purpose circuit like the one I mentioned could be very useful for simplifying cases where you need to also turn off all external sensors and peripherals, or use other MCU such as an esp32-C3 or one of the seeed ones like the rp2040 Xiao.
I keep an eye out for ready made low power circuits or boards on AliExpress, but it doesn't look like the Chinese are up to speed on low power consumer grade circuits.
-
@idanronen said in ESP-NOW:
That being said, in a non sterile environment (in terms of 2.4ghz noise), and the distance they've mentioned, 1MBps (8mbps) out of the possible 54mbps sounds right to me for real life speed.
Reporting back: this site (https://blogs.ntu.edu.sg/ps9888-2020-g16/2020/07/11/esp-now-data-transfer/) claims to be getting that type of speed if they send 250 byte packets as fast as possible. Well, it sure seems to easily beat the best case 2mbps transmit speed of an nRF24L01 radio.
I'm doing a round-up of different radios and hope to do some comparisons sometime soon. I think I'll include ESP-NOW in the mix. I'd like to get a NORD-PPK2 Power Profiler to help out with it, but it seems to be sold out in most places. Mouser will be getting some at the end of June though, so I'll backorder one there if I can't locate a decent source sooner. So many things are in extreme shortage right now, but ESP8266 modules are still readily available at only just a nominal buck on Aliexpress.
Meanwhile, this guy shows his easy approach to making an easy ESP-NOW to MQTT gateway:
Super Simple ESPNow to Wi-Fi / MQTT Gateway & Why I Use Two ESP8266s – 04:13
— MrDIYand I think it really is as easy as that.
-
Interestingly, this guy shows a method for "powering down" an esp8266 to a 3ua current consumption, as opposed to the commonly known 20ua current consumption:
Best power saving mode - Much Deeper Deep Sleep ESP8266 – 10:30
— DIY TECH BROSI'm not sure how that compares to completely turning off all power to the ESP8266 and then later restoring it. Does the ESP8266 startup faster if fed 3ua instead of completely disconnecting it? Or is the startup time the same?
-
@NeverDie I would sure hope it would be faster, otherwise no point in doing it. You can change the circuit so that the ESP8266 doesn't even have power unless it gets an external trigger. From the video this needs some kind of external trigger either way.
I would have to test it to be sure, but it sounds like it's booting fresh each time, so I don't see how it could be faster.