Low Power Arduino! Deep Sleep Tutorial

Поділитися
Вставка
  • Опубліковано 13 січ 2025

КОМЕНТАРІ • 338

  • @billybbob18
    @billybbob18 Рік тому +3

    Finding this video 7 years later is great. I've never ran a chip that low until now. I'm surprized your Keithley showed anything at all when most meters round down to zero when the next digit is below 5. I have a 38 year old Hioki multi meter I picked up at Goodwill for 5 bucks. It reads in increments of 10nA and I was finally able to confirm that it works and showed the same result as your bench meter. Thank you for sharing! I really need a meter like yours now.

  • @JMTosses
    @JMTosses 8 років тому +18

    Kevin, I must say, this is nothing less than amazing! I'm not sure how and where I will implement what I just "learned" but this video is top notch - thank you for a) taking the time to research these details and b) then make your findings available to your viewers. Most appreciated!

  • @Zekedog1
    @Zekedog1 8 років тому +2

    Kevin this is amazing stuff. I am new ( 2 weeks) to Arduino and coding, and know I am going to watch this video over and over dozens of time to comprehend the scope of sleep mode. This is precisely what I am trying to implement into my project. Thank you for taking the time to prepare and research this tutorial. this is an amazing gift to the community. Many thanks.

  • @davidperna
    @davidperna 9 років тому +52

    Great video! Please keep up with this low power series, it's very helpful

    • @Kevindarrah
      @Kevindarrah  9 років тому +13

      +David Perna thanks, lots more to come!

    • @omtandon2741
      @omtandon2741 4 роки тому +1

      Yes pls

    • @DrMrSuperAwesomeGuy
      @DrMrSuperAwesomeGuy 4 роки тому +1

      Kevin Darrah I’m interested in making a small battery powered fish feeder for a beta fish. Something that utilizes a Mini Pro 3.3v, two double A’s, and one of those tiny digital camera stepper motors. Do you have any videos on getting the lowest possible power draw while still utilizing the internal clock? Watchdog would drift too much over the course of a month or so

    • @omtandon2741
      @omtandon2741 4 роки тому +1

      @@DrMrSuperAwesomeGuy yes pls

  • @uvlight
    @uvlight 9 років тому +10

    Thank you so much, I really like this, specially when you do that without external library.

  • @nrdesign1991
    @nrdesign1991 8 років тому +2

    I never thought too much about what else besides the sleep mode could further increase battery life much. Thanks for this awesome video! Also bonus points for not begging for likes and subs at the start, like so many other youtubers do. Keep it up!

  • @capttom144
    @capttom144 10 місяців тому

    I'm part of the late crew but: working right now on a similar project I - finally! - stumbled across your channel/video..
    I failed trying all other tutorials and even ChatGPT couldn't help me out with a proper code. Either the 328 didn't wake up again or the sketch didn't work at all..
    Yours worked for me right from the start, it doesn't need libraries and you even explain how to set the needed registers!!
    Instant subscription 👍 and your channel is - unfortunately - really underrated..

  • @francescoreale
    @francescoreale 5 років тому +2

    Such a kind of videos give an incredible value to internet. Thank you for sharing your hard work!

    • @Nordic_Goon
      @Nordic_Goon 3 роки тому

      Time for the authoritarian powers of the world to ban us from it.

  • @nodirbekchoriev1763
    @nodirbekchoriev1763 4 роки тому

    20:40 those 16 seconds were quite accurate because you started the timer just after led goes off.
    Great video by the way!

  • @erikw8644
    @erikw8644 5 років тому

    Thanks a million Kevin! I was working on a project running a battery and just need to check a sensor every hour or so. There are no clear guides anywhere to what you have figured out. This tutorial has made my project really to the next level! I subscribed as well. Awsome job!!!

  • @Johncoffee2002
    @Johncoffee2002 6 років тому

    This was just a awesome presentation of power saving possibilities. Exactly what I needed. I'm running a 328P-PU on the internal 8 MHz and the power savings in sleep mode are even mire dramatic: on my digital multimeter I measure 0.1 micro amps when sleeping! This is even lower than your 0.368 micro amps you measured. Thanks again for your detailed explanations. They were perfect!

    • @Johncoffee2002
      @Johncoffee2002 6 років тому

      I have a interesting phenomena after increasing the watchdog counter in the for loop to 20 (to get 20x8"sleep) --> It's not possible to wake up the 328 with the interrupt button, unless I press the button multiple times (up to 19 times!). What is the mechanism behind?

    • @Johncoffee2002
      @Johncoffee2002 6 років тому

      Problem solved. Counter variable ‚i‘ needs to be declared globally and set to 76 in the interrupt service routine to get out of the ‚for‘ loop :-)

  • @refusneant
    @refusneant 5 років тому

    from datasheet to break board ,the perfect way to do it.Thanks for this Kevin.

  • @kent1026
    @kent1026 4 місяці тому

    still a great video after 8 years. i am learning to code a Attiny right now. i learned how to disable BOD by software and ADC in this video!

  • @Nordic_Goon
    @Nordic_Goon 3 роки тому

    Not going to lie. This is way over my head as far as digging into complicated verbiage in documentation, but your breakdown at least helped me understand the efforts that go into breaking down the use of all these sleep state features that I was just copying and pasting into my scripts to use in my projects. Appreciated.

  • @dgramop
    @dgramop 6 років тому

    This saved me what could have been a while going through the datasheet and testing various methods. Kudos!

  • @giacomopaccagnan5600
    @giacomopaccagnan5600 9 років тому +38

    Wow! fantastic series!! Good job, man! can you make a tutorial also on low power mode for esp8266?
    Hope the best for you in the future!

    • @cesarp6761
      @cesarp6761 9 років тому +2

      +Giacomo Paccagnan yeah, esp8266 is a great module but it eats power like crazy!

    • @tomtentp
      @tomtentp 9 років тому +1

      +Giacomo Paccagnan Yes please!

    • @jannijland5490
      @jannijland5490 8 років тому

      Giacomo Paccagnan

    • @HoldYourSeahorses
      @HoldYourSeahorses 5 років тому +1

      Yes

  • @thezerocool22
    @thezerocool22 4 роки тому

    Really appreciate the way you make your videos, the speed of presentation, and the content you choose. One of my favourite channels.
    As an idea for an extension video, I wondered about using a 555 timer with a really long repeat, hourly maybe, as the watchdog to interrupt and wake up a deep sleep arduino instead of a RTC.

  • @IsaacC20
    @IsaacC20 9 років тому +1

    Thanks for the tutorial! I didn't know those registers were simply keywords that you can use in the Arduino code in conjunction with the bit operations.

  • @Chowmix12
    @Chowmix12 9 років тому

    Nice video! The little snafu in the middle is not a big deal at all! Tons of great information in this video, it is all very much appreciated!

  • @appatula
    @appatula 7 років тому

    Some no nonsense power saving, very clever stuff man...Kudos! Very informative will surely implement in a future battery sourced project. If there is one thing that is always in high in use and low in supply it is always going to be power nowadays, used to be the memory/time trade-off. This goes deep into a philosophical EE argument to be made, it seems saving power has become a much larger global problem and it is great to see people like you aware of this, implementing and being pragmatic about ways to improve that consumption of power we Americans forget to bother about. ;-)

  • @noahkunz635
    @noahkunz635 5 років тому +1

    Absolutely great! No other video or any instruction helped me. Once I watched your video everything works perfect! And even with datasheet explanation! Awesome!!!!
    Greetings from Germany ;)

  • @martynasmirauskas6977
    @martynasmirauskas6977 9 років тому +23

    Hi Kevin. Could you make video on attiny series power saving and deep sleep. These micros are perfect for small projects using batteries. I use tinys whenever I can.
    Single 3V button cell project would be nice :)

    • @Autotrope
      @Autotrope 3 роки тому +1

      FWIW attiny is similar enough to atmega328 that a lot of this transfers

  • @fiffok
    @fiffok 8 років тому

    Excellent in-deep explanation. Thanks!
    The way I see it in MCUCR part (8:26), in second line you could just put:
    MCUCR |= (2

  • @Maclman1
    @Maclman1 8 років тому +4

    I like the content! keep stuff like this coming, especially episodes like this, with a look into a technique or something, but no project. very nice videos

  • @richardp4548
    @richardp4548 3 роки тому

    Well put together video with explanation. I'm using a Pmos latch circuit to wake up the whole thing, but then found I could use a Cmos 555 dual timer to do the same thing at less cost and power for a simple project. Uses nothing in the off state. Would like to see some power harvesting projects in this series.

  • @daniloespinozapino4865
    @daniloespinozapino4865 7 років тому +2

    thanks for taking the time to explain this so well, awesome tutorial man, keep the hardwork :)

  • @paulbendel
    @paulbendel 9 років тому +2

    Thanks Kevin I am combining your ESP8266 to database data and your DS18B20 projects for wifi grain bin temperature monitoring (spoilage prevention) and low power modes on ESP8266 might also be ideal

  • @3vi14n931
    @3vi14n931 8 років тому +1

    Liked and subbed, Great video Kevin, I really love the way you explain things. I have been using arduino for years now but have always hit a brick wall when it comes to assembly and modifying MCU bits. I just learned more about it in 25 minutes then the past three years. Bravo!

  • @scolic03
    @scolic03 9 років тому

    This sort of tutorial was long overdue! Great tutorial, really well explained.

  • @VolthausLabElectronics
    @VolthausLabElectronics 8 років тому

    I really enjoyed this video. I loaded the code provided from the link onto an Arduino
    Uno clone and the setting of all the pins to output dropped the measured current used by the Arduino to 11.44mA when the LED was off. For reference when the basic Blink code was running the measured current used by the Arduino when LED was off was 21.72mA. So that alone cut the current usage in half. Brilliant! Really a smart thing to do. Lesson learned. Thanks Kevin. I'll drop a few bucks in the tip jar..

  • @AndrewBoktor
    @AndrewBoktor 8 років тому

    Great video man. Thanks for going the extra mile and going over every bit and not just showing 1 or 2 things :)

  • @amitdogra9054
    @amitdogra9054 3 роки тому

    Probably the best video I've seen on this topic. Thank you very much Kevin.

  • @steveshaw259
    @steveshaw259 8 років тому

    Great work Kevin - really clear and straight forward. I particularly like the methodical way you step through this develop the improvements. Would be great to see the differences when applied to the ESP8266

  • @garthhowe297
    @garthhowe297 9 років тому

    Wow Kevin, you really put a lot of work into this. Thank you very much for your efforts.

  • @goodwill7643
    @goodwill7643 5 років тому

    Great job, I was struggling with getting from 60uA to 1uA. And it was just BOD monitoring. Thank you.

  • @rbraddy2
    @rbraddy2 6 років тому

    Tremendous video! Exactly what I needed to give me the confidence to use Arduino in a low power project. Thank you!

  • @KommaAchtKommaEins
    @KommaAchtKommaEins 6 років тому +5

    1 mA is too much. We need to go deeper. :) I love it.

  • @techtalks_India
    @techtalks_India 6 років тому

    oh god!!!! i was searching for this concept for about a month....great explanation...just amazing...definitely great work #Thumbs up.

  • @SergioIO79
    @SergioIO79 9 років тому

    Great tutorial Kevin! best one I have seen about sleep functionality. thanks

  • @AlienRelics
    @AlienRelics 4 роки тому

    Correction, I think. At 11:38 you said digital pin 3. I can see that is physically the 4th pin, which from looking at the datasheet int0 is on physical pin 4 on the DIP 328, which is digital pin 2 aka PD2. Perhaps you mistakenly started counting from 1?
    Still an awesome video!

  • @Ritzz45
    @Ritzz45 7 років тому

    I'm looking for a DMM and looked at the price of yours which knocked me back a bit lol
    Also thank you for making videos, I always type your name in followed by what I want to learn about because there is always a video!

  • @Ed19601
    @Ed19601 Місяць тому

    It is quite an interesting subject. I am almost sad that I do not use the Arduino/Atmega that often anymore as most of my projects need to communicate with other things (either through WiFi, cable, LoRa or Bluetooth). Currently I can't think of any project that would be battery fed and not communicate.

  • @ayush-agarwal
    @ayush-agarwal 8 років тому

    This is really good stuff. Thank you kevin for coming up with such awesome contents. I am actually working on a project in which i really tied up with the battery power consumption, this video is really gonna help me out.
    Thank again. :)

  • @cesarp6761
    @cesarp6761 9 років тому

    awesome video!! It motivates me to learn more about this assembly setting and try to get more out of the datasheets (it has being always like ready ancient code non-sense)

  • @refusneant
    @refusneant 6 років тому

    very good presentation from datasheet to real ...perfect

  • @ianturner2229
    @ianturner2229 7 років тому

    Well done Kevin, a very well explained and documented tutoral, I have learned a gret deal from your video and in fact have now written my own library to "sleepState" to allow me to implement these great power saving ideas

  • @billglass5160
    @billglass5160 3 роки тому

    Very interesting. I like your approach to the problem. Simple, direct, and effective. Thank you. I will surely use your method for a small project I have in mind.

    • @billglass5160
      @billglass5160 3 роки тому

      Hey, it works like a champ! Made a 2nd remote control for my Mitsubishi AC so I don't have to go upstairs to turn it ON/OFF everytime I return/leave the house. 1 ATmega328P(8MHZ no caps, crystals), 1 IRLed, 1 3V coincell battery, a pushbutton switch and a little bit of code. Saved me $75. I was unable to measure the LOWLOW sleep current with my multimeter! THANX!

  • @vehasmaa
    @vehasmaa 9 років тому

    Very nice overview how to put atmega328 in lowpower modes...

  • @MilanKarakas
    @MilanKarakas 8 років тому

    Very useful video. In the some future works, I will try to make outdoor thermometer and hygrometer, which will has RF sending data. So, both - MCU and Si4432 has deep sleep modes, and I will need it. Thanks.

  • @mightycpa
    @mightycpa 7 років тому

    Hi Kevin, thanks for this video, it really helped me for my little project. I do have a question. You include a button to wake up the chip, but I noticed that you didn't use the assembler command sei for "Global Interrupt Enable" at 3:55 in your video. Why is this not needed? Or is yours already enabled? Thanks again.

  • @geoninja8971
    @geoninja8971 5 років тому

    Very good. Half way through, bookmarked, because I'll need to watch this a few times.....

  • @philbx1
    @philbx1 9 років тому

    Hi Kevin, that was a very comprehensive video and I think you covered the lot!
    I just wish the Atmel guys had done a video like this in the past as I had no idea of which low power options to use.
    Maybe they were 'interrupted' too much to do anything else apart from datasheets :-)
    I wish I could afford some test gear (and time) to check batteries, but assume if 4 x AA alkalines were used, and without waking the MCU that they would
    last at least a year (maybe).
    Thanks much again for your great explanation and effort in sharing this!

  • @notionSunday
    @notionSunday 9 років тому

    Kevin if you catch it early, you can use UA-cam's vid editor to chop out the bit you don't want(click your icon/creater studio/create/video editor). Then you don't have to re-upload - It will publish a new vid.

  • @brentsimpson3791
    @brentsimpson3791 6 років тому +1

    Thank you for a very informative tutorial. It helped me heaps!
    Please keep it up.

  • @LC1492
    @LC1492 6 років тому

    Thanks man! The best tutorial I've ever seen

  • @onurolce7389
    @onurolce7389 9 років тому

    This is absolutely perfect video Kevin, thank you so much !

  • @michelfrance75
    @michelfrance75 5 років тому

    Unfortunately the consumption of electronics around the processor is usually much higher than the uA. But it is the software solution to reduce the consumption. Me, I use the hardware solution, the good old power switch that reduces consumption to ... 0 ! Most processes consist of a scan of one or more inputs and a specific action accordingly. It is very easy to implement and no constraint with the deep sleep mode limited in duration.

  • @bascelik91
    @bascelik91 6 років тому

    awesome, please make more tutorials about timers, interrupts (time and hardware)!

  • @makingthings277
    @makingthings277 9 років тому +2

    Exactly what I needed to know! Thank you!

  • @Europayacht
    @Europayacht 2 роки тому

    Great, by setting your power save mode in 2016 to several devices, I saved calculated 112 Euros in the meantime!
    .
    .

  • @saint3rlt
    @saint3rlt 9 років тому

    Very interesting to see bare code without library... keep the good job. BTW, 25 s is nothing to worry about.

  • @PococraftOrg
    @PococraftOrg 8 років тому

    Still here SHOCKINGLY!
    No, I really enjoy the content you put out!
    It's very informative and professional.
    I don't have enough funds to support you on Patreon, although I have disabled my Adblocker.

  • @gert3d
    @gert3d 6 років тому

    Super, LowPower library did not mix well with RadoHead library. This does the job. Thanks

  • @stavrosnikiforos7798
    @stavrosnikiforos7798 6 років тому

    Great job! Could you make a similar tutorial on low power modes for ARM M0+? It would help a lot for a project I am working on for university. Thank you.

  • @Ed19601
    @Ed19601 Місяць тому

    I was wondering a bit about the SMCR |=(1

  • @TheQuasarman
    @TheQuasarman 5 років тому

    Excellent video Kevin, very clear. Many thanks.

  • @TimothyAttewell
    @TimothyAttewell 2 роки тому

    This is... wildly helpful. Thank you!

  • @TeslaMaxwell
    @TeslaMaxwell 9 років тому

    Wow, just wow. lots of info packed in this video. Thanks a lot.

  • @dominik8040
    @dominik8040 9 років тому

    Good job, could You make another one video with power reduction register and pin change interrupt for wake up? There is no as much tutorials about this in Web in opposition to wdt or hardware interrupt. Cheers

  • @pivot947
    @pivot947 3 роки тому

    Man, you are the best! Thank you so much! greetings from Colombia!

  • @honumoorea873
    @honumoorea873 5 років тому +1

    Good job buddy, in off grid... every bit of saving is welcome..! 😊

  • @cibelless510
    @cibelless510 8 років тому

    Hello, So first of all thanks! SO now I have been work in a small alarm that I want to use at home and after some event (open the door or window) the rf 433mhz send a serial value to another arduino e send sms to my cellphone. And of course the 433mhz that i use near the door use baterry (9v) And I'm worryng about the battery life. This video help me to solve this problem. Thank you, for this video.

  • @royal8677
    @royal8677 7 років тому

    Hi Kevin. This is Win.
    Thanks for this sharing. This is pretty good explanation. I am just a beginner in electronics,
    I am doing small DC motor project with Attiny85 chip.
    Could you please post a video for deep sleep and watchdog timer for Attiny85?
    That will be awesome. I am looking forward to hearing from you. Thanks again. Cheers.

  • @martin128
    @martin128 9 років тому

    Thanks, this was just what I needed for my data logger project!

  • @Get-off-my-lawn-00
    @Get-off-my-lawn-00 5 років тому

    This is a fantastic tutorial. Thank you for posting!

  • @shodanxx
    @shodanxx 8 років тому

    Hi,
    Great video !
    Please do the ESP8266 & STM32.
    Those asm commands are not portable to non-avr devices.
    Perhaps someone has made a library ?
    I'm looking at jeelib which seems to have the sleep mode figured out but it's probably atmega328 only.
    Also what is your solution for powering off a single 18650 2000mah lipo ?
    I just ordered a LM3671MF-ADJ (0.70$ each @10x qty on ebay) with SOT23 breakout boards (0.139$ @ 10x qty). This 5 component texas instrument dc to dc converter has 16 uA quiescent current, 600mA max load ( more than the 500mA needed for the esp8266 wifi transmitter).
    It has a min max input voltage range of 2.7V to 5.5V. I'm not sure if it can generate 3.3V from an input voltage less than 3.3V however.

  • @debashisdas7557
    @debashisdas7557 9 років тому

    Thank u It is very helpful.I intend to make a power bank with all the led indicators and other functions......... This Video'ss will help a lot...

  • @the1spyderryder
    @the1spyderryder Рік тому

    I use the android arduino IDE and I use a Arduino nano since I do a lot of traveling I use my Samsund phone or 7.5 inch tablet for development. I suspect that my IDE may not be able to do in line assembly even though I am very used to using assembler. My question is , can these things be done in the standard programming environment ? Thanks!
    This Video is perhaps one of the best that I have seen on this subject.

  • @zstergios
    @zstergios 8 років тому

    Great video! Can we wake it up with real time clock, for example on 10.00 and 20:00 every date? Any info how we can achive that?

    • @Kevindarrah
      @Kevindarrah  8 років тому +1

      funny you should ask - just made a video on RTC's in preparation for that exact application.

    • @zstergios
      @zstergios 8 років тому

      Ha! Great! Please post the link

  • @HariWiguna
    @HariWiguna 9 років тому +1

    Wow! The current "consumption" (if you could call it that) after you disabled the Brown Out Detection is INSANE! Thank you for sharing this Kevin!
    BTW, how come you're still able to upload new sketches after you put the Arduino in the various sleep modes? Is it possible to brick the ATMega by putting it into a "coma"?

    • @Kevindarrah
      @Kevindarrah  9 років тому +4

      +Hari Wiluna thanks! the programmer first sends a reset pulse to the arduino, that of course wakes it up.

    • @HariWiguna
      @HariWiguna 9 років тому +1

      So, there is no danger of bricking the ATMega. Reset always brings it back. Phew... Thanks Kevin!

    • @Kevindarrah
      @Kevindarrah  9 років тому

      ***** yea, thanks for mentioning this. Reminds me how you can flip that bit on the PICs that locks them out from being able to be programmed again

  • @ericoudammerveld424
    @ericoudammerveld424 5 років тому

    Great Video!
    I have been tweaking the 328P for some time myself. The lowest I can get to is 4uA so you still have some space for improvement. ;)

    • @honumoorea873
      @honumoorea873 5 років тому

      I've been able to go down to 2uA...😊

    • @cavalier3920
      @cavalier3920 5 років тому

      ​@@honumoorea873 and Aad Noll: You two just tease. Please add comments as to how you do this. Crystal frequency? Perhaps voltage? Perhaps bragging? Perhaps bad instruments? I would like to know.
      I have been comparing 328P carrier boards (pro mini) to Kevin's bare board. Like Kevin shows, I can get close to 6 uA. The cheap pro mini boards (3.3V, 8MHz) I purchased only get as low as 120 uA (20 times as much power! Not nearly as good as Kevin's low power.) I suspect that the pro mini power regulator is to blame even if you bypass it and go directly to VCC. Soon I will scrape the regulator and capacitors from the board to see what the truth is.
      I may have to risk destroying a perfectly good $1 board to find the truth. Wish me well.

  • @Valentin-vd8gz
    @Valentin-vd8gz 5 років тому

    Salut ! Un grand merci pour votre explication qui m'a permise de mieux comprendre ce WDT et qui va me permettre d'achever mon projet, ENFIN !!!

  • @aamerhamdani
    @aamerhamdani Рік тому

    Absolutely amazing. Your content is superior. Thanks

  • @jaimecrosas2704
    @jaimecrosas2704 8 років тому

    Kevin, thanks for the helpful video. I'm trying to understand how to reduce the power consumption on a breadboard atmega328 circuit so this information is helpful but I wonder if you can point me to a source that will help me understand the coding you use to modify the bits in the relevant registers, ie SMCR |= (1

  • @brainstormabc
    @brainstormabc 5 років тому

    Thanks Kevin for this excellent video !!!!!

  • @DRI1966
    @DRI1966 4 роки тому

    Thank You for this video, this is what I was looking for.

  • @WildLifeBackyardCamera
    @WildLifeBackyardCamera 5 років тому

    awesome, please can you make same video with an RTC or TPL5111 in order to use pinchange interrup to wake up because internal watchdog consume quite a bit of energy :(

  • @shankarsshares533
    @shankarsshares533 8 років тому

    Great Video! Thanks a lot for taking this topic. Real way how arduinos has to be used for learning. Thank you very much

  • @DanielTorres-ms9xn
    @DanielTorres-ms9xn 3 роки тому

    Hey dude! Your video was very helpful to me! Thanks

  • @MPElectronique
    @MPElectronique 7 років тому

    Thank you so much.. what about 5-6 push button with interrupts? and deep sleep?
    thank you very much for your help..
    Marc.

  • @psullivan40
    @psullivan40 9 років тому

    Ha ha, I love the last minute "Oh, you know what...you need this last bit of code to make this whole thing work". Kinda like "Lost".."oh, you know what..you have to type in these numbers then press "execute" every 108 minutes to discharge any electromagnetic buildup, continually averting worldwide catastrophe." "oh, thanks for the boat, c-ya". All kidding aside, love the videos.

  • @kwissiekwissie
    @kwissiekwissie Рік тому

    WOW! explanation in GREAT depth. Liked it enormously. even if I just understood 10% of it 🙂

  • @sylwiachaber9667
    @sylwiachaber9667 6 років тому

    Amazing work. Thank you very much.
    I wonder if using the internal resonator on the minimum frequency the watchdog will sleep longer.
    Best regards.

  • @smileymattj
    @smileymattj 6 років тому

    The reason why your watchdog timer isn't accurate, is because you should reset the WDT before entering sleep. The WDT starts counting as soon as you enable it. So it counts up to 8, then loops and starts over. So at whatever point you enter sleep say WDT is counted to 2, then you only get 6 secs of sleep.
    Use:
    __asm__ __volatile__("wdr");
    __asm__ __volatile__("sleep");
    If UA-cam auto-formats the UnderScores in my comment, it should be 2 _ for each __ seen.
    This gives an accurate 8 seconds of sleep.

  • @jix177
    @jix177 9 років тому

    Very well explained, it's a very interesting feature of an mcu, thanks for sharing.

  • @mpty2022
    @mpty2022 3 роки тому

    great work, thanks Kevin, this is exactly i was looking for... will there be any significant difference in stability and timings if I use single 18650 for power (without any regulator)

  • @christofgluckler3690
    @christofgluckler3690 8 років тому

    Hey Kevin thanks a lot for the video, learnd a lot.

  • @neogeo8267
    @neogeo8267 6 років тому

    Still with you! Carry on (thanks for documenting and sharing your experience). p.s. +1 AvE, kysoti!

  • @ynocoolnamesleft
    @ynocoolnamesleft 5 років тому

    thanks a lot i had no clue what i was doing and was explained really clearly

  • @GeekRedux
    @GeekRedux 7 років тому +12

    Why use the assembly commands instead of the C commands?