#252

  Рет қаралды 110,960

Andreas Spiess

Andreas Spiess

5 жыл бұрын

We can save energy by deep-sleeping the ESP32. During this time, the chips do not consume a lot of energy but also are not responsive. This is why Espressif included a mysterious Ultra Low Power core (ULP) which is active when the main processor sleeps. People say it has to be programmed in Assembler, and nearly nobody was able to program it in the Arduino environment.
Until now.
Links:
Arduino IDE ULP repository: github.com/duf...
Sketch: github.com/Sen...
ESP32 module: s.click.aliexpr...
ESP32 Board: s.click.aliexpr...
ULP commands: docs.espressif...
Technical Reference: www.espressif....
Otii power Supply: www.qoitech.com
Supporting Material and Blog Page: www.sensorsiot.org
Github: www.github.com...
My Patreon Page: / andreasspiess
Alternative: flattr.com/@an...
My Bitcoin address: 19FSmqbBzb5zsYB1d8Bq4KbxVmezToDNTV
If you want to support the channel, please use the links below to start your shopping. No additional charges for you, but I get a commission (of your purchases the next 24 hours) to buy new stuff for the channel
For Banggood bit.ly/2jAQEf4
For AliExpress: bit.ly/2B0yTLL
For ebay.com: ebay.to/2DuYXBp
www.facebook.c...
/ spiessa
www.instructab...
Please do not try to Email me or invite me on LinkedIn. These communication channels are reserved for my primary job

