Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 05:09 24 Nov 2024 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : Deep Sleep Mode

Author Message
Geoffg

Guru

Joined: 06/06/2011
Location: Australia
Posts: 3194
Posted: 01:56pm 20 Sep 2011
Copy link to clipboard 
Print this post

On reading through Don's wish list poll I was intrigued to find that a deep sleep mode was second on the list.

It could be done, it would work by nominating an i/o pin then executing a BASIC command to go into deep sleep (this would stop running the program). If there was any change on the i/o pin (from hi to lo or vice versa) the CPU would instantly wake up and continue running the program.

In deep sleep the PIC32 would draw less than a milliamp and most of the current drain would be from the regulators (5 to 10mA). The downside would be that the DATE$ and TIME$ functions would loose track of the time, the TIME function would freeze its count, etc.

Is this what you were thinking of?
What would you use it for?
And, can you live with the downside?

Geoff
Geoff Graham - http://geoffg.net
 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 08:27pm 20 Sep 2011
Copy link to clipboard 
Print this post

the whole point of running in sleep mode is to keep the "rtc" running .... but if this cannot be done then whats the point
technicians do it with least resistance
 
donmck

Guru

Joined: 09/06/2011
Location: Australia
Posts: 1313
Posted: 09:19pm 20 Sep 2011
Copy link to clipboard 
Print this post


A little problematic unless you are running an I2C RTC with battery backup. User would need Sleep recovery code for time and date restore also.

Cheers Don...
https://www.dontronics.com
 
aargee
Senior Member

Joined: 21/08/2008
Location: Australia
Posts: 255
Posted: 09:51pm 20 Sep 2011
Copy link to clipboard 
Print this post

Geoff,

I think the idea has merit, for those who want RTC then add a DS1307 (or similar) RTC circuit.

Personally, I don't have an application at present, but it would be useful for any remote sensing, battery critical jobs.

How's this off the top of my head, a remote sensor that powers up twice a day, sun up and sun down, using a little photo-voltaic sensor to trigger?

If it's just a passing few lines of code to be added... (was that your eyes rolling up )

- Rob.

For crying out loud, all I wanted to do was flash this blasted LED.
 
Worm

Newbie

Joined: 30/06/2011
Location: New Zealand
Posts: 38
Posted: 11:03am 22 Sep 2011
Copy link to clipboard 
Print this post

Hi Geoff,

I am in the process of using a MM as a vehicle counter in a semi remote part of NZ. I need to run off batterys and to keep power consumption down. Putting the MM to sleep would save a lot of power and reduce the size of the battery. I proberly will use a I2C RTC with battery backup to keep time so that I can time and date stamp vehicles. So I shall wait and see how you get on with sleep function. Thanks for all your dedicated work.

Kevin
There's no such thing as a free lunch.
 
Xiongmao

Regular Member

Joined: 25/08/2011
Location: Australia
Posts: 48
Posted: 09:31am 25 Sep 2011
Copy link to clipboard 
Print this post

Allow me to play Devil's Advocate and ask why you wouldn't just add a 5 or 10W solar panel?
 
sparkey

Senior Member

Joined: 15/06/2011
Location: Australia
Posts: 819
Posted: 09:55am 25 Sep 2011
Copy link to clipboard 
Print this post

i argree a solar panel from altoronics of around 20 watts would do the job nicely ..and if you only want to collect data then just use 2 sd-cards for a swap over and take the collected data that way......also i would like too know what battery supply u are using i would recomend 2 times 20 amp hour and shuld do fine on a twelve volt duo..system...sla batterys if that wont be enough power then u will have to test it out.... do you have constant access to the unit ....
dont forget if you run the sleep mode your program will not be running...

regards sparkey Edited by sparkey 2011-09-26
technicians do it with least resistance
 
Keith @

Senior Member

Joined: 19/06/2011
Location: Australia
Posts: 167
Posted: 10:42am 25 Sep 2011
Copy link to clipboard 
Print this post

Guys

What if the application is not outside (not even close) .. solar panel is no good ... no wind so turbine/wind mill no good ... no waves so wave motion generator no good.

Or I don't want to complicate things so battery/SLA is only option ...

Application only needed when it is woken up by a certain event eg intruder, vehicle passing by, earthquake, water.. flood, pump needs to start, send email, record video, take a picture, record data, turn on a device ... many hours or many days or many weeks between events.

Wow wouldn't it be great to have it already available for that time when you have that bright spark moment and you want to complete the project double quick time.

Keith
The more we know, the more we know we don't know !
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6094
Posted: 08:21pm 25 Sep 2011
Copy link to clipboard 
Print this post

