Raspberry Pi Pico Deep Sleep Low Power Tutorial | Rising Signal Wake-Up on the RP2040
In this video, we explore different ’deep sleep’ methods on the Raspberry Pi Pico RP2040. By putting the processor into a ’deep sleep’ we can use less power during times where executing code isn’t important. Deep sleep on the RP2040 allows us to use less power and ultimately make our Raspberry Pi Pico projects way more efficient.
Check out my channel for more videos like this on the Raspberry Pi Pico, ARM Assembly, debugging, and much much more!
Buy the RP2040:
Chapters
0:00 Intro
0:11 Baseline
1:10 Sleep?
1:49 How Does Sleep Work?
2:38 Deep Sleep Library
3:00 RTC Alarm Sleep
4:44 Rising Edge Deep Sleep
6:39 Outro
#raspberrypi #raspberrypipico #rp2040
Join us on Discord:
===
yeah and you’ll see here the results are pretty disappointing actually we lose a little bit of current which means that the power has gone down a little bit but we’re still pulling in the same amount of power as just no opting in a loop so you gotta ask why does that happen well let’s dive into the instructions of the actual sleep code and see how that works so here we are in the picosdk we’re actually at the code that executes the sleep ms function sleep ms is just sleep milliseconds and it ends up just calling sleep microseconds with your time times a thousand if you go to the sleep microseconds function that is just a sleep until function if alarm pools are not disabled which they’re not by default and then if you actually go into the code after a couple checks get done to see if you’ve gotten to the point where you should be done sleeping the code is just the wfe micro instruction which is an assembly instruction in c um and wfe is just wait for event which executes as a knob on the target so again our sleep functionality which you would think gives you lower power consumption faster code execution while sleeping no it’s just a knob now when i was making this video i was starting to get really disappointed because i felt like there was no code in the pico sdk library that actually implemented the deep sleep functionality of the arm cortex processor but then in looking around i discovered that raspberry pi put out this extra library literally called pico extras and it exports this sleep interface and the sleep interface has some functionality one of them is a sleep go to sleep until where you can specify a real-time counter alarm and a callback to execute once the alarm has gone off and within this api they actually use the deep sleep functionality of the processor and you’ll see here in a second the power consumption is significantly lower so basically what this code does here i’ll kind of walk y’all through it we turn the processor on it is not awake we put it into real-time clock sleep we basically say that this is the date now and then we say that this is the time we want to wake up which is just this previous date 10 seconds later we initialize the real time clock and then we set the date time to the time we say it is and then we say go to sleep until this alarm goes off and when it goes off execute the sleep call back the sleep callback just says the global variable awake is true and what that does for us is that means that we should never get here because we should be sleeping until we are awake
===
Теги: raspberry pi,pico,rpi,microcontroller,arduino,maker,craft,hobby,electronics,wires,temperature,safety,project,board,electric,leds,led,thonny,python,micropython,os,ide,onewire,ds18b20,circuitpython,review,launch,measure,probe,rp2040,specs,specifications,how to,guide,programming,Pico emulation,retro games raspberry pi pico,etaprime,eta prime,raspberry pi pico,arm cortex m0 ,low cost
1 view
2958
990
6 months ago 00:00:06 2
Rp2040 raspberry pi watch
6 months ago 00:33:44 1
Best Hacking Laptop 2023
6 months ago 00:12:02 1
15 Brilliant Raspberry Pi Zero projects to learn and try!
6 months ago 00:17:48 1
If Linux OS Fills Your Every Moment With Joy, You Might Want to Consider Setting Up Archcraft
6 months ago 00:15:34 1
AUSTRUMI - Fastest Linux distribution with 3D support for ATI, Nvidia and Intel video cards
6 months ago 00:06:36 1
Make an Arduino Temperature Sensor (Thermistor Tutorial)
6 months ago 00:10:23 1
Эмуляторы Dendy, Sega MegaDrive, SNES и Sony PlayStation. Проекты Амперки
6 months ago 00:20:08 1
Raspberry PI Pico W. Поднимаем Web Server и управляем светодиодом через Wi-Fi и браузер.
6 months ago 00:02:07 1
Meet Doly - Your New Robotic Best Friend
6 months ago 00:44:53 1
Ассемблер ARM под голое железо. Часть 6. Кадровый буфер Raspberry Pi
6 months ago 00:20:57 1
The Manjaro Linux is a breath of fresh air
6 months ago 00:00:23 1
How to install the Video Game Module❓ #electronics #flipperzero #raspberrypi #hardware #diy
6 months ago 00:24:08 2
Arch Without the Hassle of Having to Configure Everything to Make It Suitable for Activities, Gaming
6 months ago 00:21:29 3
Ctlos Linux: From Russia with love - iso image based on Arch Linux ⚡️
6 months ago 00:16:45 1
DOS Gaming MIDI: Roland MT-32 / SoundCanvas SC-55 / SC-88, mt32-pi & SoundBlaster Hanging Note Fix
6 months ago 00:17:58 2
Go Nuts With Nutyx: A Customizable LinuxOS
6 months ago 00:22:32 1
Distro Focused on Stability, Constant Performance on PCs of Any Range, Without Losing Functionality
6 months ago 00:57:14 1
HOWTO: Make a POWERFUL smart TELESCOPE! Better than much bigger telescopes!
6 months ago 00:26:25 1
USB Разветвители HARPER от простого к мощному (USB HUB - 04P/04MB/07MB)
6 months ago 00:02:43 1
Самодельный манипулятор на Arduino, Raspberry с ROS2 для обучения школьников. Механика - Часть 1!
6 months ago 00:07:27 1
Building a Lego-powered Submarine 4.0 - automatic depth control
6 months ago 00:08:07 1
Делаем Аркадный Автомат своими руками
6 months ago 00:19:14 3
Tired of the Limitations and Issues of Windows 11? If Yes, Then It’s Time to Explore Nitrux
6 months ago 00:25:19 3
Just Starting on Your Linux Journey, This Rosa Linux Will Help You Immensely for Home Use Purposes