Пікірлер: 580
@cpfs50
@cpfs50 5 жыл бұрын
Hi Andreas, this is by far your best and most exciting video yet! I also wrote assembler in the late 70's and 80's so I hope I can meet your challenge. This feature of the esp32 was what interested me most when it came out. Thank you so much for opening the door for me.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I also waited a long time to get this "missing link" from duff2013.
@crckdns
@crckdns 5 жыл бұрын
"Most playtime per dollar" 😹 ich musste sehr lachen, Danke! Danke, endlich mal "aktuelle" Videos über low-level Sprachen und Microcontroller 😻👍 Endlich kann man wieder auf Effizienz programmieren, wie im Studium gelernt :) Wusste gar nicht dass ESP diese Schnittstelle hat 💗 danke!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Dann freue ich mich schon über deine Teilnahme am Challenge ;-)
@iiilllii140
@iiilllii140 2 жыл бұрын
Andreas you are very funny. 😁 I love your videos!
@KJBtheMosFett
@KJBtheMosFett 5 жыл бұрын
Moved all my senior design code from atmega to the esp. Got the display working,moved peripherals. Using your guide for the rtos. I can't believe this thing is under 10$. You are awesome. Thank you for this, sincerely from Texas.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Glad you have success with the ESPs..
@jamess1787
@jamess1787 5 жыл бұрын
I love the plastic hand. Makes me laugh everytime.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Thank you!
@jasonmhite
@jasonmhite 5 жыл бұрын
Aweseome! I've played around with the ULP using ESP-IDF, but it's a hassle to get it set up and integrated into the build system. Glad to have this video, the ULP is a really cool part of the hardware that hasn't been talked about as much.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Part of it was because it was no easy way to use it with Arduino. At least that is what I think.
@JohnoScott
@JohnoScott 5 жыл бұрын
Omg I am so excited to know how to program the ULP. The esp 32 keeps on getting more exciting. Thank you Andreas
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
You are welcome!
@HelmutTschemernjak
@HelmutTschemernjak 5 жыл бұрын
Great video as always, thank you. I use another method which works in C without programming the ULP. There is a wake up hook function when the ESP32 wakes up. It gets called before booting the ESP32, before the flash is activated. C functions can be placed into the RTC memory for little processing. This function can continue to boot the ESP32 (which takes 0.3 secs) or put it into deeplseep again. This hook requires only 3 ms to check some processing. The advantage is can it can be programmed in C, the disadvantage is that only low-level IO can be done because program functions (FLASH) are not available. However all registers and ESP32 ROM functions can be used, or own functions marked with IRAM_ATTR will also work. This is pretty much low level like the ULP, however programmed in C with proper print debugging, etc. Regards Helmut (Arduino Hannover & RadioShuttle.de)
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Interesting idea. I did not know that it exists. Maybe there is a small difference: The ULP clocks quite slow but still is quite fast because of its simplicity (microseconds) and only needs "full throttle" 2mA. So you can run it every few ms and still hardly consume any energy. Might be interesting for faster moving signals where you have to check quite frequently.
@HelmutTschemernjak
@HelmutTschemernjak 5 жыл бұрын
The main reason I use the wakeup hook is that the deepsleep timer does not last long, therefore it wakes up the ESP32 too often which consumes energy, now I can just re-enter into deepsleep (3 ms versus 300 ms).@@AndreasSpiess
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
That what I understood. It is a goo way to save energy by reducing the on-time.
@joachimbaumann731
@joachimbaumann731 5 жыл бұрын
Hi Andreas, the Voodoo you are talking about allows the compiler to calculate the size for all the ULP programs (which is why you have two arrays that contain pointers to the begin and end of the ULP program, respectively). But as always a fantastic video. One idea for the challenge: Read 1-Wire sensors...
@cannesahs
@cannesahs 5 жыл бұрын
1-Wire would be awesome
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
@Joachim: I thought it will also load the code to RTC memory? And thank you for your nice words!
@InfiniteQuest86
@InfiniteQuest86 5 жыл бұрын
@Mai Mariarti I tried the I2C example yesterday, and it does not work with Arduino out of the box (it won't even build). Although the adc code from their github doesn't work either, but Andreas's code works great. So there's some more voodoo to figure out. The list of operations has I2C_RD and I2C_WR, so I believe at least one of the pins has hardware support builtin. I'm going to try to tackle this today.
@Magic-Smoke
@Magic-Smoke 5 жыл бұрын
Good to see this finally get some airtime :) I tried it last summer but ended up running into problems with the ADC at the time. Nevertheless, thanks for expanding the audience and hopefully the number of available working projects
@aspuzling
@aspuzling 5 жыл бұрын
What problems did you have with the ADC? Does the example Andreas gave here help you?
@Magic-Smoke
@Magic-Smoke 5 жыл бұрын
@@aspuzling I had problems expanding to use the other pins at the time. I was using the same examples from Duff2t013. They are good examples but I was short of the brain cells and it was hard work to get it all working. As I recall, I got there in the end but it wasn't straightforward... In the end I kept on using the ADS1115.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I only used this example but did not do thorough testing. It worked for my thresholds.
@mt-qc2qh
@mt-qc2qh 5 жыл бұрын
Great info! I spent many years in assembly language on DG Nova's and early micros (6502 and 8080). Glad to get to use it again. The ESP32 has a lot of hidden power. Looks like fun.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
So it will be easy for you. It is already good if you still remember how to calculate with short hex numbers and overflow ;-)
@prlombaard
@prlombaard 5 жыл бұрын
Hi Mr Spiess, another well documented video just to get the juices flowing. The ESP32 is becoming more and more an IoT contender because of the ultra low power capability. and now with the ULP processor even more so! Thank you for the video.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
You are welcome!
@petermeiner3574
@petermeiner3574 5 жыл бұрын
Yes,the good old times. Programming a Z80 with an Manual(a real paper book!), and then calculate the bits by hand( yes, also on paper.....) to hex values. Then type all Values by hand into the dev.board , which only have some switches, 7segment led and a small keypad! And if it loose the power, all is gone. Young people couldn't understand, how amazing the first blinky on those projects make me so Lucky, to get it running.....
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Not to forget the cassette tape recorder to save the programs. I still prefer the modern tools if I have to get somewhere...
@kevinnicholls1017
@kevinnicholls1017 5 жыл бұрын
I had a lovely hand written ready reckoner for the Z80 with the instructions laid out in a 16 by 16 grid. Fond memories, but the good times started for me with emulators, break points, swiftly followed by C. Debugging assembler without JTAG sounds hard work.
@Cairos1014
@Cairos1014 5 жыл бұрын
I dont miss those days, but I still think it was a fun and educational process to toggle in the bootloader on an Imsai 8080 via the front panel! Thankfully, I'm not so old I had to enter the whole program that way.
@LutzSchafer
@LutzSchafer 5 жыл бұрын
Yeah these were the days. In the late 70's without an assembler I developed a four pole linear circuit simulator on a ZX spectrum. Everything was developed on paper and very little debugging was necessary because you had to think rigorous with attention to detail. Still have a binder full of hand written assembly and it's hand-translated machine code. Unthinkable for today's standards. For back in these days this was the fastest code. But you had to do everything even design your floating point arithmetic. This program could deal with up to 200 nodes and had FFT for time domain output. Amazing how little memory we were forced to use.
@mikebrown7366
@mikebrown7366 5 жыл бұрын
I learned on 1802 by hand assembling. A truly painful experience, but taught me to really think out the project before writing one line of code.
@TMS5100
@TMS5100 5 жыл бұрын
you would think espressif would want to strongly encourage support of this feature. someone should make a C compiler for the ulp. the 8kb of the ulp is quite adequate for some reasonable code.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Maybe they do. I do not know.
@AndreaBorgia
@AndreaBorgia 5 жыл бұрын
I would say that the target audience for this feature is comfortable with using assembler, so they see no need for a compiler. The code is minimal anyway.
@AndreaBorgia
@AndreaBorgia 5 жыл бұрын
@Mai Mariarti I see your point and I agree, I was only trying to see things from ESP's point of view.
@Spritetm
@Spritetm 5 жыл бұрын
Espressif guy here: The issue is that the ULP barely is a microcontroller. It originated from a few digital people trying to build a somewhat programmable state machine to do some sensor sampling in deep sleep mode, then added in enough logic to make it turing-complete. Porting C to it would be a pretty tall order. We have something in mind that will make that possible for the ULP in our next chips, if that's a comfort.
@mikebrown7366
@mikebrown7366 5 жыл бұрын
@@Spritetm I agree. Some processors just weren't made to support a C compiler. For example, 8 bit PIC chips. This "CPU" smells more like an FPGA state machine. Being a long time assembly language lover, I will be looking into this architecture.
@springwoodcottage4248
@springwoodcottage4248 5 жыл бұрын
Thank you for introducing me to these super useful & very practical capabilities of the Esp32 especially for battery application. The ability to do things with out troubling the main processor has extraordinary potential for extending battery life which is always something that is useful for end users. Thanks for sharing!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
You are welcome. Please consider participating in the challenge. It would be a good jump-start ;-)
@cedricwalter2442
@cedricwalter2442 5 жыл бұрын
11:32 There is a register that directly controls the rtcio pins output. WRITE_RTC_REG(RTC_GPIO_OUT_REG, 26, 1, 1) This line directly controls gpio 2.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Thank you. I will try. I wonder why the examples do not use this simple way :-(
@bardenegri21
@bardenegri21 5 жыл бұрын
Wow! Been waiting for this for a long time. Amazing stuff. Now I can finally make my mqtt door sensors. I have boards for a trigboard-based design just for this task, but now I will try it with just an ESP32. Great stuff!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
It needs a little more than a trigboard. But is probably ok for most battery applications
@hashemsharrab5430
@hashemsharrab5430 5 жыл бұрын
NS Gaming would like to build and IOT device if we can talk
@kevinnicholls1017
@kevinnicholls1017 5 жыл бұрын
This was exactly my thought. Wake on state change to report door open and door close events via MQTT without the need for complex supporting circuitry. Exciting.
@LostDeadSoul
@LostDeadSoul 5 жыл бұрын
Nice. This is exactly what i need to make a ULP power management system for a wind turbine project. Thank you for this tip!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Good luck for your project!
@youliantroyanov2941
@youliantroyanov2941 5 жыл бұрын
Another old geezer assembler fan here. Andreas ftw :)
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
So where is your proposal for the competition ;-)
@jvgorkum
@jvgorkum 5 жыл бұрын
Andreas thank you for explaining this (cool) feature and willing to spend 100 usd for the open-source competition (thumbs up)
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I hope we will get some interesting contributions ;-)
@tonysfun
@tonysfun 5 жыл бұрын
Great video! My friends and I were looking into this "issue" last year and your video is far the best! Thanks again Andreas!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I am only the messenger. The hard work was done by duff2013.
@walterpark8824
@walterpark8824 5 жыл бұрын
Better than consistently good. Excelsior!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Thank you!
@jamisusijarvi646
@jamisusijarvi646 5 жыл бұрын
After 20 years, do I really need to go back to assembler. Oh boy :)
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I am sure you will remember a few things. And maybe you still find your old hex calculator ;-)
@piconano
@piconano 3 жыл бұрын
Holly bananas batman! I thought it would be a simple task to use the ULP! The links alone saved me hours of googling. Much appreciated.
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
It is not easy. This is probably why you do not find a lot of projects using it.
@xyloidify
@xyloidify 5 жыл бұрын
Love your sense of humor! Great video as always! Brought back memories of 6800, 6502, and 6505. Love voodoo lol!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Thank you!
@CTCTraining1
@CTCTraining1 5 жыл бұрын
Fascinating challenge... I would recommend mentioning the prize challenge in the video title (or making another video to link to this one) as I’m sure folks who relish such problems might miss it with the sleepwalking title.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Done. Thank you for your suggestion.
@mikebrown7366
@mikebrown7366 5 жыл бұрын
No call or return instructions, but it seems likely that implementing them as macros would be fairly easy. This is based upon the 30 minutes I spent looking at their amazingly clear documentation on the "instruction set".
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I am curious about the contributions for the contest. I hope we will see some creativity there...
@SimonRichardMasters
@SimonRichardMasters 5 жыл бұрын
Espressive is a sharp company, they are sending development kits
@Nichetronix
@Nichetronix 5 жыл бұрын
Great video, Andreas! I accept your challenge to create a cool project with the ULP!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Just send me a message on facebook or on twitter when you are ready...
@stuartcoyle1626
@stuartcoyle1626 5 жыл бұрын
It is good to see these features being implemented for Arduino and thus made available to many more people. I've been using ESP-IDF rather than Arduino, but then again I've been a professional programmer for a while. I willhave a go at your competition if I come across something interesting to do.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I would be glad to see your contributions to the competition!
@StefanoBettega
@StefanoBettega 5 жыл бұрын
Awesome introduction, this opens a lot of possible use as battery powered security sensor for the ESP32. I have a garage that can't be connected to the alarm plant, but I can reach it via WiFi: I can now use a battery powered ESP32 to probe the environment and receive alerts if needed. Thanks!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
You are welcome!
@davidbradley3074
@davidbradley3074 4 жыл бұрын
Andreas, Thank you for all of your hard work and iniating this challange to promote support software. You guys are great!
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Our pleasure!
@Palifra
@Palifra 5 жыл бұрын
After Lora series, maybe the best video to date.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Thank you. I have to admit, I liked also very much producing it. I waited for a long time until a got this chance...
@jorgedelcastillo2811
@jorgedelcastillo2811 5 жыл бұрын
Great video, Andreas ... "until recently" the PICs were programmed in assembler too.
@ralfoide
@ralfoide 5 жыл бұрын
For some version of "until recently"... The MPLAB X IDE has been available for the last 5 years, for free with a C compiler :) That said I had fun with the 12-bit words and reduced instruction set in the older PICs in the 90s. That was a different level of fun.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Maybe this is why PICs were no more as popular as Arduinos ?
@listerdave1240
@listerdave1240 5 жыл бұрын
PIC has been programmable in both C and assembly years before Arduino even existed at all and still can. Also, while C is obviously more convenient there are still times when it is useful to use assembly. That is mostly the case when you need fast acting realtime operation such as precise timing signals, dealing with stepper motors running at high step rates and so on.
@MikeKranidis
@MikeKranidis 5 жыл бұрын
Dear Mr. Spiess, congratulations for the topic and the fantastic video... I am also one of z80 assembly trained... I hope to have more advanced video for the ESP32 I think it deserves. Thanks again.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I do not think I will do an advanced video here. I hope some viewers will "bite the bullet". Maybe somebody writes a tutorial?
@sethrd999
@sethrd999 5 жыл бұрын
Great video Andreas, I had read about this but had not gone down the rabbit hole per se, as I had no vision for a use case currently. Il be going over this video again in detail as a solar project could perhaps do with this update.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I am sure some examples will pop up over time. Many projects where we use an ATtiny can be done this way.
@Cairos1014
@Cairos1014 5 жыл бұрын
Thank you again Andreas! I still don't understand the Python kerfluffel. The craftsman chooses the tool most fitted for each job. I have a number of ESP smart sensors around the house that could just as easily be running Python. C++ just happens to be my go-to hammer. It was a lazy choice.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I have a similar opinion. And if you came from the RPI your go-to hammer most probably would be Python. That was the point of my question. Anyway: I learned a new word: kerfluffel ;-)
@SimonRichardMasters
@SimonRichardMasters 5 жыл бұрын
I like Python, describing C as a hammer does my head in
@zyghom
@zyghom 2 жыл бұрын
Man, ESP, Arduino, LoRa - these are completely IRRELEVANT - what IS relevant is your speech like the one at 4:18 - I died almost! ;-) So lovely ;-)
@AndreasSpiess
@AndreasSpiess 2 жыл бұрын
Exactly. Glad you know what I am talking about ;-)
@zyghom
@zyghom 2 жыл бұрын
@@AndreasSpiess I played this part to my wife and her reaction: "what's funny?" ;-)
@RDarrylR
@RDarrylR 5 жыл бұрын
Very interesting. Lots of possibilities using these techniques. Assembler coding isn’t really that hard but I’m sure some people will come up with some more friendly libraries.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I would hope so. But browsing through the comments I am not sure :-(
@note380
@note380 4 жыл бұрын
Hi, I hope you are well during this tough time in the world. I have come across this video after searching online a way to keep counts of a pulse interrupt from a dds353 kwh meter and periodically send the counts over mqtt. I had not realized that esp was different from arduino in the way ISRs are handled during low power operations. Now I am convinced I need this approach shown in this video. Kindly point to how I can listen to interrupts and maintain a count for it then wakeup the main processor say after 10 minutes and pass the data over for Serialprinting( Mqtt transmission in my use case which I can do after I have figured out the ulp interrupt and periodic waking up of the main processor). This is very useful stuff thank you
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Nice project! I hope you will get it working.
@DrRChandra
@DrRChandra 5 жыл бұрын
(just sayin'...we may pronounce "one hundred dollars", but when written, currency symbols go before the number, such as "$100") This sort of thing is so great to know. Hardly anyone wants to spend more on energy than they should. If you have only one of these things, not so bad, but when you have a (smart) house full of them, it really adds up!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Maybe you are right with the 100$ But asking google there are many ignorants like me ;-)
@SimonRichardMasters
@SimonRichardMasters 5 жыл бұрын
Smiles at students these days
@UnrealVideoDuke
@UnrealVideoDuke 5 жыл бұрын
Great time frame! Some people will not be able to receive their parts in time to complete their projects by your deadline. I would give it at least 60 days.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
You are right. It is short. I thought that people not owning an ESP32 will anyway not be interested. And I wanted to keep the momentum.
@BaronVonBiffo
@BaronVonBiffo 5 жыл бұрын
After hearing your cat purr, Mogg E has carried out a frantic search of Schloss Biffo to see where her rival is hiding. :)
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
So "wireless cat communication" exists ;-)
@BaronVonBiffo
@BaronVonBiffo 5 жыл бұрын
@@AndreasSpiess :)
@paulrichmond6903
@paulrichmond6903 5 жыл бұрын
Andreas once again you blow us away with new ideas. Very well done.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Thank you!
@jamespcorbett
@jamespcorbett 5 жыл бұрын
Amazing find, ULP is super useful. Using it to make a battery powered switch board for my home that'll hopefully last a year.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Should be possible.
@jamespcorbett
@jamespcorbett 5 жыл бұрын
@@AndreasSpiess yeah, simply recording the previous state of the pins then waking up the main to update mqtt. I'll put it on github :)
@Ed19601
@Ed19601 4 жыл бұрын
How can I have missed this video? Ah, I see, I was abroad. Must have been 30 years when I was still doing stuff in Assembler (6502 and 8051 series) I disagree with you comparing it to a somnambulist: After your explanation of the pin numbers and hold commands, I prefer to see it as 'undead' or 'living dead'
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I will not start a fight for the right wording;-)
@Trivimania
@Trivimania 5 жыл бұрын
Hi Andreas. At minute 2:00 you tell that the esp32 can wake out of deep sleep if a pin is touched. I thought it was only possible what a timer was reached. Does that mean that for example for a simple door sensor (with magnetic reed contact) I don't have to use this ULP core and I can somehow put the esp32 in deep sleep and only let him wake up when the reed contact gives a signal ? Can I do this on SIGNAL CHANGE? Or is it only on UP or DOWN but not on CHANGE ? Kind regards from Belgium
@aspuzling
@aspuzling 5 жыл бұрын
I'm not sure about signal change, but you can set up a trigger for the ESP32 to wake from deep sleep when an IO pin goes high. Here is more info: pcbreflux.blogspot.com/2017/02/esp32-deep-sleep-example.html
@Iceteavanill
@Iceteavanill 5 жыл бұрын
Interresting Idea and very generous. I really want to see the outcome....
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Or you go into it yourself? After a little assembler programming, you will be the hero in hex arithmetics ;-)
@Iceteavanill
@Iceteavanill 5 жыл бұрын
@@AndreasSpiess Yeah thats true.. although im more of the hardware guy it would surely not hurt to try it out and gain some experience....
@CircsC
@CircsC 5 жыл бұрын
I think being able to monitor a cheap solar panel and battery on its own and change esp wake times based on available sunlight and battery levels
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Good idea!
@jerryhilburn9090
@jerryhilburn9090 5 жыл бұрын
Wonderful deep dive and very much appreciated by me! Thanks!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
You are welcome!
5 жыл бұрын
Watching this video eating ice-cream! Good time! Excellent subject as always, mr. Spiess! Just recently I got an ESP32-CAM and start learning ESP-IDF. Its so much better than Arduino environment IMO. Sure is a bit more complicated but RTOS is neat! And now I'm looking for a epaper display to mess around but they seem to be hiding in the market. What is going on?
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I do not know of issues concerning e-papers. I recently got two from waveshare
@TomasSab3D
@TomasSab3D 4 жыл бұрын
You are a god. This is presented so incredibly well. No words for it...
@alexpr0gressive
@alexpr0gressive 5 жыл бұрын
I was looking for arduino ulp support in platformio but didn't find anything yet, has anyone else been more successful ?
@BorisDessimond
@BorisDessimond 4 жыл бұрын
1y later with IDF yes, not Arduino.
@GregCormier
@GregCormier 5 жыл бұрын
For those curious, I just measured my ESP32 DevKit C at 2.8uA in regular deep sleep - and that includes the tiny built-in LED!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Thank you for your feedback!
@davidcircuity6473
@davidcircuity6473 Жыл бұрын
Measured ESP32-Wroom-D Dev. Board in regular deep sleep at 4.1mA.
@mahesh732
@mahesh732 4 жыл бұрын
"the chance you'll get it right the first time is pretty small." :-D. right on!
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
:-)
@wardog2118
@wardog2118 5 жыл бұрын
Maybe it's called touch_pad_7 because it's the 7th pin having the touch functionality? bad naming anyways xD thanks for this video! i was looking into that but never really had the motivation :)
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I think so. But I just want to know where I have to solder my poor wire on ;-) And there I only find 27
@CMusicPro11
@CMusicPro11 5 жыл бұрын
Kleiner Tipp zu deiner Kritik am Labeling der Pins: Durch die Mehrfachbelegung hat Espressif einige Ports eingespart, was wiederum Platz auf dem Chip spart. Das Label "Touch_Pad" scheint nach der Dokumentation von Espressif zu bedeuten, dass dieser Pin ebenfalls einer der kapazitiven touch pins ist. D.h. der Pin kann über den bloßen Kontakt erkennen, ob etwas "touchaktivierendes"(Bsp.: dein Finger) den Kontakt berührt hat. So kann bspw. ein Kabel vom Pin an eine leitfähige Münze angeschlossen werden und durch berühren der Münze kann etwas ausgelöst werden, wenn der pin im Programm verwendet wurde. Sonst, top!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Das weiss ich schon und ich habe ja ein Excel Sheet dafür erstellt.
@stefanf.5439
@stefanf.5439 3 жыл бұрын
Nice video, thanks for the internals. Assembler was never my world but i like the idea to speak computer language:)
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
For short sequences Assembler is ok, I think
@chriscauwelier
@chriscauwelier 5 жыл бұрын
Thanks! I Just bought one, let's test it! 👍🏻
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
:-)
@RodrigoCarbajales
@RodrigoCarbajales 5 жыл бұрын
Hi Andreas, again a great video! I would like to know if it is possible to have interrupts in ULP, I would like to have my 3D printed weather station working with ULP to save energy. So I would need to count rain drops and wind speed in ultra low power while main processor is in deep sleep and after a minute wake it up and send all the information using LoRa TTN.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
The ULP does not use interrupts. As described it starts every few ms. So it should be possible to measure both, wind speed and rain. At least my sensors create a relatively slow squarewave which can be read with the ULP.
@Megavoltamper
@Megavoltamper 5 жыл бұрын
Excellent video! Maybe a low power solar powered version of the Geiger-counter? Now it draws a lot of power because the ESP has to be always on to count the pings. I started to think about to do it with an ATTINY85 and an ESP yesterday. Where the ATTINY does the counting, and wakes up the ESP every few minutes, passes the ping number to the ESP and the ESP uploads the values to Thingspeak or similar. But maybe the ULP of the ESP32 could do the counting?
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Counting the Geiger pulses would be a good example. Only trigger the ESP if an alarm occurs and your ESP runs for a long time ;-)
@ewap-by-daniel
@ewap-by-daniel 5 жыл бұрын
Danke für das super Video. Überlege mir gerade mit Was für einem Projekt ich mitmachen kann.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Super! Freut mich.
@deangreenhough3479
@deangreenhough3479 5 жыл бұрын
Happy Sunday Morning Andreas 😁🏴󠁧󠁢󠁥󠁮󠁧󠁿 what a start to 2019😀😁😁😁😁😁😁😁😁😁😁
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Happy Sunday to you, too!
@norm1124
@norm1124 5 жыл бұрын
So cool, bin sehr gespannt auf die Resultate.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Habe nicht so viel Hoffnung. Mal sehen. Vielleicht täusche ich mich ja. Deshalb habe ich auch den Termin relativ kurz angesetzt. So wird es mindestens keine "Never Ending Story". Das Tema selbst ist sehr spannend finde ich.
@NimaSajedi
@NimaSajedi 5 жыл бұрын
Your videos are really interesting. I appreciate your effort on sharing valuable information.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Thank you!
@santorcuato
@santorcuato 5 жыл бұрын
Useful AND interesting as always. Thanks Andreas!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
You are welcome!
@piconano
@piconano 3 жыл бұрын
Back to heathkit's 6809 trainer of 1981! Much Sadness...
@SyaCZek
@SyaCZek 5 жыл бұрын
Hello Andreas, When will you make a video about ULP challenge results? Thank you for your answer. I Love your work!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Unfortunately, I did not get enough participants.
@rubialugattimoreira1978
@rubialugattimoreira1978 Жыл бұрын
This is the man. 🌹 Absoluty amazing
@AndreasSpiess
@AndreasSpiess Жыл бұрын
:-)
@luizvision478
@luizvision478 5 жыл бұрын
HI MR ANDREAS BEAUTIFULL...BEAUTIFULL WORK. I AM ELECTRICAL ENGINNERING, AND I HAVE 62 YEARS IN RIO DE JANEIRO - BRASIL I WILL BE LOOKING AT THIS PROJECT AND THANK YOU FOR SHARING THIS KNOWLEDGE LUCK AND BE HAPPY
@TheMvieira
@TheMvieira 5 жыл бұрын
Olá Luiz, Indaiatuba - SP :-) (another brazilian here, from Sao Paulo state)
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
You are welcome. Beautiful city! I have mostly good memories...
@Conservator.
@Conservator. 5 жыл бұрын
LUIZ VISION Your Caps-lock is stuck ;)
@salec7592
@salec7592 5 жыл бұрын
@@Conservator. that's how an QSO is supposed to look. There is no provision for the character case in telegraphy. Now get out of the lawn! ;-)
@Conservator.
@Conservator. 5 жыл бұрын
salec OK SORRY DIDNT KNOW THAT ;)))
@blauemeise8287
@blauemeise8287 5 жыл бұрын
Hi Andreas! I would also add 50$ for a C ULP compiler. Why not pool together in BountySource?
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
As you might have seen in one of my last videos I will not start a community project in the near time. So somebody else has to do it.
@crckdns
@crckdns 5 жыл бұрын
If there would be a pool for an open-source c2ulp compiler, I'd also add $50 to it 😸
@norm1124
@norm1124 5 жыл бұрын
Hi folks, I'm really busy. But maybe writing a CLang LLVM backend is not as hard as we all assume? github.com/llvm-mirror/llvm/tree/master/lib/Target/RISCV
@norm1124
@norm1124 5 жыл бұрын
Maybe this manual is helpful: it talks about linking and memory layout: docs.espressif.com/projects/esp-idf/en/latest/api-guides/ulp.html
@InfiniteQuest86
@InfiniteQuest86 5 жыл бұрын
I've spent probably 10 hours today working the i2c angle on this thing, and the compiler is starting to sound much easier. We have a C preprocessor and an assembler. The only layer missing is stitching together operations into assembly. After today, it doesn't seem so bad to get something rudimentary thrown together.
@ericwilson5203
@ericwilson5203 5 жыл бұрын
As others have said, this is SO exciting! Thank you for spurring the community for more sample code examples for layman like myself. Correct me if I'm wrong, but it looks like the posted example for reading the built in hall effect sensor does not have an upper and lower bound to wake it from sleep? Instead it just wakes up every 3 seconds to print its averaged measurements? Also is it possible for the RTC code to run continuously in the background. I have a project where the main loop scans bluetooth, then deep sleep. It'd be nice if the RTC could continue to poll a sensor even when the chip is awake.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
You are right: The ULP should decide on when to wake the main cores.
@christianneuhaus1354
@christianneuhaus1354 4 жыл бұрын
Hi Andreas, Thanks for this very interesting video. I was wondering whether to use an Arduino or an ESP32 for an ULP project. With the Arduino, I found that I'd have to build a very basic one myself for ULP applications while the ESP32 seems to be ready to use as is, which is great. Maybe a comparison of Arduino vs. ESP32 in ULP applications would be an idea for a future video? ;-) Cheers, Christian
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
I would not compare the ULP with an Arduino. The concepts are too different. Maybe I will cover the ULP with a ecample in the future...
@HOUS-ij9vb
@HOUS-ij9vb 5 жыл бұрын
IDEA FOR THE COMPETITION: Wake the ESP32 (and transmit new value) when the change in a load cell is over 10 grams. Go to deep sleep when the signal is stable for 2 secs (SD below 0,5 grams). Components: load cell, HX711 and ESP32 Dev.Board.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Interesting idea. I think this already could be done based on my example. Because it already can read ADC values.
@sourekpetr
@sourekpetr 5 жыл бұрын
Aaaah assembler, back to the roos :-D Thanks for video.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
You are welcome!
@ATS3788
@ATS3788 5 жыл бұрын
I learned Z80 Assembler when I did my Bachelor , I was damn good in this lime now I can't hardly remember.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Not very different to the ULP assembler...
@Trivimania
@Trivimania 5 жыл бұрын
I learned Z80 assembly too just to write a little gameboy game which was based on Z80
@picwiz2
@picwiz2 5 жыл бұрын
@ATS3788 I do not know your skills in electronics or programming languages but, from your icon, I'm sure you're a great music expert ! WOW !!!
@michelebernasconi375
@michelebernasconi375 5 жыл бұрын
Hi Andreas, great video and initiative! I am also interested about applications related to the MPU6050!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Thank you!
@zukjeff
@zukjeff 5 жыл бұрын
Andreas to make more people feel included and make your female viewers more comfortable, replace ' wife or girlfriend ' with partner. Great video as usual and Go the Assembler heads !
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I felt that this joke does not fit with "partner". Anyway, you are right: Jokes on an international basis very often lead to discussions. Maybe they will disappear one day.
@zukjeff
@zukjeff 5 жыл бұрын
Andreas Spiess , no, jokes and humor are a big part of us coming here to your channel. I just think changing 'wife' to "partner " will cover more combinations of viewers while keeping your excellent humor. Ps: I have a Wife too.
@Aegilops
@Aegilops 5 жыл бұрын
Was watching your new video with great interest, Andreas, following your informative, relaxed and interesting walkthrough when at 6:14 you made me laugh out loud ... so I stopped and had to give you a Like. Excellent video as always!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Thank you for the like!
@Fifury161
@Fifury161 5 жыл бұрын
5:39 - is that you doing a voice over? Great info - thanks for sharing!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
The whole video is a voice over. But you are correct. There I had to correct something ;-)
@Rustbox306
@Rustbox306 5 жыл бұрын
Can a uBlox GPS wake up the ESP32 with ULP? Can the ESP32 receive LoRa packages while sleeping? Could it be used as a QRP beacon (Lewis library) and a 3$ QRP Pixie transceiver and a transistor for say a weather balloon?
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Good questions. Is this your project idea? Then maybe you have to add a little info.
@bardenegri21
@bardenegri21 5 жыл бұрын
GPS units work with Serial, but some do have a led that turns on when they aquire a signal. You could monitor the led with the ULP and only wake if there is a valid lock.
@Rustbox306
@Rustbox306 5 жыл бұрын
@@AndreasSpiess I have managed to switch the 'key' of the QRP-Pixie transceiver using a transistor and the ESP32. I am working on receiving from the Pixie on the ESP32 data bits at a very slow rate using a modified SoftwareSerial library. This could allow two ESP32 to communicate with an unbelievable range on lower frequencies such as 7.020 Mhz (crystal in the QRP kits). About the weather balloon it just seems like a good candidate for a long antenna and long range, low data transmission.
@leocurious9919
@leocurious9919 5 жыл бұрын
uBlox GPS should have a square wave pin that can be programmed.
@SimonRichardMasters
@SimonRichardMasters 5 жыл бұрын
@@AndreasSpiess nice answer
@SnowyOwlPrepper
@SnowyOwlPrepper 5 жыл бұрын
Nice cat.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Thank you!
@Brynmawrhill
@Brynmawrhill 5 жыл бұрын
Grüetzi Andreas, A great video as usual. A little while ago you reviewed ESP32 boards and noted that all of them draw pretty high quiescent currents. What is the breakout board you are using in this video? Thanks a lot for your good work, David
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
It is just a PCB. You get it on Aliexpress.
@Brynmawrhill
@Brynmawrhill 5 жыл бұрын
@@AndreasSpiess I found it. 😀
@hdeamon
@hdeamon 5 жыл бұрын
This video rocks!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Thank you!
@survivalboxing3216
@survivalboxing3216 5 жыл бұрын
Hi Andreas, could you list a few reason on why to still use the Arduino IDE and board on our projects when we can code on the ESPs directly in micropython? Many thanks
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Because my channel would be dead if I would go away from Arduino IDE
@SimonRichardMasters
@SimonRichardMasters 5 жыл бұрын
I can see the problem there...
@noweare1
@noweare1 5 жыл бұрын
@@AndreasSpiess Well spoken
@bonnome2
@bonnome2 5 жыл бұрын
A while back in your micropython video you talked about mongoose OS but that it didn't work out. I think it would still be great to have a video about it!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
The chance is small on this channel and for the moment. I go enough "shit" with MicroPython ;-)
@petercalum9767
@petercalum9767 5 жыл бұрын
Super interesting and usefull video, thanks Andreas
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
You are welcome!
@marios2liquid
@marios2liquid 5 жыл бұрын
The problem I have with the ESP32 and the STM32F(older) cores is the uA per MHz.. This is the issue. When you want to make some computation every X seconds having a core that consumes >70mA inside a loop is crazy. For example you can get an NRF52 with a cortex M4 and >512kb flash that consumes around 50uA per MHz. Thats 3-4mA vs. 70-100mA. I wish more and more arduino projects could support much lower power micros *fully*. Right now you have to deal with shitty software/SDK that locks you in into each platform whereas, if everyone adopted the arduino definitions for simple things like I2C, SPI, ADCs, life would be simpler.. At the same time arduino needs to also standardize more things too, like sleeping routines, registering serial/i2c/spi interrupts, etc.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
We all have our constraints and have to solve it. My solution up till now was the ESP32 because it works. But I would love to be able to use the Nordic stuff, especially because of BLE.
@marios2liquid
@marios2liquid 5 жыл бұрын
@@AndreasSpiess Absolutely yes. I didn't mention it but i also use the ESP and STM in my designs (to the point that I'm stuck with them because of convenience). I just hate that there is always this tradeoff.. Even the new particle boards dont use the ESP for the bluetooth functionality nor its processing.. 😱
@markusimmig6620
@markusimmig6620 3 жыл бұрын
Sorry for my maybe stupid question. Is it possible to use the ulp and keep BLE connected? Maybe sending the esp to deepsleep only for a few milliseconds in a loop?
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
BLE needs the main processor.
@iandeandrade
@iandeandrade 4 жыл бұрын
The video with top 5 projects using ESP32 ULP has already been released? I'm really looking foward to see it!
@AndreasSpiess
@AndreasSpiess 4 жыл бұрын
Unfortunately, I did not get enough "presentable" projects :-(
@johanngerber7610
@johanngerber7610 3 жыл бұрын
Hi Andreas, I enjoy your videos, I am trying to compile your ulp_adc.ino sketch but gets the following error exec: "python": executable file not found in %PATH% Error compiling for board WEMOS LOLIN32. I am on esp32 version 1.0.4 with a lolin32 Wemos board Any idea what I missed or must do? I went through all the small print on DUFF2013 as well and some of the examples, same error. must be something I did not install? Regards Johann
@johanngerber7610
@johanngerber7610 3 жыл бұрын
fixed, had to put python path in windows %path%
@axelmagnusmansson3265
@axelmagnusmansson3265 5 жыл бұрын
Top notch video, in the tough competition of yourself! Will help in my endeavours to have solar powered sensors. together with LoRa, one can probably have very small batteries that last forever with small solar panel. even indoors? Update on competition, or did noone dare?
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Unfortunately, I only got 1.5 entries. Was quite disappointed :-(
@science4allworld587
@science4allworld587 5 жыл бұрын
Great video...or rather best video about esp32. Thanks. A request, since u have ucurrent and otii and currentranger... can you make a video on comparision of these three. I was about to order currentranger but now curious about otii. Thanks in advance:).
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Maybe I will do another video which also uses the Otii. But not soon.
@avejst
@avejst 5 жыл бұрын
NIce review, thanks for sharing as always :-)
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
You are welcome!
@ajaybnl
@ajaybnl 5 жыл бұрын
Beautiful. I like your Funny words :)
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
Thank you!
@Lolatronn
@Lolatronn 4 жыл бұрын
hey can you use the ulp core when the main processors are on? i would to have a third core for things that don't take much processing power. But is something i need to run independently of the main two processors.
@ELECTROAGENTUNIVERSE
@ELECTROAGENTUNIVERSE 3 жыл бұрын
what if the main core is waked up ....... then ULP still running in working ....is it still blink led on voltage thresholds
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
The ULP runs also in parallel to the main cores.
@hanpahomeautomation4101
@hanpahomeautomation4101 5 жыл бұрын
Why require Arduino IDE? I suppose this will work also with PlatformIO which is a much better IDE.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
I do not think that it works with platformIO
@Graham_Wideman
@Graham_Wideman 5 жыл бұрын
"... back to the early 1980's..." shows a KIM-1. Hey, that was 1976! I programmed one of those!
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
We are always lagging the US ;-) I hope It still worked in the 80's
@steverearwin6840
@steverearwin6840 5 жыл бұрын
Hi Andreas, I love your videos and am very impressed by your knowledge. Your ESP-WOOM-32 breakout board looks like just what I have been seeking for over a month. Would you please tell me the model number and manufacturer/seller? Thanks in advance.
@AndreasSpiess
@AndreasSpiess 5 жыл бұрын
You always find the needed links in the comments of my videos.
@TheLarsUrban
@TheLarsUrban 3 жыл бұрын
Hi, I'm currently building a chicken door guard for my moms chicken. It has to run on battery power and just needs to switch a voltage on if the door is opened and off if it is closed, like a relay. What kind of switch would you choose for this kind of application? Gruß aus Deutschland
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
I do not know because your problem is not clearly described. If you define exactly what you need you will find a solution using google
@fabianmi4245
@fabianmi4245 3 жыл бұрын
Hi Andreas. Is there a way to wake up a esp32 with a nfc module? My task is to wake the esp up when a card is about to be read. My guess is, that the RFID reader needs to be powered all the time so it can send a signal to a pin. But I am new to this topic and don't know if this is possible. Thanks!
@AndreasSpiess
@AndreasSpiess 3 жыл бұрын
The RFID reader also has to power your card. Watch my RFID videos if you want
#328 ESP32 Secrets: Interrupts, and Deep-Sleep under the Hood
18:57
Andreas Spiess
Рет қаралды 175 М.
A little girl was shy at her first ballet lesson #shorts
00:35
Fabiosa Animated
Рет қаралды 21 МЛН
EVOLUTION OF ICE CREAM 😱 #shorts
00:11
Savage Vlogs
Рет қаралды 14 МЛН
لااا! هذه البرتقالة مزعجة جدًا #قصير
00:15
One More Arabic
Рет қаралды 50 МЛН
ESP32 Deep Sleep: Ultra-Low Power Coprocessor
15:27
atomic14
Рет қаралды 29 М.
The new ESP32-S3 module - Extreme low power 1nA! ELPM-S3 by OBJEX
10:00
Salvatore Raccardi
Рет қаралды 29 М.
ESP32 ULP подружилось с DS1820
24:01
Arduino и прочие питомцы
Рет қаралды 1,9 М.
#274 Free Inline Debugging for ESP32 and Arduino Sketches
17:46
Andreas Spiess
Рет қаралды 157 М.
Как устроена отладочная плата ESP32
32:51
Мастерская Электронщика
Рет қаралды 17 М.
ESP32 Sleep Modes and Power Consumption
23:40
ForceTronics
Рет қаралды 979
#264 PlatformIO for Arduino, ESP8266, and ESP32 Tutorial
18:47
Andreas Spiess
Рет қаралды 253 М.
#363 Which ESP32 pins are safe to use?
11:53
Andreas Spiess
Рет қаралды 128 М.
Forget WiFi! This Wireless Method is WAY Better?
12:14
GreatScott!
Рет қаралды 544 М.
Yanlışlıkla Telefonumu Parçaladım!😱
0:18
Safak Novruz
Рет қаралды 7 МЛН
САМЫЙ КРЕПКИЙ ТЕЛЕФОН #shorts
0:27
Паша Осадчий
Рет қаралды 422 М.
FIX THE SMARTPHONE WITH A CARDBOARD MIXER!!📱
0:28
Peter Cardboard
Рет қаралды 2,8 МЛН
#samsung #retrophone #nostalgia #x100
0:14
mobijunk
Рет қаралды 15 МЛН