Notifications
Clear all

External Power on/off control circuit.

126 Posts
5 Users
9 Reactions
6,591 Views
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1136
Topic starter  

@davee

I create a new topic not to pollute the owls post, but it related to 'sleeping' the rpi pico.  I am interested if you have ideas for an external circuit that uses and external RTC to switch power on and off to the pico.  As discussed in the owls thread, and highlighted by your goodself, with micorpython the deep sleep consumes too much power draw and your did give some remarks about this external circuit  I would like to test  one of my boards running mp to see what an external circuit can do.

The scenario is the RTC gives signal that enables power to flow to fire up the pico, the pico does its stuff and signals back to the external circuit to remove the power when its finished.

At the moment I've been using a 'Cricket' board thats based on an esp8266 for longer term battery power usage but its quite limited as it has just a few pins and cannot be programmed in the normal way.  Whilst currently the rpi pico seems to draw too much current whilst sleeping, the 2040 chip is noted for its lower power consumption whilst working which can be lowered by reducing its clock speed if speed is not important.  And of course removing power entirely for its wait period should save a fair bit of juice.

So any pointers you may have would be of great interest to me.  I'm very inexperience with the electronics side of things so baby steps will be needed 😯 

This topic was modified 1 year ago by byron

   
Quote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7410
 

@byron Perhaps you missed the posts about the PICO sleep code being unstable. Also, AFAIK the esp32 deep sleep is measured in MICRO amps while the best PICO settings are still measured in MILLI amps. I think most of the orders of magnitude difference can be accounted for by the fact that the PICO is a processor while the esp32 is a controller. Attached is pic of PICO power results.

Screenshot 2023 02 26 at 07.55.21

 

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1136
Topic starter  

@zander 

your post was not missed Ron, indeed its a motivation for looking at an external power on/off circuit.  No pico sleeping, it just runs its code to do something useful, signals with something like a pin high that its ready for its wait period, and the external circuit removes all power to the pico.  The pico is not sleeping, it is a deceased pico, to be brought back from the dead with a kiss from a RTC triggered pulse at some time in the future.

This post was modified 1 year ago 2 times by byron

   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7410
 

@byron OMG, you went there. A Python man making a Dad Parrot reference. Our American friends likely won't get it though.

I am looking forward to seeing what Dave can come up with that will result in less power for the PICO while not using very much power itself but isn't the DS3231 device or similar? I know how to do it with a DS3231, but no idea how to do it without an external RTC of some sort.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1136
Topic starter  

@zander,  what with owls, your Dad Parrot, and my deceased pico, we seem to have a flying circus.. 😀  We just need a @davee tweety bird and we will have a veritable flock.

Posted by: @zander

I know how to do it with a DS3231, but no idea how to do it without an external RTC of some sort.

Ron, you didn't absorb my first post.  The very idea is to use and external RTC and an external circuit (a dsxxx a few mosfets etc)  I just hope they're not those small very hard to solder SMD things.  External RTC are IN 👍 


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7410
 

@byron You are right, I didn't catch that, but in my defence, I thought Dave at least hinted at an external turn off/on mechanism that did NOT use an external RTC like the DS3231. If he is using a DS3231 then it is quite simple.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1794
 

Hi Ron @zander and @byron,

  Let's start by discussing the specification ... summarising the story so far...

  I haven't heard about a Dad Parrot, before, but it seems like byron has been buying his PIcos from the Palin's Norwegian Blue store, who unlike a Mr John Cleese who previously had the misfortune of purchasing a DEAD parrot from that same emporium, has not noticed that they come nailed to the breadboard, and is looking for Sleeping Beauty's prince to drop by at regular intervals and give it a kiss of life.

However, not content with that level of confusion, we are now introducing Tweety Pi(e), a less well known member of the Pi family, who will presumably introduce herself by winding up the local Puddy Tat, Sylvester.

What a hoot!

You seem to have forgotten Jonathan LIVINGston Seagull?

Sufferring Soccotash!!

-----------------

And clarifying the specification:

  • an external RTC is acceptable, if Prince Charming is otherwise engaged ...
  • As the Pico has a habit of committing suicide, often only a few milliseconds after being brought back to life from a Dr Frankinstein pulse of electrical power, then it will need to consult with a clock to find what the time is.
    • Would this clock need to be 'local' or would you prefer the PIco consulted the WWW-Cuckoo Clock  to find out?
    • What sort of schedule are you looking to fire these Dr Frankinstein pulses .. a clever and or precise schedule or would something like 'roughly every 15 minutes' do.

