Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 10:39 25 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 : MM - Sleep Mode

Author Message
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 09:51pm 07 Feb 2012
Copy link to clipboard 
Print this post

I take it that there is no way of sending the MM to sleep, to be awoken with a push button. I have a project that needs to be battery operated but draws a bit too much current and battery life would be short.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
aargee
Senior Member

Joined: 21/08/2008
Location: Australia
Posts: 255
Posted: 02:07am 08 Feb 2012
Copy link to clipboard 
Print this post

No, but you can achieve something similar using a small MM controlled Mosfet or a transistor driven relay to control power to the MM. Your program would be called autorun.bas and you would kick to whole lot off with a pushbutton across the relay contacts, holding it down until the MM kicks in with autorun operating the relay, you could use a LED driven by the transistor to indicate the relay is on.

When finished, the MM just removes power from the relay, zero power used until the next button push.

Sorry haven't got the facilities to draw a diagram.

- Rob.

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

Senior Member

Joined: 19/06/2011
Location: Australia
Posts: 167
Posted: 02:13am 08 Feb 2012
Copy link to clipboard 
Print this post

Paul

You need to provide a bit more info on what you expect/want the MM to be doing whilst it is "asleep". See below for more info but there are ramifications depending on what choices you make!

Keith

From the PIC32 hardware manual ....

This section describes power-saving features for the
PIC32MX5XX/6XX/7XX family of devices. These
devices offer a total of nine methods and modes,
organized into two categories, that allow the user to
balance power consumption with device performance.
In all of the methods and modes described in this
section, power-saving is controlled by software.

27.1 Power-Saving with CPU Running

When the CPU is running, power consumption can be
controlled by reducing the CPU clock frequency,
lowering the PBCLK and by individually disabling
modules. These methods are grouped into the
following categories:
• FRC Run mode: the CPU is clocked from the FRC
clock source with or without postscalers.
• LPRC Run mode: the CPU is clocked from the
LPRC clock source.
• SOSC Run mode: the CPU is clocked from the
SOSC clock source.
In addition, the Peripheral Bus Scaling mode is available
where peripherals are clocked at the programmable
fraction of the CPU clock (SYSCLK).

27.2 CPU Halted Methods

The device supports two power-saving modes, Sleep
and Idle, both of which Halt the clock to the CPU. These
modes operate with all clock sources, as listed below:
• POSC Idle mode: the system clock is derived from
the POSC. The system clock source continues to
operate. Peripherals continue to operate, but can
optionally be individually disabled.
• FRC Idle mode: the system clock is derived from
the FRC with or without postscalers. Peripherals
continue to operate, but can optionally be
individually disabled.
• SOSC Idle mode: the system clock is derived from
the SOSC. Peripherals continue to operate, but
can optionally be individually disabled.
• LPRC Idle mode: the system clock is derived from
the LPRC. Peripherals continue to operate, but
can optionally be individually disabled. This is the
lowest power mode for the device with a clock
running.
• Sleep mode: the CPU, the system clock source
and any peripherals that operate from the system
clock source are Halted. Some peripherals can
operate in Sleep using specific clock sources.
This is the lowest power mode for the device.

27.3 Power-Saving Operation

Peripherals and the CPU can be halted or disabled to
further reduce power consumption.

27.3.1 SLEEP MODE

Sleep mode has the lowest power consumption of the
device power-saving operating modes. The CPU and
most peripherals are halted. Select peripherals can
continue to operate in Sleep mode and can be used to
wake the device from Sleep. See the individual
peripheral module sections for descriptions of
behavior in Sleep.
Sleep mode includes the following characteristics:
• The CPU is halted
• The system clock source is typically shutdown.
See Section 27.3.3 “Peripheral Bus Scaling
Method” for specific information.
• There can be a wake-up delay based on the
oscillator selection
• The Fail-Safe Clock Monitor (FSCM) does not
operate during Sleep mode
• The BOR circuit, if enabled, remains operative
during Sleep mode
• The WDT, if enabled, is not automatically cleared
prior to entering Sleep mode
• Some peripherals can continue to operate at
limited functionality in Sleep mode. These
peripherals include I/O pins that detect a change
in the input signal, WDT, ADC, UART and
peripherals that use an external clock input or the
internal LPRC oscillator (e.g., RTCC, Timer1 and
Input Capture).
• I/O pins continue to sink or source current in the
same manner as they do when the device is not in
Sleep
• Modules can be individually disabled by software
prior to entering Sleep in order to further reduce
consumption


Edited by Keith @ 2012-02-09
The more we know, the more we know we don't know !
 
palcal

Guru

Joined: 12/10/2011
Location: Australia
Posts: 1873
Posted: 03:11am 08 Feb 2012
Copy link to clipboard 
Print this post

All sounds very complicated. I have built auto power off circuits but they are not suitable. I am using the MM to display time, date, temperature,humidity and dewpoint temp. And working on times for high and low tide. These are displayed sequentially on a 16x2 LCD. It draws about 170ma. So if I use an auto power off device the Temperature and Humidity would come back on but I would lose the time function. I want to take this with me when I go camping and fishing. I calculate even using AA batteries it would only operate for maybe 6-8 hours. I may just have to use a gel-cell.
Paul.
"It is better to be ignorant and ask a stupid question than to be plain Stupid and not ask at all"
 
TassyJim

Guru

Joined: 07/08/2011
Location: Australia
Posts: 6098
Posted: 04:20am 08 Feb 2012
Copy link to clipboard 
Print this post

You could use the PCF8563 RTC. They have an alarm function which could be used to power up the Maximite.
If the application is stored as autorun.bas and the first thing it does is read the RTC you are up and running again. Your application could set the RTC's alarm to when ever you need to power up again.
There would be a bit of external circuitry involved but not much.

It is something I have thought about but it is not high on my list of projects.

Jim

VK7JH
MMedit Β  MMBasic Help
 
Print this page


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

© JAQ Software 2024