Low Power Arduino - Sleeping at 0.3mA perfect for batteries (Arduino Nano deep sleep)

Поделиться
HTML-код

Комментарии • 85

  • @DIYTECHBROS
    @DIYTECHBROS  2 года назад +2

    Want to support us? Buy us a coffee ☕️ ​buymeacoffee.com/DIYTechBros​​

  • @TheRealStructurer
    @TheRealStructurer Год назад +1

    Late to the game but just what I needed for an ongoing project. Thanks for sharing 👍🏼

  • @MrTalhakamran2006
    @MrTalhakamran2006 3 года назад +1

    Wow! great technique , never thought of it like that

  • @zaferaltun
    @zaferaltun 10 месяцев назад

    Amazing man!

  • @naboulsikhalid7763
    @naboulsikhalid7763 2 года назад

    i SEE A GREAT SKILL OF UNDERSTANDING THE ARDUINO CONCEPT. lOOKING FOR MORE INSTRUCTIVE VIDEOS. THANK YOU FOR SHARING AND MAKING US BETTER

  • @simonparker4992
    @simonparker4992 4 года назад +1

    Nice detail.

  • @siddharthhiremath9964
    @siddharthhiremath9964 3 года назад

    This is great!!!

  • @Sparklift
    @Sparklift 3 года назад

    Very useful video. Thanks

  • @jeffbeck6501
    @jeffbeck6501 2 года назад +1

    Perfect

  • @takerunder6437
    @takerunder6437 3 года назад +1

    Good work bruh , wondering why this video is not getting more views👏👍

    • @DIYTECHBROS
      @DIYTECHBROS  3 года назад

      Thanks! This is a video for experts - so kind of small niche ;-)

    • @takerunder6437
      @takerunder6437 3 года назад

      @@DIYTECHBROS I wish this video get more view as much , so that it can encourage you to do more videos . Never stop this kind of work . We need your guidance.

  • @kleberzeitounian
    @kleberzeitounian Год назад

    Muito bom, parabéns.

  • @ArcanePath360
    @ArcanePath360 3 года назад +2

    Nice!

  • @carlos2004
    @carlos2004 4 года назад +1

    this is helpful if you already have the nano on hand and don't plan to do other projects. however, if you want to run on battery power, getting the atmega chip itself seems like a better idea since that one can go into super deep sleep.

    • @DIYTECHBROS
      @DIYTECHBROS  4 года назад

      True!
      But, instead of getting the atmega328 from the Nano it would be easier using the attiny85 (or a newer like the attiny1604). Less components and same ultra low power consumption in sleep.

  • @chimpofm
    @chimpofm 3 года назад +1

    great video. quick question how would i wake it up using a touch sensor

  • @michaelweatherby8648
    @michaelweatherby8648 4 года назад +2

    Great video, found a discussion on Arduino forum from 2016, this really fills in the gaps. Investigating idea of battery operated lock for hidden wall safe, want to see if I can do 2 factor, biometric lock and maybe some kind of hidden magnetic switch for power activation. Just started concept today and found all the pieces in the Arduino library. What a great ecosystem of stuff....! will check out reduced boot time video

    • @DIYTECHBROS
      @DIYTECHBROS  4 года назад +1

      ohh... that sounds really exciting :-)

  • @vuanhminhle6928
    @vuanhminhle6928 4 года назад +5

    This is exactly what I am looking for!!!

    • @DIYTECHBROS
      @DIYTECHBROS  4 года назад

      Great :-)

    • @orthodoxoshellinas6752
      @orthodoxoshellinas6752 4 года назад

      dear sir, i did exactly as you did on the video. but how i will wake up the arduino nano? im using a pir sensor for interrupt, but nothing happens! it doesnt wake up. any solution sir? thank you

    • @DIYTECHBROS
      @DIYTECHBROS  4 года назад

      Hi!
      Two questions that will allow us to help.
      1. How does the wiring look?
      2. What does your code look like?

  • @sameerk12982
    @sameerk12982 4 года назад +2

    Thank you very much Tech Bros for such an informative tutorial........learned a lot.

  • @kychemclass5850
    @kychemclass5850 3 года назад +3

    Great! Thank you!!! But if you lower the clock settings, how do you restore them on wake up so that you don't mess up Serial comms?

    • @oguzhanergin224
      @oguzhanergin224 Год назад

      Hi, did you learn this topic?

    • @kychemclass5850
      @kychemclass5850 Год назад

      @@oguzhanergin224 No. Not yet. (i.e the effect of lower cock speed upon Serial comms)

    • @oguzhanergin224
      @oguzhanergin224 Год назад

      @@kychemclass5850 Thanks

  • @anaselaymach8975
    @anaselaymach8975 3 года назад +1

    if I put arduino uno into sleep mode does it keep variables values and continue the code instructions using interrupt ?

  • @ckechinski
    @ckechinski 3 года назад +1

    Hi. Thanks for the video! As a beginer, I would like to ask you some questions:
    1 - It is possible to create an instruction that according to the inputs received, the clock of the processor changes up or down, without the necessity to reset it?
    2 - What about the consumption of Nano + NRF2401 + Analog Joystick?
    3 - Do you think that its possible to connect the configuration above in 2x 1/2AA lithium batteries?
    Thanks in advanced!

    • @DIYTECHBROS
      @DIYTECHBROS  3 года назад +1

      Hi Cristiam! Seems like you main question is about power consumption? IF you want to go beyond whats in this video, I would recommend having a look at the ATTINY85 (we have a video on how to program it). It will run on low voltage and lower the power consumtion!

    • @ckechinski
      @ckechinski 3 года назад

      DIY TECH BROS Thanks for your answer. My project consists in one base connected directly on the power supply and a remote station supplied by batteries that needs to wake up when the base send an “activate” signal to it, otherwise it must sleep for less power consumption. I checked about ATTNY85 as you suggested and I think that the Nano can be replaced by this. Thanks! But I read that the RF24 module itself consumes 12mA, so I’m afraid about my batteries... Other question, do you know some small module that has the processor and the radio communication integrated in one circuit?

    • @sambahnan2954
      @sambahnan2954 2 года назад

      ​ @Cristiam Kechinski Did you find any solution to your problem? I am trying to make a "lock opener" which is contacted to a NFC / RFID scanner on the front of the door. The actual unlocking mechanism is handled by a stepper motor, which should be connected to smth like an Arduino. The issue now is that I also need to power a NRF2401 module and the Arduino itself by using batteries. The whole thing should last at least a couple of months, otherwise it would make no sense at all. I would really appreciate your help.

  • @dontmindme402
    @dontmindme402 9 месяцев назад

    Thank you for the vid, but i do wanna ask if i want to time it for it to wake up in 4 mins and half, how do i add the millisecond

  • @H2ON_MEA
    @H2ON_MEA 5 месяцев назад +1

    CLKPR = 0x80; CLKPR = 0x00; // Normal speed for 16 Mhz

  • @fech1285
    @fech1285 3 года назад +1

    Thanks for this great video. I do have a question though. Can this process be done on any Arduino Nano of just for this model? Thanks.

    • @UserName-cb6jz
      @UserName-cb6jz 24 дня назад

      Yes, it should be possible on all models.

  • @polsoft
    @polsoft 3 года назад

    @DIY TECH BROS, why you use RST pin? You don't use VIN pin.

  • @oguzhanergin224
    @oguzhanergin224 Год назад

    thanks, how to wake up again if sleep mode is enabled? I'm using the RTC module and if I reverse the code can the arduino wake up at the time interval I want?

  • @croydon21H
    @croydon21H 3 года назад +1

    Can you help me understand what you mean by destroy led than resistor? are you suggesting to either remove resistor or led? What battery you are suggesting to use? 3.7v ? if yes, then it doesnt work with VIN right?

    • @seattledanr5363
      @seattledanr5363 3 года назад +1

      On the "easier to destroy the LED than the resistor" question, he means, using a heat gun or soldering iron to remove the component is more likely to destroy the LED than the resistor due to the high heat. It's safer to remove the resistor if you ever decide to repurpose the board and reinstall the resistor.

  • @emilmitev9905
    @emilmitev9905 3 года назад +1

    Hi! Thanks for your interesting videos!
    Can i ask you, how we can use Li-Po or Li-Ion battery to supplying an Arduino Nano?
    I can't find good information, about the best way to use 3.7V battery.

    • @DIYTECHBROS
      @DIYTECHBROS  3 года назад +2

      Sure, there are two options.
      Power it on the 5V pin with the battery. As it drops too low you might run into issues, but over all it is usually quiet reliable on lower voltages (until you reach a certain level).
      Alternatively, use a step up converter!

    • @emilmitev9905
      @emilmitev9905 3 года назад

      @@DIYTECHBROS Thank you very much! Really great channel! :)

  • @fedecherny5476
    @fedecherny5476 3 года назад +1

    Great video! It really helped me. I have a question, if you remove the voltage regulator, can you power the arduino the Arduino with two Li-Po batteries of 3,7V (getting 7,4V) by the VIN pin? Or it may burn?

    • @matthias5209
      @matthias5209 2 года назад

      use a voltage regulator

    • @Ed19601
      @Ed19601 2 года назад

      Remove the regulator and your Vin is not connected to anything anymore.
      Should you put 7.4 volt (in worst case even 8.4 volt) directly on your chip it will go up in smoke

  • @neermud1126
    @neermud1126 3 года назад

    If in sleep mode can it wake up with an external button press.

  • @PatrickBotz
    @PatrickBotz 3 года назад

    What temperature for the heat gun is "safe" for removing the resistor? I'm concerned about breaking nearby components.

    • @matthias5209
      @matthias5209 2 года назад

      just don´t touch them while removing the voltage regulator

  • @roboticsguyy
    @roboticsguyy 4 года назад +2

    This video made me smile! I'm trying to build a 4-button RF remote control with Atmega 32p-pu (Arduino uno) and I need it to last 6 months off of two 3V coin cells. This video MAKES THAT POSSIBLE! THAANK YOU!!!
    Ps: I have 1 million questions to ask you on that very project, I don't want to be a bother...But Can I email them to you?

    • @DIYTECHBROS
      @DIYTECHBROS  4 года назад

      Perfekt :-)

    • @DIYTECHBROS
      @DIYTECHBROS  4 года назад

      One tip that can be an option for your project is the HT12D and HT12E RF modules!

    • @roboticsguyy
      @roboticsguyy 4 года назад

      @@DIYTECHBROS Woah. I just googled it... Can it replace atmega itself?

    • @DIYTECHBROS
      @DIYTECHBROS  4 года назад

      On the sender, yes :-) There are 4 inputs that can be transmitted to the receiver (decoder) that in turn can be read by an Arduino. That way you can skip the Arduino on the sender (encoder). If you can skip the Arduino the on the receiving end is depending on what you are doing with the data. Best of luck, and just ask any questions if there are any problems!

    • @roboticsguyy
      @roboticsguyy 4 года назад

      @@DIYTECHBROS Basically in my project, I want to transmit the state of 4 separate buttons over a short distance (300cm tops). It will be a controller for a simple emergency vehicle siren system. At the receiver I will control the lights and sirens using relays depending if the button on the controller is on or off.
      I see simple RF remotes last 1 year +...I need mine to last that long. Can a HT12D and HT12E serve as transmitter and receiver in this project?
      Can I interface the HT12D with an nRF240L?
      Lol I just gave you a ton of work

  • @Ed19601
    @Ed19601 2 года назад

    Are you serious saying that if you feed it on Vin (what voltage?) It consumes 12mA and on the 5 volt it consumes 18mA? Eventhough the x volt on the Vin has to go through a lineair regulator to get to 5 volts?? That seems very illogical unless you voltage you put on the Vin is too low

    • @jrstf
      @jrstf 6 месяцев назад +1

      He probably fed 5V into Vin (instead of the required 7-12V), this sent about 4V to the processor which is why current consumption went down. As you point out, it'd be better to feed 4V into the 5V pin so you don't lose 20% of your power in the regulator, which is what he did.

  • @sezeryal
    @sezeryal 4 года назад +4

    Vin is NOT 5V, it's 7V+ up to 12V.
    You use Vin and have lower mA because you DOWNCLOCK it with a low voltage.

    • @DIYTECHBROS
      @DIYTECHBROS  4 года назад +2

      Hi Sezer!
      The AMS1117 (5V) is, as you are saying, ment to convert down to 5V. But here we are manipulating the voltage to get a lower power consumption on the microcontroller (and a bit lower on the board as well). While we do value all comments, it is also important for our viewers that they are not just based on assumptions but on actual testing.
      Did you test this?
      I have no problems getting the needed power (amps) out of the 1117. And further more, as seen in the video, the Arduino also runs as expected.

    • @sezeryal
      @sezeryal 4 года назад +1

      @@DIYTECHBROS Ok I understand, it makes sense to lower power consumption but I just wanted to note that Vin= 5V won't work work at same clock as VCC=5V

    • @davidhagstrom9350
      @davidhagstrom9350 3 года назад +1

      ​@@DIYTECHBROS It makes no sense that involving MORE components (the AMS1117) make the arduino consume LESS power/current. And on your comment above you say that you manipulation the voltage but on the video (0:30) you are clearly stating that you are using 5 volt on the VIN pin (using the AMS1117).

    • @jimchristensen9577
      @jimchristensen9577 3 года назад

      You are correct, although they are not downclocking it -- they are just running at a lower voltage. When they power through the Vin pin, the actual voltage going to the uC is less than 5V. This is because the linear regulator requires a headroom between the input voltage and output voltage. Even LDO's (Low Drop Out regualators) have some headroom. Lower voltage naturally reduces power consumption in the uC, however, running the uC at 16MHz really needs 5V to have guaranteed reliability. If you reduce the clock speed, then this method is fine.

    • @Ed19601
      @Ed19601 2 года назад +1

      @@DIYTECHBROS sorry but thats bogus. If you want to have the atmega run on a lower voltage, say 3.3 volt then apply that directly to the chip and bypass/remove the voltage regulator on the board. A comparison between 5 volt on Vin and 5Volt on the 5 volt pin is just odd

  • @Antz_411
    @Antz_411 2 месяца назад

    This works great if you never want the Nano to wake up again...

  • @somerandomvideos645
    @somerandomvideos645 Месяц назад

    why do you need remove voltage regulator for a sleep mode?

    • @UserName-cb6jz
      @UserName-cb6jz 24 дня назад

      The regulator ITSELF uses a few milliamps without any current being output from it.
      That's why.

  • @Weesy
    @Weesy 3 года назад +1

    how can i wake it up, when the arduino is in deep sleep mode?

  • @user-ur9qq8us4y
    @user-ur9qq8us4y 4 года назад +1

    If I want to connect sensors to my Arduino and also want them to be low power, what would be the best way? Would it make sense to switch their power in off with a Mosfet or Transistor while the Arduino is in sleep Mode?

    • @DIYTECHBROS
      @DIYTECHBROS  4 года назад +2

      Hi Tim! Many sensors have a power down mode or a sleep mode. So if possible, that is often a good option. Otherwise a transistor is a good option, or MOSFET is the power consumption requires it!

    • @user-ur9qq8us4y
      @user-ur9qq8us4y 4 года назад

      @@DIYTECHBROS thank you very much 👍

  • @andytren9498
    @andytren9498 4 года назад +1

    Too low power 0.3mA but no show led on for 1sec, and led off for 10sec?

    • @DIYTECHBROS
      @DIYTECHBROS  4 года назад

      Hi Andy! Not sure I fully understand your question? :-)

    • @vuanhminhle6928
      @vuanhminhle6928 4 года назад +1

      I think he would like to say "put the Arduino into sleep mode in 10 seconds and then wake it up and turn on the LED in 1 second, in each loop". 😁

    • @DIYTECHBROS
      @DIYTECHBROS  4 года назад +1

      Thanks Vu Anh Minh Le!

  • @DIYTECHBROS
    @DIYTECHBROS  5 лет назад

    You can also save power by reducing the time your Arduino spend restarting. Have a look at our other video: ruclips.net/video/lsa5h2tVM9w/видео.html

    • @DIYTECHBROS
      @DIYTECHBROS  5 лет назад

      On a side note: using higher value resistors and using active low instead of high will also increase battery life.