Maybe I have taken the Donald Duck far enough for now ... I'll have a ponder before it drives me quackers.

----------------

That's all folks! ............... And now for something completely different ...

Dave

(With apologies to many, including Mel Blanc!)


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7410
 

@davee If you will be using a DS3231 external RTC then you will have previously used NTP to set the time and it will remain accurate within a few seconds a year for something like 8 years. According to @PapaJoe0418 in a post this morning the PICO will have a table of 'next' wake times so they will be precise. 

The procedure will be to set the DS3231 at home once, and then the PICO will get the time from the DS3231 and determine the sleep period needed. As I stated, this part is a piece of cake, what I am waiting for is to see how/what you will do to cause the PICO to 'wake up' from a powered-off state.

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2552
 

@davee 

Boy oh boy, now you've done it !

Eccles and Bluebottle are furious (Bluebottle has been deaded again) and Hans Zarkov is adding a laser to his ship to come after you.

Obscure references, Hah !

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1136
Topic starter  

Posted by: @davee

Let's start by discussing the specification

Blimey Dave, No one expects a Spanish Inquisition. 😎

I was thinking of just using relative time and not actually setting the pico's internal RTC.  The RTC just wakes every 'set period', turns on the circuit to provide power to the pico, the pico runs its code, and signals the circuit to cut the power.  

Somehow the RTC has been set up with a 'set period'.  Perhaps this can be programmed in by connecting it to another computer to set the desired timekeeping (every 15 minutes, every Day, etc.)  I was not thinking this would need to be an extremely accurate setting and roughly would do.  

Whatever mechanism is used to set the RTC could be used to set up and keep the correct time on the RTC so the time can be grabbed by the pico when its alive if required.  Now I'm wondering what the RTC will do with Summertime savings....  Maybe just keep GMT.   But the actual time I perceive as a nice to have and its just a periodic setting I was thinking of.   

But thinking some more, I seem to be describing a RTC on a small circuit board that contains a very very low powered chip on board to do all this logic.  Now I'm thinking I'm being daft to expect too much from an external RTC, and they only really work in conjunction with a microprocessor, and what would be the point of having a RTC with a microprocessor control another microprocessor.  

Ok mr Inquisitor, I confess, its probably back to the drawing board. 😀 

 


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1136
Topic starter  

Posted by: @will

@davee 

Boy oh boy, now you've done it !

Eccles and Bluebottle are furious (Bluebottle has been deaded again) and Hans Zarkov is adding a laser to his ship to come after you.

Obscure references, Hah !

And it aint over till Ermintrude sings. 

 


   
ReplyQuote
(@davee)
Member
Joined: 3 years ago
Posts: 1794
 

Hi @will,

   Oh no ... You've Goon and done now.... He's fallen in the wah-taa!....

Sorry, Hans Zarkov passed me by ... but I zapped him with a Google ... He didn't expect the Spanish Inquisition...


   
ReplyQuote
Ron
 Ron
(@zander)
Father of a miniature Wookie
Joined: 4 years ago
Posts: 7410
 

@will I was waiting for obscure references champion @will to show up, let the games begin

First computer 1959. Retired from my own computer company 2004.
Hardware - Expert in 1401, and 360, fairly knowledge in PC plus numerous MPU's and MCU's
Major Languages - Machine language, 360 Macro Assembler, Intel Assembler, PL/I and PL1, Pascal, Basic, C plus numerous job control and scripting languages.
My personal scorecard is now 1 PC hardware fix (circa 1982), 1 open source fix (at age 82), and 2 zero day bugs in a major OS.


   
ReplyQuote
Will
 Will
(@will)
Member
Joined: 3 years ago
Posts: 2552
 

@zander 

Not me, I'm outta here before the Daleks show up !

Anything seems possible when you don't know what you're talking about.


   
ReplyQuote
byron
(@byron)
No Title
Joined: 5 years ago
Posts: 1136
Topic starter  

Posted by: @will

@zander 

Not me, I'm outta here before the Daleks show up !

Who  ?

 


   
ReplyQuote
Page 1 / 9