Тёмный
No video :(

Very LOW Power Arduino - Precise Time Interval Wakeup! using an RTC 

Kevin Darrah
Подписаться 106 тыс.
Просмотров 38 тыс.
50% 1

Here's a cool way to put your Arduino into an ultra low power deep sleep state, then wake up at a very precise interval, like for 10 seconds, minutes, hours, days, and so on. I'm using an external RTC (Real Time Clock), specifically, the MCP7940. Here's the wiki that I made for that board: www.kevindarrah...
RTC Video I did here: • RTC (Real Time Clock) ...
LOW Power Arduino Video here: • Low Power Arduino! Dee...
The CODE is here: www.kevindarrah...
Check out my Tindie store (trigBoard is available) www.tindie.com...
Thanks to all the Patrons for dropping a few bucks in the tip jar to help make these videos happen!
/ kdarrah
Twitter: / kdcircuits
For inquiries or design services:
www.kdcircuits...

Опубликовано:

 

28 авг 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 49   
7 лет назад
Hey, Kevin! I have a small project here, where I used only an ATmega328P (and a crystal) to create a RTC internally on it. If anyone is interested, here's the code and schematics: github.com/jdneto/Atmel-Projects/tree/master/ATmega368p-168pa-88pa-48pa/timer2-as-rtc-with-leds. The average current at 3.3V is about 8uA.
@omaoda4462
@omaoda4462 7 лет назад
José Dias Neto Super Code, thanx for sharing
@vojjta96
@vojjta96 6 лет назад
There is possible to combine two alarms (ALM0 and ALM1) to cooperate. Then you can wake up Arduino for example on specific Hour and Minute or specific Hour of any Day of the week. See 5.5.2.2 Dual Alarm Operation and TAB5-10: DUAL ALARM OUTPUT TRUTH TABLE
@Jack-eh2ud
@Jack-eh2ud 7 лет назад
Hi Kevin, At 1:17, you suggest "Why not use the internal watch dog..", and you list that you're limited to turning on every 12 second and then going back to sleep. I agree with you that the RTC clock is more accurate, but as far as I can tell, the while loop you have set up has the same problem. It turns on every 12 seconds, checks to see if the alarm flag is triggered and then goes back to sleep. Accuracy is better, but POWER USAGE is basically the same as far as I can tell? Am I missing something? Another option, instead of using the interrupt, is to simply use a RTC Date Time library, and then RtcDateTime now = Rtc.GetDateTime(); RtcDateTime alarmTime = now + 1000; // 1000 seconds into the future or however long you want. while(alarmTime > Rtc.GetDateTime() ) { SleepFor12Seconds(); } This should do the same thing without needing the interrupt pin. The downside is that all these methods you are still limited to wakeup within 12 seconds of the alarm and not exactly on time.
@faridrokz1647
@faridrokz1647 4 года назад
I've designed a simple board with ATmega328p's internal rtc with external 32.768kHz crystal directely connected at TOSC1(PB6) & TOSC2(PB7) pins. It draws abot 1.1uA (vcc 3.3v) in power save mode with accurate time keeping! Also you can use the internal rtc interrupt to wakeup the processor in any time. I'm running the cpu at 1.8432Mhz with calibrated internal oscillator via OSCCAL by the help of internal rtc. So it's easy and I can run the UART at 115200 with the minimal external hardware, only one 32.768kHz crystal!
@samadhistate9637
@samadhistate9637 4 года назад
I can't find an MCP7940 module online, just the chip itself. Can I achieve the same result with a DS3231?
@ArnoudvanLeijden
@ArnoudvanLeijden 7 лет назад
Nice video, gives me more insights. I use the 328p sleepmodes with watchdog. I understand the difference with and without using the watchdog is around 6uA (using 6.5uA with and 300nA without, I am not able to measure this tiny current myself). Looking at the datasheet of the MCP7940 shows it uses 1uA. So if I want to save 5 uA, I just need to add the RTC module.
@Kevindarrah
@Kevindarrah 7 лет назад
yep, exactly
@omaoda4462
@omaoda4462 7 лет назад
Arnoud van Leijden and if you cut power of rtc it runs of its battery. but can it wake the uC if running its running on battery??
@nrdesign1991
@nrdesign1991 7 лет назад
Great tutorial! A channel well worth subscribing to.
@stm32user
@stm32user 7 лет назад
Nice Kevin
@TheWildsourdough
@TheWildsourdough 7 лет назад
Brilliant ! Well done- informative Video. Will use these with my Afterschool Arduino program. and just subscribed- Thank You !
@bradyherder2653
@bradyherder2653 7 лет назад
Very cool! Keep it up!
@mr2driver
@mr2driver 7 лет назад
You've made a latch circuit once. Perhaps use the RTC to turn it on and Arduino to turn it off? That will kill Arduino and save you some power?
@peileed
@peileed 3 года назад
I'm extremely interested on this, I did put the latch circuit together and it 100% works with my arduino,I was hoping to get it working with a RTC, everything seems to indicate that is not possible, RTC doesn't seem to be able to deal with logic by itself, the alarm setting is being executed on the Arduino side (I'm using a DS1307), so lower power is possible because the arduino is still checking the time and executing the code, but no power is not, I would absolutely love to be corrected because turn the arduino on with a RTC would save my project
@peileed
@peileed 3 года назад
just saw that my version of RTC (DS1307) does not have an standalone alarm but the next one does and should do the trick, hopefully
@estebann
@estebann 7 лет назад
If I ran this basic blinking setup out of 2xAA 1,5v batteries how much time would it last? And hiw mich time would they last if the arduino was awake without RTC doing the same work instead if sleeping?
@Kevindarrah
@Kevindarrah 7 лет назад
great question - so let's say the ON time is 1 Second and the current is 6mA. Then you've got your OFF time for 10 seconds with 1.5uA current. Then you've got to calculate the average current draw over that time. So we take 1x6mA + 10*1.5uA then divide that by the total time (11 sec) which equals 0.55mA So you can see how that 6mA of ON current affects the average current. If you slept for longer, or reduced your ON time, you can get that even lower. So then looking at a standard AA battery, let's say we get 3000mAh out of it. We can simply take that and divide 0.55mA by it and you end up with 5455hrs or 227 days. Not too bad... but let's say you didn't 'sleep' and were just ON all the time at 6mA, well then you just take 3000/6 = 500hrs or only 20days. So clearly sleeping buys you a lot in terms of battery life.
@estebann
@estebann 7 лет назад
Kevin Darrah thanks for taking time to answer! I really like these videos. Very clear and well explained. Thanks for making and sharing them!
@doubleHLabs
@doubleHLabs 6 лет назад
Thank you, you answered my quetions
@Akrasiel8
@Akrasiel8 7 лет назад
great. thank you.
@peteabdu9179
@peteabdu9179 7 лет назад
Awesome video! Where do I pick up the board to solder the parts into? Do I have to have PCB's made or can they be purchased somewhere? If I have to have them made, is there a file for that? I saw a wiki picture of the layout but didn't see a place to download it. Thanks again!
@BGroothedde
@BGroothedde 7 лет назад
That's really awesome work! One question though, the checkAlarm function could just return the result of the condition, couldn't it? Instead of the if statement with a return 1; and return 0; in it, a return ((alarm0Check >> 3) & 0x01) == 1; should suffice. It's returning a boolean after all. Heck, I think even return (alarm0Check >> 3) & 0x01; would do just fine as & 0x01 can only result in 1 or 0, which will be interpreted as boolean true or false.
@pirateman1966
@pirateman1966 7 лет назад
Will you do a video on how to use an ESP8266-12 on the lowest possible power consumption for keeping the WiFi connection On. Using an RTC of course. I read, it can wake up and ready to send in under 2ms!
@drfritz142
@drfritz142 7 лет назад
Hi Kevin, may I ask two questions? In your circuit, both the RTC board and the Arduino board are powered off of the VCC rail on the breadboard and the current in sleep is only 1.5uA. Or is the RTC running off its own battery? Asking because the RTC datasheet says ~ 1.2uA @ 3.3V for time keeping + the Arduino which I would have expected in the 3-4 uA range. And secondly, looking at this 328P board - is there any good reason why one would go even further and only use an ATTINYxx instead? For even lower low power consumption? Thanks so much!
@Kevindarrah
@Kevindarrah 7 лет назад
yep. that current you see in the video is pretty much all RTC. I did another low power video with just the arduino. And sure an ATtiny is fine if you only need a couple pins for simple stuff. No prob, I use those all the time.
@philbx1
@philbx1 7 лет назад
Excellent info again Kevin! This is probably a dumb comment, but why not use 'C' type commenting /**/ ? I think I know why you comment rather than #if's though as I have many options in my code and it's hard to see what's happening (especially with multiple nested #if's).
@Kevindarrah
@Kevindarrah 7 лет назад
I'm lazy and use the Arduino's built select all, then Control Slash command to comment out a block of highlighted code. To uncomment, you just select the code and do the same thing Control+/
@onurolce
@onurolce 7 лет назад
goToSleep(0x10) does not mean 16 seconds ?
@Kevindarrah
@Kevindarrah 7 лет назад
no, because the byte is split in two. The 1 is for the 10's digit, the 0 for the 1's digit, so you get 10 when you give it 0x10, or 0x59 gives 59seconds...
@edwardmallon4646
@edwardmallon4646 3 года назад
By removing a couple of resistors and clipping the vcc leg you can reduce the current on $1 DS3231 modules from 100uA down to 5uA which will give you alarms for >4 years on the backup coincell. This power saving modification is quite useful for our battery powered data logging application: thecavepearlproject.org/2014/05/21/using-a-cheap-3-ds3231-rtc-at24c32-eeprom-from-ebay/
@battou2501
@battou2501 4 года назад
Where to find this 328 board for sale? Cant find any info about it and its not on eBay or Ali.(
@Akfloatable
@Akfloatable 7 лет назад
Hey! I want to be an embedded systems engineer when I graduate. Should I be working with the Arduino IDE for hobby projects or should I use something like the MSP430 and code it the hard way?
@AtlantaTerry
@AtlantaTerry 6 лет назад
All well and good ... if the user is a programmer. But how does one take input from a non-programmer then set the alarm to the date, year, month, day, hour, minute and second?
@ashrafalaswad7294
@ashrafalaswad7294 6 лет назад
Can you make a vedio about 32786MHZ with timer2 ?
@algre977
@algre977 3 года назад
What about using a cmos 555 timer ?
@tbtportfolio5982
@tbtportfolio5982 7 лет назад
Kevin, is there a way for an RTC's alarm to switch a mosfet and turn on an arduino?
@weirjwerijrweurhuewhr588
@weirjwerijrweurhuewhr588 5 лет назад
How long can you run an RTC that sends an interrupt every 15 mins just of the coincel?
@Stanh11
@Stanh11 7 лет назад
make a low power 8mhz arduino video!
@harthenry
@harthenry 5 лет назад
What Arduino board are you using in this video?
@tomsmith1750
@tomsmith1750 4 года назад
how do I change the mask to boot up every 7 days instead of every 10 seconds?
@margmargou3329
@margmargou3329 3 года назад
I'd try "Day of week match" mask...
@Uhrossi
@Uhrossi 4 года назад
Witch arduino is this?
@ipodmaurits
@ipodmaurits 7 лет назад
Whats up with your arduino?
Далее
Low Power Arduino! Deep Sleep Tutorial
24:14
Просмотров 138 тыс.
Oh No! My Doll Fell In The Dirt🤧💩
00:17
Просмотров 10 млн
😭Телеграм УДАЛЯЮТ❌
00:50
Просмотров 102 тыс.
Only I get to bully my sister 😤
00:27
Просмотров 36 млн
Arduino Real Time Clock - Using the Tiny RTC
31:29
Просмотров 200 тыс.
Aggressively Low Power with the ESP8266
10:18
Просмотров 78 тыс.
NRF24 Frustration - Radio module doesn't work?
12:46
Просмотров 89 тыс.
Low Power Arduino! Lower the Voltage and Frequency
10:04
A guide to putting your Arduino to sleep
13:47
Просмотров 14 тыс.