How about something like the picaxe DOZE command:

DOZE period
- Period is a variable/constant which determines the duration of the reducedpower
sleep (peripherals active).
Function:
Doze for a short period. Power consumption is reduced, but some timing
accuracy is lost. Doze uses the same timeout frequency as sleep (2.1s).
Information:
The doze command puts the microcontroller into low power mode for a short
period of time (like the sleep command). However, unlike the sleep command,
all timers are left on and so the pwmout, timer and servo commands will
continue to function. The nominal period of time is 2.1 seconds Due to
tolerances in the microcontrollers internal timers, this time is subject to -50 to
+100% tolerance. The external temperature affects these tolerances and so no
design that requires an accurate time base should use this command.
‘doze 0’ puts the microcontroller into permanent doze- it does not wake every 2.1
seconds. The microcontroller is only woken by a hardware interrupt (e.g. hint pin
change or timer tick) or hard-reset. The chip will not respond to new program
downloads when in permanent doze.

The picaxe also has nap and sleep to play with but one choice would be enough...

Jim


VK7JH
MMedit   MMBasic Help
 
Worm

Newbie

Joined: 30/06/2011
Location: New Zealand
Posts: 38
Posted: 02:12am 26 Sep 2011
Copy link to clipboard 
Print this post

Hi everybody

My reasons for not wanting a solar panel is. Cost, one less thing to get vanderlised, mounting it out of harms way, the harsh environment it will live in.

I will probible go with 2 6v SLA batterys that I will change over when I swap SD cards. Hence the reason for reducing power consuption.

I am running 2 IR beams at different hights to trigger the MM for recording vehicles. Low beam must be a car and both beams must be a bus and high beam only could possable be a low flying plane.

I would like to put the MM to sleep and wake it up when a beam is broken using a interrupt and also to sleep during closing times by possible using a LDR. If its dark, then the gates should be closed to the public. By also slowly pulsing the IR beams, I should be able to further reduce overall power consumption. I have also thought of reducing the clock speed to the prossesor to reduce power. The MM is a hungry little sucker.

If you are interested where I am installing it, try google Awhitu lighthouse NZ.

Kevin
There's no such thing as a free lunch.
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 03:00am 26 Sep 2011
Copy link to clipboard 
Print this post

How quickly do you need the Maximite to "wake up"?

Could you use a PicAxe to monitor the IR sensors, and then power up the Maximite, give it a second or two to load up AUTORUN.BAS, and send some basic data to it. The Maximite could them power itself down after its done its job.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Worm

Newbie

Joined: 30/06/2011
Location: New Zealand
Posts: 38
Posted: 03:52am 26 Sep 2011
Copy link to clipboard 
Print this post

Hi Glenn.

Snap. Thats what I am working on. I have just written a program for a 10f200 to do just that. I must be sick. If would have been a lot easer to just buy a vehicle counter off the shelf, but how much fun is there in that!

Kevin
There's no such thing as a free lunch.
 
Gizmo

Admin Group

Joined: 05/06/2004
Location: Australia
Posts: 5078
Posted: 12:17pm 26 Sep 2011
Copy link to clipboard 
Print this post

  Worm said  It would have been a lot easer to just buy a vehicle counter off the shelf, but how much fun is there in that!
Kevin


I totally agree. I will happily spend 2 hours making a $5 part, because I can, and I learn something along the way.

Glenn
The best time to plant a tree was twenty years ago, the second best time is right now.
JAQ
 
Gadget
Regular Member

Joined: 22/06/2011
Location: Australia
Posts: 70
Posted: 12:19pm 26 Sep 2011
Copy link to clipboard 
Print this post

here's a thought, if your not using the video routines or communication routines then re-compile the source and set the pic to run at a lower speed, this will use less power. then calibrate the time keeping routines to work with the lower clock speeds.

thats my 2c worth

Terry.
 
Vikingboy
Regular Member

Joined: 23/09/2011
Location: Australia
Posts: 82
Posted: 03:14pm 26 Sep 2011
Copy link to clipboard 
Print this post

HI,

It occurs to me that as you say the upper beam only would be a low flying aircraft, so unless you intend to monitor the local aviation, why not only use the lower beam, then if it is interupted pulse the upper beam for a short period to determine bus/truck or car. Alternatively I guess you could dispense with the upper beam altogether and simply determine the type of vehicle by the time of the interuption i.e. the length of the vehicle ?

to save more power you could use a pressure activated switch a little up the road to turn on the beam only when a vehicle was approaching.

Andrew
 
Print this page


To reply to this topic, you need to log in.

© JAQ Software 2024