Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

reduce current in sleep mode

Status
Not open for further replies.

chanchal.chauhan

Full Member level 4
Joined
Apr 23, 2009
Messages
216
Helped
5
Reputation
10
Reaction score
1
Trophy points
1,298
Location
Hyderabad, India
Activity points
2,539
Dear All,

I am working on pic16f506 microcontroller based project. In my project microcontroller is taking 600uAmps current in off mode. I wan't to reduce the current in off (sleep) mode.
Please give u r suggestion how can i reduce the sleep mode current in firmware?


Regards
Chanchal
 

Hi

You will need to shutdown the master clock oscillator and all peripheral connect all floating not connected pins to gnd via 10K resistor


All the best

Bobi
 
1) before going into sleep, turn all pins to input;
2) turn off all peripherals / interrupts other than those needed to wake up the mcu.
3) pick a mcu that has the lowest possible current consumption.
 
Floating pins can be better driven low or high by the processor without causing additional current consumption.

Although newer "nano watt" types have a lower current consumption, the said 16F506 isn't bad. E.g. with WDT wakeup, it needs only a few uA.
 
bobcat1:-You will need to shutdown the master clock oscillator and all peripheral connect all floating not connected pins to gnd via 10K resistor
If i will shutdown the master clock oscillator than how would i turn on my system?
 

If i will shutdown the master clock oscillator than how would i turn on my system?
The sleep instruction will stop the clock oscillator unconditionally. Wake up is performed by the WDT or a hardware interrupt. Consult the data sheet!
 
How to reduce the the off mode current from 600uA to 5uA?

I have tested on sleep mode also but its coming 200uA.

I want to put my chip to sleep mode and then wake it up through some event.

Regards
Chanchal
 

You should have disable all the peripherals, stop the clock and put all the I/O lines in to a defined state as listed above. You should be able to get down around 1uA. Are you sure it is the micro that is taking the current and not other circuitry?

Keith.
 
Yes in the off mode all the i/o ports, ADC are active
I just try by using following code

#include<htc.h>
#define button RB3
#define LED RB1
void main()
{
OSCCAL=0b00000000;

TRISB=0b11111101;
LED=1;
while(button==1);
LED=0;
SLEEP();
for(; ; ) ;

}

It reduces off mode current to 180uA.

Is this the correct approach?

Regards
Chanchal
 

Active ADC is most likely causing the huge current consumption, but it's of no use in sleep mode.
It's been said: disable the peripherals.

A meaningful code would have the sleep instruction in an infinite loop, not before it.
Code:
while (1)
{
  // prepare sleep
  SLEEP(); // wait for event
  // you may want to have an ASM NOP instruction here
  // some event reaction
}
 
The ADC can be on in sleep mode but cannot do conversions, so it is OK to switch off the ADC.

The ADC is enabled and "only if" using internal RC can do a conversion after sleep instruction. In fact a sleep is required by the ADC to get reasonable accuracy for conversion if the device is running on clocks above 1MHz.

If the ADC is enabled and using internal RC, the conversion will be done, even if SLEEP is executed, the results are stored in the registers GO/DONE bit is cleared and device will remain in SLEEP(if AD interrupt is not enabled).

Please read the Mid-Range reference Manual particularly section 23 and 26 : https://ww1.microchip.com/downloads/en/devicedoc/33023a.pdf
 
As you already found out, the ADC consumes a lot of current. So if you intend to supervise an analog voltage in sleep mode without extensive supply current, use a WDT timeout as timebase, perform the measurement (either in sleep or idle mode), switch the ADC off and sleep most of the time until next WDT timeout.
 
Dear Fvm,

As of in PIC16f506 microcontroller it is not possible to use ADC in sleep mode.
In my project i need adc sensing continuously.
I guess WDT will also not solved my problem.
Is there any other way to do this?

Becoz with same microcontroller I have one another hex code there i am able to get off mode current 6uA & adc sensing signal is also working.


Please give some suggestion to u all guys.


Regards
Chanchal
 

As of in PIC16f506 microcontroller it is not possible to use ADC in sleep mode.
In my project i need adc sensing continuously.

well, the solution is simple:

1) you either switch to a different chip that allow ADC during sleep; or
2) you change your design criteria so that it does not need continuous adc.
 
But i am having same microcontroller hex code & it is working in sleep mode with 5 uA current.
and other thing is in off mode adc sensing is working with same current.

Regards
Chanchal
 

well, the hex code may not be written under the same requirement - it may not do continuous adc, for example.

your ask is logically incompatible with the hardware: if your hardware can only do adc when it is awake and you have to do continuous adc, you have to keep the adc awake.

there is no other solution, other than finding a different chip that allows adc during sleep.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top