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.

Pic sleep-watchdog timer problem- drawing more current in mA

Status
Not open for further replies.

xyzabcpqr

Junior Member level 3
Joined
Mar 22, 2012
Messages
26
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,523
I am using PIC16LF1936 and HI-TECH C Compiler.

I want to run my code on 2xAA battery and want to calculate battery life. So I implemented SLEEP module and Watch dog timer to awake it every 8sec.
I used I2C to configure my RF chip which works as Transmitter and PIC Hardware UART module to communicate with RF chip.Else 2 switches and 2 led are used as ip/op .There are 5-6 unused pins. when i configured those unused pins as o/p and latched it as 0 ,it draws 5mA .so i left those unused pins as non- configured. Before executing Sleep instruction, I had disabled above mentioned modules and after awaking pic, I enabled those.
It seems like it is drawing 2.3mA in SLEEP and 10mA in normal operations. . I am very confused where i am doing wrong.
How can i achieve in uA Current consumption in sleep mode.?

Please guide me.
 

are you cutting down clock to minimum value while in sleep mode? because higher clock rates consumes more power.. as stated in all pic datasheets... make sure that you configure pic to operate in lower frequency while in sleep mode... you have to recalculate the wdt rate to compensate that clock time too..
 

I tried as you suggested.I changed from 4MHz to 31KHz internal osc. in sleep. but nothing happen.
I am attaching my part of circuit and code.
Can you suggest me which module should i disable in sleep and how?
 

Attachments

  • RF_board.bmp
    3 MB · Views: 95
  • code.txt
    2.8 KB · Views: 40

what Power_Down_OffModules(); in your code does exactly??

actually by default all the modules except some timers goes in sleep with the cpu, except you set them to keep runnig in sleep mode, by configuring their respective sfrs, so you don't need to make individual modules sleep. problem is something else.

- - - Updated - - -

what Power_Down_OffModules(); in your code does exactly??

actually by default all the modules except some timers goes in sleep with the cpu, except you set them to keep runnig in sleep mode, by configuring their respective sfrs, so you don't need to make individual modules sleep. problem is something else.

- - - Updated - - -

look what pic datasheet says on its page number 109

To minimize current consumption, the following conditions
should be considered:
• I/O pins should not be floating
• External circuitry sinking current from I/O pins
• Internal circuitry sourcing current from I/O pins
• Current draw from pins with internal weak pull-ups
• Modules using 31 kHz LFINTOSC
• Modules using Timer1 oscillator

- - - Updated - - -

i think rf module may be using some power even in pd mode.

you are measuring current from which point?

also do you have multimeter good enough to measure such small currents?
 

In normal mode, Osc Frq =4MHz . I switched as 31KHz (LF) in sleep.
As well as in RF Chip(TDA5252 INFINEON MADE), i had implemented full powerdown mode. Then it reduces to 1.2-1.4 mA.

When i removed RF Chip from the PCB Board ,then current is less than 100uA. So I am bit confused that due to I2C and UART Connection between PIC and RF or there is something in RF chip that still drawing current.


Herewith i am attaching code for Power_Down_OffModules();
I am measuring current from the supply itself (Entire circuit current).

- - - Updated - - -

In normal mode, Osc Frq =4MHz . I switched as 31KHz (LF) in sleep.
As well as in RF Chip(TDA5252 INFINEON MADE), i had implemented full powerdown mode. Then it reduces to 1.2-1.4 mA.

When i removed RF Chip from the PCB Board ,then current is less than 100uA. So I am bit confused that due to I2C and UART Connection between PIC and RF or there is something in RF chip that still drawing current.


Herewith i am attaching code for Power_Down_OffModules();
I am measuring current from the supply itself (Entire circuit current).
 

Attachments

  • CODE1.txt
    808 bytes · Views: 46

in the code posted above in line 40,
make these changes..

Code:
     OSCCON = 0x02;            // 31KHz LF

make it 0x02 insted of 0x00,

its stated in datasheet that ..

Code:
SCS<1:0>: System Clock Select bits
1x = Internal oscillator block
01 = Timer1 oscillator
00 = Clock determined by FOSC<2:0> in Configuration Word 1.

and you are setting SCS to 0b00 so it will not use IRCF settings,

- - - Updated - - -

also we know that pic is xlp device, but we dont know about your rf module, whether it is low power device or not, so it can consume power even in pd mode..
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top