#172

  Переглядів 183,108

Andreas Spiess

3 роки тому

Today we will discover a hidden feature to connect two or more ESP32s or ESP8266s directly to each other: ESP-now. It is much faster and more energy efficient. And we will compare it to LoRa (RFM95 and Arduino Pro Mini.

Espressif gave us this possibility and, because it is so fast, they called it ESPnow. And it also works in the Arduino IDE.
In this video, we will
- Try to understand the difference between the standard ESP mode and ESPnow
- Build a working ESPnow connection for two ESP8266
- Check-out the transmission speed and
- Compare this speed with the speed if we connect the ESP to the internet
- Compare the Energy hunger of both modes
- And finally, compare the ESPs with another technology: LoRa

Links:
Sketches: github.com/SensorsIot/ESP-Now...
ESP-Now example: github.com/HarringayMakerSpac...
Not-rebooting gateway: github.com/HarringayMakerSpac...
Online Battery life calculator: battery-life.of-things.de/batt...
ESP32 board: bit.ly/2sOMR3E


Supporting Material and Blog Page: www.sensorsiot.org
Github: www.github.com/sensorsiot
If you want to support the channel and buy from Banggood use this link to start your shopping: bit.ly/2jAQEf4 (no additional charges for you)
Official Wemos Store: s.click.aliexpress.com/e/jUzBiIq
profile.php?...
spiessa
www.instructables.com/member/...
Please do not try to Email me or invite me on LinkedIn. These communication channels are reserved for my main job
If you want to buy me a coffee: www.paypal.me/AndreasSpiess

КОМЕНТАРІ
Admin Sp Networking iRF Labs
Admin Sp Networking iRF Labs 24 дні тому
Good one
Andreas Spiess
Andreas Spiess 22 дні тому
Thank you!
Hector Mery
Hector Mery Місяць тому
Vielen Dank aus T/ucson Az. USA
Andreas Spiess
Andreas Spiess Місяць тому
Gern geschehen!
Zeta Convex
Zeta Convex 2 місяці тому
Isn't one of the advantages of ESP-NOW that it has a longer range than Wifi?
Andreas Spiess
Andreas Spiess 2 місяці тому
No. It uses the same radios. There is a long range mode which is a little better. I made once a video about it.
John McMahan
John McMahan 3 місяці тому
Do you have an index of your videos? mcmahanj123@gmail.com
Erik Eckstein
Erik Eckstein 4 місяці тому
Leider funktioniert der battery-life Link nicht (mehr?). Was ist denn aktuell ein guter Calculator? Ähm... oh. Sorry. Sadly the link to the battery life calculator does not work (anymore?). Which - highly customizable - calculator would you suggest?
Andreas Spiess
Andreas Spiess 4 місяці тому
For example this one: www.geekstips.com/battery-life-calculator-sleep-mode/
Vaughan : )
Vaughan : ) 4 місяці тому
​@Andreas Spiess thanks for all your videos & effort
Andreas Spiess
Andreas Spiess 4 місяці тому
My pleasure!
Mudahnya Coding
Mudahnya Coding 4 місяці тому
thank very much...i'm from indonesia
Andreas Spiess
Andreas Spiess 4 місяці тому
You are welcome!
Robert Klauco
Robert Klauco 4 місяці тому
5 years later I learned something new...
Andreas Spiess
Andreas Spiess 4 місяці тому
Good to know :-)
Abhijith bhat n
Abhijith bhat n 5 місяців тому
Hi Andreas, Thanks for the nice video. I am trying to build point to point communication device using RF. I struggled with RF433Mhz and checking if ESP now is a fit. My application needs sensor state(Digital on and off(1 byte data)) to be monitored. The maximum time for reaction is about 80ms. The transmitter is mounted on machine, so it will be battery powered. Do you think ESP-Now can be a good fit for my application?
Andreas Spiess
Andreas Spiess 5 місяців тому
You can try. Wi-Fi and battery operation usually are not a good fit :-(
Ryan Brown
Ryan Brown 6 місяців тому
I finally ordered a couple Esp32's after years of holding out. Your videos are bringing me up to speed on them and their features and quirks as quick as humanly possible. Thanks for saving me so much time!
Andreas Spiess
Andreas Spiess 6 місяців тому
You are welcome! And enjoy these wonderful chips.
Chris Molloy
Chris Molloy 6 місяців тому
Can I use ESPNOW and connect to wifi?
Andreas Spiess
Andreas Spiess 6 місяців тому
I think I once saw a "repeater" project which transferred messages between ESPnow and Wi-Fi. But you have to google. This is an old video.
Józef Góral
Józef Góral 6 місяців тому
Great material. He helped me a lot to understand the problem you raised in this episode. I'm currently doing a similar project in college. would you help me and recommend some internet sources or a book in which this topic is extended? I also want to encrypt my connection and get the maximum point-to-point speed possible.
Andreas Spiess
Andreas Spiess 6 місяців тому
You have to do the research yourself because I am not interested in security and therefore have no knowledge. Books are usually outdated before they are printed ;-)
Xactenergy
Xactenergy 7 місяців тому
Is this still valid information and does it also apply to the esp32?
Andreas Spiess
Andreas Spiess 7 місяців тому
I did not check if they updated the library...
Adrian Stephens
Adrian Stephens 8 місяців тому
Interesting. I'd not come across this protocol before. I have to declare an interest as somebody who worked on the 802.11 standard. The protocol appears to use the 802.11 Vendor-specific action frame, which is a way to allow it to use its 802.11 hardware, but to achieve a proprietary protocol that won't inconvenience other users of the same band (because they will discard the packets). The issue for any low-power protocol is controlling who is awake to listen. The original 802.11 protocol (circa 1997) supports ad-hoc power saving. The essence of this is that devices share an approximate clock, and wake for a window during which their intent to communicate is declared. A device seeing it is an intended recipient stays awake until it is allowed to sleep. But this was not "fine-grained" like you need. I don't see any of this complexity in ESP-now. So I have to conclude that one of the two ESP nodes (in the role of controller) has to stay awake permanently to provide the other with the ability to wake, transmit, and sleep in short order. 802.11ah added "Target Wake Interval" to coordinate a network of such devices while maintaining network efficiency (something you may well lose if you just wake and transmit). In doing so, it was following a fine 802.11 tradition of adding "YAMIPSM" - yet another mutually incompatible power saving mechanism.
Andreas Spiess
Andreas Spiess 8 місяців тому
So far I did not see any implementation with both devices sleeping. Would be interesting, but not simple to make it stable, I assume. Usually the "gateway" is connected to mains.
Henrik Vendelbo
Henrik Vendelbo 9 місяців тому
Bluetooth 5? How would that compare. Wouldn’t it be somewhere in between in terms of speed and range.
Andreas Spiess
Andreas Spiess 9 місяців тому
No.
Daniel Trivino
Daniel Trivino 9 місяців тому
Hello Andres. Many thanks for sharing all this knowledge with all of us !. Thanking advantage of your knowledge and experience, would you guide me on how to implement the ESPnow protocol using micropython, please?
Daniel Trivino
Daniel Trivino 9 місяців тому
@Andreas Spiess Many thanks for your prompt answer...and sorry for misspelling your name. The auto correct some times is not that helpful
Andreas Spiess
Andreas Spiess 9 місяців тому
I have no experience with MicroPython :-(
05pamar
05pamar 10 місяців тому
Thanks, great video, very profesional!
Andreas Spiess
Andreas Spiess 10 місяців тому
Glad you liked it!
Dark Matter
Dark Matter 10 місяців тому
Ver nice and clean explanation about ESP-Now; quick question can we read message stream with mobile phone in wilderness?
Dark Matter
Dark Matter 10 місяців тому
@Andreas Spiess Thanks a lot, that is exactly I was looking; you are always fantastic.
Andreas Spiess
Andreas Spiess 10 місяців тому
I do not think so. For wilderness project you might watch my meshtastic video
Claudio Bio
Claudio Bio 11 місяців тому
Hi Andreas I work at the North Slope Alaska during the winter season and we test devices deployed at the field covered by snow / ice. The way to test those devices is using a small computer with a USB cable that is having a special head at the other end (internally this is only a USB extension, no circuits inside); this end is attached to the deployed device and the software recognize and test it. The deal is: this software works only using USB port, is no way to select other type of connection. I was reading about different modules and they converts USB to TTL and TX, USB to Bluetooth and TX or some modules use TTL and TX. Some of this modules allows two way communications, some are recognized as COM port and some work interfaced with Arduino, but no one of this is transparent for USB. That I try to say: Is any way to connect USB (D+ and D-) to a TX and RX pins in a module on one side and RX and TX to the special head connector (D+ and D-) at the other side and at this way simulate a ghost wire? The data string for this test is very short. I will appreciate your comments.
Andreas Spiess
Andreas Spiess 11 місяців тому
I do not know a simple solution for tranmitting USB. Our devices usually have a chip which converts Serial to USB. If this is the case for your devices it should be possible to find these two lines and add an ESP-01 with a little bit of code. But this has to be solved for each device differently
andres ceballos
andres ceballos 11 місяців тому
hello great video I am having a problem when using an sx1278 module which is a 433 Mhz LoRa when I use two modules one as slave and one as master using two STM32L0 microcontrollers or two ESP8266 they work very well the problem is when I use a STM32L0 microcontroller and an ESP8266 the communication is not stable at all, in both modules I am using the same confirmation transmission power, sf, bw etc ... What could be what is happening with the communication?
Andreas Spiess
Andreas Spiess 11 місяців тому
I have no idea. Maybe you start to insert a few serial print statements to understand what happens?
Zachrey Helmberger
Zachrey Helmberger 11 місяців тому
WOW! How come I only heard about ESP Now after all this time?! This is a major breakthrough in battery powered sensing!!
Andreas Spiess
Andreas Spiess 11 місяців тому
Good question. It is quite old stuff...
azad asif
azad asif Рік тому
If I use esp8266 as a wifi repeater, what battery it required to run for 1 year or atleast 6 months
azad asif
azad asif Рік тому
@Andreas Spiess thanks didn't expected superfast reply 👍
Andreas Spiess
Andreas Spiess Рік тому
A big one. Multiply 0.1A with the hours you need and you have the Ah for the battery
Aaron Zhang
Aaron Zhang Рік тому
Interesting! thanks for posting!
Andreas Spiess
Andreas Spiess Рік тому
You are welcome!
Partou Electric
Partou Electric Рік тому
Hello Andreas, Thank you very much for your incredible videos I am sending a square wave of approximately 20 to 30 HZ to a distance of 40 meters. with high integrity. Do you think ESP now would be a good choice? I would appreciate your help, Regards Kazem
Andreas Spiess
Andreas Spiess Рік тому
ESP now for sure works across this distance if you have no walls in between. The rest is your job to test if you can fit your signals into a message.
Paul Wilkie
Paul Wilkie Рік тому
Andreas, what is your source for those stubby antennas?
Paul Wilkie
Paul Wilkie Рік тому
Thank you Andreas, keep teaching us about IoT!!!!!!!!
Andreas Spiess
Andreas Spiess Рік тому
AliExpress. But you have to test them because a lot of them are not good
drstefankrank
drstefankrank Рік тому
I think for in home battery powered sensors using only the chip without the dev board and then using two wall powered esp connected via GPIO and some serial protocol as a gateway would be a good option. One esp does the ESP NOW stuff and the other is permanently connected to WiFi. With that you don't have to reboot after each message and can transfer much faster in both directions.
drstefankrank
drstefankrank Рік тому
@Andreas Spiess 4 bare esp32 were in the mail this morning. :)
Andreas Spiess
Andreas Spiess Рік тому
Maybe you are right. Just try it and you know ;-)
Rltindy
Rltindy Рік тому
Using the examples, and following your instructions, I linked two ESP32 Dev boards together and communicated successfully via ESPNOW. You are one of the best teachers on the internet. Glad I subscribed long ago. Now I have to actually send some data packets of my data. Swiss accents are very nice.
Andreas Spiess
Andreas Spiess Рік тому
Thank you and I am glad it worked for you!
Homespore
Homespore Рік тому
Hi ! at 7:37, which pcb Boards are you using ? thanks
Andreas Spiess
Andreas Spiess Рік тому
www.aliexpress.com/item/32452003527.html?spm=a2g0s.9042311.0.0.27424c4dQmlyRj
Brennan
Brennan Рік тому
Click bait title. Answer the question or don’t post it.
Andreas Spiess
Andreas Spiess Рік тому
I think you are the first discovering this fact. Thank you!
VGK Maranata
VGK Maranata Рік тому
@Andreas, is there a difference between the power consumption of the different 802.11 standards (b/g/n/e/i)? My guess is no, but I am hoping for a yes.
Andreas Spiess
Andreas Spiess Рік тому
You can look at the datasheet. But I think it is not relevant
Mari Kunz
Mari Kunz Рік тому
Hi Andreas, ich suche nach einer Möglichkeit Signale von einem USB2-Anschluss zu einem anderen USB2-Anschluss drahtlos zu übertragen. Die Signale also nur 1 zu 1 über eine Drahtlosverbindung umzusetzen/überbrücken. Bspw. also ein Aufbau mit zwei ESP32. Vielleicht sogar wahlweise mit Bluetooth, BLE oder WLAN. Das wäre dann wirklich universell. Vielleicht wäre das ein interessantes Projekt? Hi Andreas, I have been looking for a way to connect two USB-Devises wireless. Meaning from one USB of one devise to another. Just transmitting what is beeing output by the first and receiving and outputting the exact signal at the other device. Maybe using two ESP32 with Bluetooth, BLE or Wifi. Would that be interesting as a project? In my case I have a victron 75/15 Solar charge controller. It has no wireless capabilities just a 4pin connector (GRD, RXI, TXO, 5V). Its communication is RS232 serial based. For connection I connected GRD, RXI, TXO (cross connected) to a Adafruit FTDI 5V 1m adapter cable and connected it to my android phone. Using the App from Victron it works well. Just not wireless.
Andreas Spiess
Andreas Spiess Рік тому
I once bought such a system for my 3D-printer. But this is along time ago... Maybe you consider to go via MQTT ?
Girmachew zewdie
Girmachew zewdie Рік тому
is it possible to use esp now between esp32 cam and esp8266? if so please make a video on that I really appreciate your help.
Andreas Spiess
Andreas Spiess Рік тому
I do not know. Maybe you try?
Oli R.
Oli R. Рік тому
Sehr gut gemachtes Video. Ich habe mir direkt einen Außentemperatur Sensor mit dem ESP-07 (mit Antenne) und einer Empfangsstation mit dem ESP12e mit Adafruit Display nachgebaut. Das ganze mit den Programmen von HarringayMakerspace. Funktioniert tadellos. Immer wieder erstaunlich was man mit den ESP8266 Modulen anfangen kann. Weiter so !
Andreas Spiess
Andreas Spiess Рік тому
Deswegen haben diese Chips so viele Anhänger...
Danush Kodithuwakku
Danush Kodithuwakku Рік тому
Awesome!
Andreas Spiess
Andreas Spiess Рік тому
Thanks!
Davide Perini
Davide Perini Рік тому
Do you know if it's now possible to use both esp now and WiFi at the same time? Thanks
Davide Perini
Davide Perini Рік тому
@Andreas Spiess I have seen that video, you haven't said much about this "problem". Thanks for the answer and for your good work here Andreas. Bye.
Andreas Spiess
Andreas Spiess Рік тому
I think so and maybe I even covered it in my ESP-now video. But I am not sure.
Muhammad Adeel
Muhammad Adeel Рік тому
very much informative......
Andreas Spiess
Andreas Spiess Рік тому
Glad you think so!
hisoka73
hisoka73 Рік тому
How does ESP-now compare with cheap 433-MHz radios in terms of power consumption? I have seen radios, at lest in specs, with few mA consumption during transmission.
Andreas Spiess
Andreas Spiess Рік тому
433 MHz does usially consume much less power.
Björn Cremer
Björn Cremer Рік тому
Für ein Projekt muss ich kurze Byte-Sequenzen von einem ESP zu einem anderen schicken... Wenn es viel wird, dann sind es 100byte/s - für das Hauptprojekt brauche ich zwingend einen ESP32, wegen den Hardware-Serials... Welche Übertragungsart würdest Du empfehlen, ESP/WLAN/HTTP, ESP-NOW, BLE? Die Maximale Entfernung wird ca 3-7m betragen, aber Kabel verlegen wird zu umständlich... 73, 55 der Björn, DO2PC
Andreas Spiess
Andreas Spiess Рік тому
Vielleicht schaust du mal mein video über ESP-Now? Das kannst du einfach testen ob es läuft. Und braucht keinen Access Point.
Felix Meister
Felix Meister Рік тому
Hallo, wir bauen aktuell eine Verbindung über P2P auf zwischen einem ESP32 mit lora modul und einem Raspberry Pi 3 mit Lora Hat. Wir bekommen eine Verbindung hin, allerdings können wir nix entschlüsseln oder die Pakete sind beschädigt: CRC error; Payload d; RSSI -53; RSSI: -92; SNR: 0, Length: 5 haben sie irgendeine Ahnung wo wir fehler gemacht haben?
Andreas Spiess
Andreas Spiess Рік тому
Nein, ich habe keine Ahnung. Vielleicht "zerlegst" du den Code in teile. Dann siehst du schnell, wo das Problem ist.
Gavin Knight
Gavin Knight Рік тому
Fantastic video
Andreas Spiess
Andreas Spiess Рік тому
Thank you!
Eldo Frederick
Eldo Frederick Рік тому
I was looking for a battery powered low power lora wireless device to receive a wake signal at longer interval say 20 times a day, but now I came to know cheap esp can do that without consuming power. Am I right?
Andreas Spiess
Andreas Spiess Рік тому
No device can listen to radio a signal without having the receiver powered.
Geoff Coucher
Geoff Coucher Рік тому
Really helpful, thank you.
Andreas Spiess
Andreas Spiess Рік тому
You are welcome!
Leonel Rapp
Leonel Rapp Рік тому
Hi, where can i download de esp_now library?
Andreas Spiess
Andreas Spiess Рік тому
You should find all links in the video description
rodstartube
rodstartube Рік тому
this is some sort of zigbee, in terms it doesn't use router and connects several nodes freely
Andreas Spiess
Andreas Spiess Рік тому
Zigbee is a different protocol. I did two videos about this topic.
Mike B Petersen
Mike B Petersen Рік тому
Love your video's - spot on! Quick Question on video #172: Can ESP-Now still communicate in "Station+AP" mode? Or is it one or the other.
Ed19601
Ed19601 Рік тому
I understand it can be both.
igeorge688
igeorge688 Рік тому
It also complain the slave software about missing "Credential.h" Where to download it and where is the proper location to be on the PC? Thank you
Andreas Spiess
Andreas Spiess Рік тому
Just delete this line of code.
igeorge688
igeorge688 Рік тому
Unfortunately, the slave file posted at "github.com/SensorsIot/ESP-Now-Tests/tree/master/EspNow_Slave_ESP8266 " I cannot loaded on the chip. At compile i get too many errors about missing libraries. Can you please put the link for libraries ? Thank you
igeorge688
igeorge688 Рік тому
Hello I cannot run your code as i get an error Missing "#include " Where i can get it ? Thank you
Andreas Spiess
Andreas Spiess Рік тому
You find it in the libraries of the Arduino IDE or Maybe you google.
Michał Kocon
Michał Kocon Рік тому
You did not mention the most important thing. LoRa is designed for long range communication. I doubt ESP-Now can achieve this. Also LoRa consumption will depend on the transceiver used...
Andreas Spiess
Andreas Spiess Рік тому
You are right. Viewers of this channel know that ;-)
Mateusz Jagocha
Mateusz Jagocha Рік тому
Hello, do you know what is maximum transfer rate for this protocol?
Mateusz Jagocha
Mateusz Jagocha Рік тому
@Andreas Spiess thank you for reply. Unfortunatley this will be too slow for audio streaming. I think i will need to use nrf24l01 for this purpose
Andreas Spiess
Andreas Spiess Рік тому
According the data sheet: 62.5 kbps
Josua Muliawan
Josua Muliawan Рік тому
man, you're a godsend
Andreas Spiess
Andreas Spiess Рік тому
:-)
Kosmada
Kosmada Рік тому
Thank you for inspiration as usual. I have been working on to find solution to conserve even more power and I have example code using adhoc network we can create remote sensor which can theoretically run on single 120 mah 3.6V LIR2450 button cell battery for 108 days if all other settings remains same. We can even use non-rechargeable CR-2032 3V 235 mah button cell battery that way we do not need any voltage regulator to run ESP8266. Single CR-2032 button cell can run ESP8266 for unbelievable 211 days. Following is link to my code: github.com/happytm/BatteryNode Use ProbeSender and ProbeReceiver sketches to test it. Thanks again.
Andreas Spiess
Andreas Spiess Рік тому
Thank you for your link!
Luis Prates
Luis Prates Рік тому
I have just discovered ESP-Now thanks to your video, so thank you! Although I do wonder if it's possible to use an analog input on master (a potentiometer in this case) to control a micro-servo on the slave. I have tried searching about this but to no real results.
Luis Prates
Luis Prates Рік тому
@Andreas Spiess thank you for the reply! Yes, I was thinking about reading the potentiometer value on master, converting into an absolute number between 1-255 and send to slave serial through esp-now. On slave, read the serial and use a "if" or "for" function to act on the serial value. I have yet to try this method but I do appreciate if you have any other method of going around this case or opinion about the validity of this :)
Andreas Spiess
Andreas Spiess Рік тому
This should be no problem. Maybe you divide the problem in parts?
amir tavoosi
amir tavoosi Рік тому
why you disconnect from wifi?
amir tavoosi
amir tavoosi Рік тому
@Andreas Spiess so i can connect to esp now and WiFi simultaneously?
Andreas Spiess
Andreas Spiess Рік тому
Because I wanted a point-to-point connection
Oliver Copleston
Oliver Copleston 2 роки тому
Hi Andreas, thanks for the vid. Any idea what the maximum theoretical speed of ESP-NOW is? For context: I'd like to stream video from one ESP-32 with a Camera to another which has an LCD display. I've figured that ESP-NOW is probably the best protocol to its lack of overhead.
Andreas Spiess
Andreas Spiess 2 роки тому
It is always best testing it out because it depends on different factors. It should not be too complicated.
Filipe Martins ICTlink
Filipe Martins ICTlink 2 роки тому
Congratulations, excellent video.
1CM69
1CM69 2 роки тому
Great video, very informative. What alterations are need to your Slave code in order to receive data from multiple Master units?
1CM69
1CM69 2 роки тому
Thanks for replying, I found the answer shortly after my initial post. 👍🏻
Andreas Spiess
Andreas Spiess 2 роки тому
I do not know. Maybe Google knows more?
cavalier 39
cavalier 39 2 роки тому
Andreas, thank you for leading me to Anthony Elder's code resulting in a 220 mS communication period and power savings. After your video was published he has offered an even lower-power alternative in espnow-sensor-minimal.ino that describes a 40 mS period. This uses a sleep function called "ESP.deepSleepInstant". After verifying that the receiver/sender pair worked with ESP.deepsleep() I had some trouble using deepSleepInstant. It seemed to be too fast in closing down - perhaps shutting down the radio before it was done. Later I found that my last Serial.print functions were missing. Inserting a delay(10) right before deepSleepInstant seemed to fix it. BUT THE BIG NEWS is that the measured time between "send" and the end of the callback function is averaging 100 mS. Not as fast as the advertised 40 mS, but still a big savings for the battery! Very un-powerful! Hope this helps your viewers.
cavalier 39
cavalier 39 2 роки тому
@Andreas Spiess Yes, Serial.print takes time. And the same is true for other communication logic, I presume. I was thinking that the processor was thinking... do A, stop, then do B, stop, then do C. My error was thinking these ESP devices are 'single threaded' or not 'multi-tasking', however they are really multi-threaded and multi-tasking, because B can start before A has finished, I think I am experiencing. (Fortran N77 was my last class on the subject, long ago.) If the device is shut down before a transmission is completed (serial, or radio) then the transmission that was underway is not completed, right? For me that is a design discovery and an 'abstraction' convenience as it makes it easier for rookies like me. BTW: "cavalier 39" seems to be my default username when I have that gmail account open. My true identity is Craig Larson, a loyal patreon'ista. (I advise all Andreas fans to join Patreon and support the channel! Do your part!)
Andreas Spiess
Andreas Spiess 2 роки тому
Thanks for the info. Serial print takes some time. And if you place a sleep command after such a statement the info is no more sent out.
WagonLoads
WagonLoads 2 роки тому
Has anyone used an esp32 or esp8266 connected to a cantenna or dish antenna for long range connections?
Zace Shadowz
Zace Shadowz 2 роки тому
Jus Came To watch detail about esp-now but now im enlightened...
Zace Shadowz
Zace Shadowz 2 роки тому
@Andreas Spiess Didn't thought it would be freaking detailed thank you very much for the hard work...
Andreas Spiess
Andreas Spiess 2 роки тому
:-)
Greg Cost
Greg Cost 2 роки тому
Thanks for sharing
Andreas Spiess
Andreas Spiess 2 роки тому
You are welcome!
Levente Likhanecz
Levente Likhanecz 2 роки тому
hello Herr Spiess, little late i discovered this video (well, according to my slow-mo learning progress along iot technologies). it looks to me that beside espnow the espressif since introduced an LR feature with their esp32 wifi unit. Seemingly LR stands for long range, with a trade-off of speed (down to 512/256 kbps) offering extended range that could be used together with espnow achieving even longer distance connectivity between units. it would be nice to see in an update video utilizing both features. best regards, lev
Andreas Spiess
Andreas Spiess 2 роки тому
Good idea!
sramctc
sramctc 2 роки тому
Just wonder, why 210 bytes take 7700ms but 10 bytes only need 38ms? the shorter the message, the higher the impact of overhead. For 210 bytes, average 36.7ms per byte, which is almost same as sending 10 bytes. If so, the best way is to break 210 bytes into 27 sections (210/8 ~27 pkts, adding two bytes as current and total packets). Then only 27 x 38ms (~1026ms) is needed. Maybe I misunderstood.
sramctc
sramctc 2 роки тому
@Andreas Spiess Ar.... I know now, I miss the word "using SF7", I thought it was also "SF12", so sorry about my mistake
Andreas Spiess
Andreas Spiess 2 роки тому
LoRa has several speeds (SF). I think there is a. diagram in this video. Maybe you watch the LoRa introduction video?
sramctc
sramctc 2 роки тому
@Andreas Spiess Ar...sorry... perhaps, let's put it this way. Regarding your test on the power consumption of LoRa , you did two tests. One was sending 210 bytes, it took 7700ms. The other was sending 10 bytes, it took 38ms. It seems to me that the result was not reasonable because the average time sending one byte in the first test was 36.7ms (7700ms/210) which was almost the same as the second test (38ms) which sent 10 bytes. If it is the case, no matter why, sending a larger packet in LoRa is not wise. Instead, splitting a larger packet into many shorter packets result in shorter sending time, ie lesser power consumption. Here is the calculation, for 210 bytes, we take 8bytes from it to form a smaller packet and adding two bytes for packet management, so the total number of packets to be sent out is 210/8 ~ 27 packets. The total sending time will be, 27 x 38ms, around 1026ms, which is less than 1/7 times of sending 210bytes as a whole (the first test, 7700ms). Obviously, something went wrong, maybe I misunderstood, or the measurement? 770ms not 7700ms?
Andreas Spiess
Andreas Spiess 2 роки тому
Unfortunately, I cannot follow your calculations. But I watched the video again and it seems clear to me.
Jeffrey Groberman
Jeffrey Groberman 2 роки тому
Hi Andreas I'm wondering if you can point me into the right direction. This video seems like a great start. I've been using NRF24101's on a project to send water level from our well to the cottage. The problem I'm having is that the NRF24101 doesn't like transmitting through trees. The range is only a couple of hundred meters and in the fall when there are no leaves it works - sort of. I've wanted to try use the ESP8266 and see how it does, but I haven't found any sketches implementing it with a the HC-SR04. My programming skills are still rudementary - mostly I can cut and paste and combine programs. But haven't found any that combine ESP 8266 and HC-SR04. Do you know of any?
Andreas Spiess
Andreas Spiess 2 роки тому
Maybe you look at 433 MHz modules. They perform better over longer distances. Did you use the high power version of the NRF?
Daniel Stingl
Daniel Stingl 2 роки тому
hallo Andreas, ich bekomme komischerweise immer Send Done, auch wenn ich dem Empfänger vom Strom nehme oder die Mac in eine andere ändere. Hast du ne Idee was ich falsch mache? Ich nehme 1:1 deinen sketch
Daniel Stingl
Daniel Stingl 2 роки тому
@Andreas Spiess ok, danke, werde ich probieren
Andreas Spiess
Andreas Spiess 2 роки тому
Nein. Remote debugging ist sehr schwer. Vielleicht helfen print statements an den strategiischen Stellen.
Jesse Parker
Jesse Parker 2 роки тому
Would it be possible to use 1 ESP module to act as a ESP-now to Wifi gateway? This way many battery powered sensors could send messages to a mains powered gateway for forwarding to the internet. For example, a security system.
Andreas Spiess
Andreas Spiess 2 роки тому
I am not sure if you van have both modes at the same time
PHILG2864
PHILG2864 2 роки тому
Hi Andreas, very informative video, thank you Whilst there are plenty of examples of its use, I've spent a lot of time trying to find the ESP8266 library itself, it seems Github has many variations and function constructs and defines are different between different versions, with different people adding various arduino library wrappers. I've done quite a few 'Alexa' projects so I'm happy working with the esp8266 via WiFi, I use only the tiny ESP-01 boards, using the ESP extensions in the Arduino IDE and programmed via async serial. All work well. But I've been unable to compile anything at all for espnow! As yet I've not found anyone successfully using espnow on the ESP-01. If I could just get the simplest espnow example to compile I would be happy! Keep up the good work, the Lora videos were particularly helpful. Cheers :-) Phil
Andreas Spiess
Andreas Spiess 2 роки тому
Maybe the flash memory is too small?
Oli R.
Oli R. 2 роки тому
Ein aufwändig gemachtes Video, das einen tollen Überblick gibt ! Vielen Dank dafür ☺️
Andreas Spiess
Andreas Spiess 2 роки тому
Gern geschehen!
Kevin Roach
Kevin Roach 2 роки тому
Great videos! How about range? I need to get 200 - 300ft of point to point range. What is the best way to go?
Andreas Spiess
Andreas Spiess 2 роки тому
If it is line of sight with no obstacles, WiFi might work. Otherwise LoRa is better. I would first try WiFi.
BAM5
BAM5 2 роки тому
6:05 micro seconds or millisecond? Display says ms not us?
Andreas Spiess
Andreas Spiess 2 роки тому
:-)
BAM5
BAM5 2 роки тому
Ah ok, it says 8s (8000ms) a little later.
Netanel Cohen
Netanel Cohen 2 роки тому
Hi I am interested working with you on a project with the ESPNOW and LEDs Controlling LEDs from Master ESP32 to Slave ESP32 . Only point to point between two ESP32.
Andreas Spiess
Andreas Spiess 2 роки тому
I am a UKpostsr, not a consultant :-(
Skodra
Skodra 2 роки тому
What is the range?
Andreas Spiess
Andreas Spiess 2 роки тому
Maybe you watch my LoRa playlist?
Alexandra Crawford
Alexandra Crawford 2 роки тому
Dear Andreas, as always your contribution is valued and highly valuable. In this case however I must comment on the continued usage of historical and outmoded references to "master" and "slave" as originating from a supremacist vocabulary. Recent similar discussions have remarked upon alternative functional terms (dependant upon context) as: "control vs remote vs return" & "origin vs target vs response" with: a common term of "message" referring to the data from the control or originating device & data sent back to the origin or control device being referred to as the "return or response" This not an exclusive list but is a starting point for memorable replacements with CRR & OTR mnemonics for non exclusive examples of "Comfort Requires Relaxation" and "Open Truths Refresh" Good Job Andreas!
Alexandra Crawford
Alexandra Crawford 2 роки тому
en.m.wikipedia.org/wiki/Triangular_trade. I agree your national history and identity stand as exemplary and are iconic representations of neutrality. I do not think you would be drawn into any discussion to logically prove your outlook. However even Switzerland stands upon the shoulders of vast economic inputs from 400 years of lucrative triangular trade by Western European countries including the UK who are trying to avoid responsibility for the fallout from arms trading to the Middle East by exiting the European Union. Our histories are all based upon supremacist exploitation of an isolated peaceful continent and it's populations. Please reconsider your use of historically tainted and conceptually overloaded terms. Although you may say they are in use within an industry characterised by white males, the need to recognise seed concepts as a danger in the naive mind that has not yet grasped the functional concept of balance to establish self organizing neutrality. Such personalities are readily targeted by unbalanced supremacist personalities for their own gain. The symbols of national socialism circa 1930 Germany have been outlawed for similar good reason. Please show respect for the millions of personal tragedies created by the paired concepts of "slave" and "master". Non but ourselves can free our minds, but we can help each other. Thank you, Andreas
Andreas Spiess
Andreas Spiess 2 роки тому
Fortunately, we Swiss have no such history and our thinking is "clean". So I have no issue using these commonly accepted (in electronics) words.
Dave -in-NJ
Dave -in-NJ 2 роки тому
nomencalture... 7:16 three choices controller, slave, combo. each controller can access 6 or 10 or 20 slaves. each controller can access 6 or 10 or 20 peers. Antony Elder made a sketch that ... gateway that acts as a slave.. the controller sketch sends data to the slave(s) this seems to be confusing to me. (maybe just me) but to me, a gateway allows passage. the combo, to me, would be the gateway the peer/slave would be the end point If I have a temperature in my basement, read that on my slave/peer send it to my controller controller acts as a combo, sends to a second controller that is near to a WiFi the second controller can receive data from the combo, then put that onto the internet. In my attempting to learn about sending and receiving data, the internet, wifi, RF, ESP-NOW, all seem to use similar words to mean different things. I know that you did not invent the Internet (that was Al Gore), or the nomenclature, but it seems that every new type of device picks similar words and then defines them differently. makes it hard to grasp and gain a full understanding. Love your videos, very helpful to a huge audience. (get a thumbs UP )
Dave -in-NJ
Dave -in-NJ 2 роки тому
@Andreas Spiess The link in your description takes us to github/ HarringayMakerSpace / in the sketch - espnow-sensor-bme280.ino he states "Sends readings every 15 minutes to a server with a fixed mac address" so, one would assume a slave or peer sending to a controller.... from the sketch : esp_now_set_self_role(ESP_NOW_ROLE_CONTROLLER); so, the controller is sending the data to the slave. but in the description, the controller can receive data from up to 20 slaves. this just gets confusing. to add to my frustration, my ESP8266 will not re-start on new power. I have to up-load the sketch and never loose power for it to run. I wish manufacturers could make things as well as you explain them !
Andreas Spiess
Andreas Spiess 2 роки тому
I think you have to read a little more about wireless communication as you mix many things. The first being the thing with Al Gore: The internet was invented when Al Gore was a teenager ;-) There are several layers in communication: The the physical transmission (frequency, modulation), and some protocol layers (e.g. binary or TCP). All have different characteristics and also different names.
Serghei Garau
Serghei Garau 2 роки тому
hello Andreas, many compliments, your videos are always very interesting !!! I wanted to use this ESPNOW technology for an outdoor application. But when I tested the sketches, I noticed that ESP32 heat a lot and this seems to me a big problem especially for the reason that some nodes would go in the box exposed to the sun and I can not install a fan ... I think that LoRa does not have this problem, what do you think?
Andreas Spiess
Andreas Spiess 2 роки тому
LoRa transmitters use less power and heat up less. But the sun might be your real problem.
Thorsten von Eicken
Thorsten von Eicken 2 роки тому
Your esp8266 vs LoRa comparison is really apples to oranges. Besides the generally different benefits what you did is not technically accurate. You used the LoRa TX at max power when you should have used it at a power level that gives it the same range as the esp-now signal. Then LoRa would have performed a lot better!
Andreas Spiess
Andreas Spiess 2 роки тому
I know that I compared apples with oranges. But unfortunately, many people (viewers comments) thought both are the same. This was the reason for that video. So maybe you were not the right audience, you knew it already. Many viewers thought, LoRa will be a better WiFi and will replace it.
david murphy
david murphy 3 роки тому
Just a quick note as I have not seen much written on the ESP-Now topic. I have tested distance/range of 2 different types of ESP32 boards, DOIT Devkit V1 and a TTGO T7_V1.0. I used the scripts by "Harringay..." as listed above. No matter what combination of boards the greatest distance I could get between master and slave was approx.15m. My wifi distances were similar. Anyone else carry out measurements with different boards ? Ta.
Automation 4pro
Automation 4pro 3 роки тому
HI Andreas. How can I send multiple float variables (from BME sensor) via Serial from one esp to another? I would like to have one esp receiving the sensors values via espnow and after, this esp sends these values to another esp via Serial. Like that I do not have to connect again and again with the first esp to wifi in order to send the sensor addresses to mqtt. Thank you.
Andreas Spiess
Andreas Spiess 3 роки тому
You can package all in one line separated by a comma or another character and then parse them at the other side, It needs some coding.
Automation 4pro
Automation 4pro 3 роки тому
I know that. What I want to do is to send all 3 variables (temperature, pressure, humidity) once.
Andreas Spiess
Andreas Spiess 3 роки тому
The two commands are serial.print and serial.read.
yowojtas
yowojtas 3 роки тому
If anyone gets this message: exit status 1 user_interface.h: No such file or directory I cant find any useful answer in Google. Thank you and best regards
leef_me
leef_me 3 роки тому
Andreas, I have two questions for you. In most of your videos you have a part of your video that uses the same phrase ?__? youtubers, here is the guy with the Swiss accent ... What is the word you are using for ?__? In this video, #172 you tell us about low power operation using ESP-Now, which is a Wi-Fi-like protocol. **Is there a similar peer to peer protocol for two ESP32 modules using BLE instead of Wi-Fi?** Thank you for all your videos. You are the 'favorite uncle', who understands electronics and software. You have a lesson plan, manage the technical details, as well as doing the video recording and editing.
leef_me
leef_me 3 роки тому
Thank you for both answers. I encourage you to investigate the matter. Best wishes, Leef_me
Andreas Spiess
Andreas Spiess 3 роки тому
1. I say "Grützi UKpostsrs". This is Swiss German and means "Hello UKpostsrs" 2. If you watched my BLE ESP32 videos you saw that I think, BLE was not ready at this time, at least not in the Arduino IDE environment. Since then I did not investigate anymore.
Automation 4pro
Automation 4pro 3 роки тому
Compiling EspnowSlave results with error about missing credentials.h file. Do you have any idea why is that Andreas? Thank you
Automation 4pro
Automation 4pro 3 роки тому
That seems to work. Thank you.
Andreas Spiess
Andreas Spiess 3 роки тому
You can delete the line with credentials.h and fill in the credentials in your code.
DelphiTheDolphin
DelphiTheDolphin 3 роки тому
Just wondering how far (distance-wise) you could go apart with ESPnow? I have to spread some weather-stations (temp, humidity, airpressure, maybe even light/lux) across a park and can only store data at one ESP and/or connect to wifi to send it. I wonder if a photovoltaic cell with a bunch of proper NiMH battery would be good enough to run this for a year or so.....
Andreas Spiess
Andreas Spiess 3 роки тому
You have to check the range yourself. It depends on many parameters. And I did a video where I answered your second question.
Lars Andersen
Lars Andersen 3 роки тому
Crazy! I just calculated a 3 year lifetime when running on a 2600mAh 18650, sending data every hour. Work just got really fun.
Andreas Spiess
Andreas Spiess 3 роки тому
:-)
P F
P F 3 роки тому
I want to create a point to point connection to my android phone from ESP32. Can I use the ESPnow library to accomplish this?
P F
P F 3 роки тому
Ok, I guess bluetooth is the way to go then. Thanks. Great videos by the way.
Andreas Spiess
Andreas Spiess 3 роки тому
I do not think so. You have to use normal web services or Bluetooth
tornadokat
tornadokat 3 роки тому
Dang nabbit! When I compile for an ESP32 board it is OK but when I compile for an ESP8266 board it says "fatal error: esp_now.h: no such file". I made sure my Board Library has the latest version for ESP8266 (2.4.1). Does anyone know if something special has to be done to enable Arduino IDE (I have 1.8.5) to use ESP-Now?
tornadokat
tornadokat 3 роки тому
OK finally figured it out. It was a ESP8266 library vs sketch issue (espnow.h vs esp_now.h) etc.
Andreas Spiess
Andreas Spiess 3 роки тому
Did you search the internet? I used another version of the ESP8266 infrastructure.
Steve Wright
Steve Wright 3 роки тому
*pauses video, opens new tab, types 5123/365... 8-o
Pedro Federici
Pedro Federici 3 роки тому
Hello, Andreas. Will you make more videos about espnow?
Andreas Spiess
Andreas Spiess 3 роки тому
I do not think so. What is not covered?
labomat
labomat 3 роки тому
Hi Andreas, can you recommend an ESP-32 chip with external antenna to reach a point-to-point connection about 300 - 500 meters to another ESP-32 or an ESP8266?
Andreas Spiess
Andreas Spiess 3 роки тому
I never tried.
labomat
labomat 3 роки тому
Do you think that 300 m are possible with non directional external antennas?
Andreas Spiess
Andreas Spiess 3 роки тому
Maybe you watch my new video with boards. 500 is a lot for WiFi. You probably need directional antennas
mayank anand
mayank anand 3 роки тому
hello, can anyone help me out on how to interface with firestore using rest api to send data using esp8266
Andreas Spiess
Andreas Spiess 3 роки тому
Maybe you watch today's video...
DGB
DGB 3 роки тому
I’m now asking myself why I have not watched all your videos. I’m grateful that you have taken so much effort into micro controller technology. I will now research about ESP32 now.
Andreas Spiess
Andreas Spiess 3 роки тому
Enjoy the ESP32. It has very good features.
Andreas Jell
Andreas Jell 3 роки тому
A very good video, thank you so much! I have a question. There are modules with an ESP32 and OLED and Antenna with LORA-Chip. For that modules, is it possible to use that antenna also for esp.now? Or only for LORA? Thanks
Andreas Jell
Andreas Jell 3 роки тому
Yes that's right - but the ESP-07 is only an esp8266. I am looking for an ESP32 with antenna for EspNow
Andreas Spiess
Andreas Spiess 3 роки тому
The ESP-07 module has aWiFi antenna connector
Andreas Jell
Andreas Jell 3 роки тому
I did, and still I am watching... But I can't find out if there is a module which Esp.Now is working with a external antenna (and not with the chip antenna)...?
Andreas Spiess
Andreas Spiess 3 роки тому
Lora is a different radio on a different frequency. The antenna is only fo this radio. Maybe you watch my video concerning these boards.
John Congerton
John Congerton 3 роки тому
Excellent, as always
Andreas Spiess
Andreas Spiess 3 роки тому
Thanks!
Aura-Comms
Aura-Comms 3 роки тому
Thanks again Andreas, you are definitely the best companion for any project
Andreas Spiess
Andreas Spiess 3 роки тому
Thank you!
Stefa
Stefa 3 роки тому
Thank you for this nice video! Helped me a lot. I created my own code for Esp Now and it works fine, but....using direct ESP2ESP communication made indoor range of a device very short distance. It could not connect to other ESP8266 which was just behind desk. I am using ESP01's for this project. Do you have any idea why is it so? Bad antenna on ESP01 maybe?
Andreas Spiess
Andreas Spiess 3 роки тому
I did not do any range tests, so I do not know. But I would assume a similar range as in" normal" mode
CintraxBR
CintraxBR 3 роки тому
Hi, great videos !!! For a 1-2km range which one would you use ? I have a small farm and would like to open and close water valves for the irrigation system. Thanks, Max
Andreas Spiess
Andreas Spiess 3 роки тому
You can watch my videos on LoRa range. Wi-Fi is not made for big distances
Unitech Marine
Unitech Marine 3 роки тому
Hi Andreas. You should explain the range difference in LoRa
Andreas Spiess
Andreas Spiess 3 роки тому
I think I have many videos about the range of Lora. But I am planning a video about Range of Wi-Fi and BT
Lukas Bachschwell
Lukas Bachschwell 3 роки тому
Incredible =D thanks for this really really cool videos
Andreas Spiess
Andreas Spiess 3 роки тому
Thanks!
Olaf Kaus
Olaf Kaus 3 роки тому
Hi Andreas, first: Thanks a lot for your detailed and interesting videos. Because the ESP32 also include Bluetooth, what is your opinion about a Bluetooth Mesh for Sensors? Especally in battery consumption. Thx, in advance Olli
Andreas Spiess
Andreas Spiess 3 роки тому
I am no fan of mesh in general. If it would be useful, It would be used much more. In my opinion it is ok for a fe niches. BT only has a small reach.
CNLohr
CNLohr 3 роки тому
Just FYI you can use ESP-NOW in broadcast mode. So you can communicate to every single ESP within earshot, with no limit on the number of ESPs. You can also receive those packets from any consumer wifi devices without much difficulty.
Glasshopper
Glasshopper 2 роки тому
@CNLohr If you do a video on it, I will subscribe.
Beezy King
Beezy King 2 роки тому
CNLohr did it work? I’m curious.
CNLohr
CNLohr 3 роки тому
They told me in an email that I could just set the destination to FF FF FF FF FF FF and it sends it to everyone, so I'll have to give it as shot.
CNLohr
CNLohr 3 роки тому
I actually don't. With MAGFest-related things, we've been using the older mechanisms to do broadcast rx/tx packets, but, it's coming time I need to refresh our stuff and use the new ESP NOW broadcast modes. Espressif says they added it for us about a year ago, so it's kind of embarrassing we haven't used it yet. I may take this on this weekend. I appreciate that. I really wish I had more focus to work on youtube videos. The regularity and consistent quality you keep putting out is thoroughly impressive.
Andreas Spiess
Andreas Spiess 3 роки тому
Thanks for the hint. Do you have any example code? You are much better than me on these protocol things. BTW: I love your channel and admire the speed you are able to achieve new things.
electrobob
electrobob 3 роки тому
Good news, now it is feasible to get 1 year from 2 AA for most sensors. I am guessing the first ~150ms is the actual calibration of the ESP and no chance to shorten it out?
Andreas Spiess
Andreas Spiess 3 роки тому
I also think so.
Introduction to ESP32 - Getting Started
47:57
DroneBot Workshop
Переглядів 662 тис.
KiCad STM32 Hardware Design and JLCPCB Assembly
2:31:06
Phil’s Lab
Переглядів 459 тис.
#188 Antenna Tutorial incl. cheap DIY Antenna Tester (LoRa, ESP32)
18:39
Andreas Spiess
Переглядів 138 тис.
#154 Solar Charger for Microcontrollers
17:33
Andreas Spiess
Переглядів 82 тис.
#112 LoRa / LoRaWAN De-Mystified / Tutorial
20:25
Andreas Spiess
Переглядів 696 тис.
#328 ESP32 Secrets: Interrupts, and Deep-Sleep under the Hood
18:57
Andreas Spiess
Переглядів 121 тис.
Bring Me The Horizon - DiE4u (Official Video)
5:21
BMTHOfficialVEVO
Переглядів 1,1 млн
Тайна гаражей - Список секретных тачек в Москве
28:48
Жекич Дубровский
Переглядів 2,3 млн