Sonsivri
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 09, 2016, 10:13:39 22:13


Login with username, password and session length


Pages: [1]
Print
Author Topic: 7805 is giving 2.0V at its o/p when no i/p is connected, in battery backup ckt?  (Read 1226 times)
0 Members and 1 Guest are viewing this topic.
xpress_embedo
Active Member
***
Offline Offline

Posts: 154

Thank You
-Given: 103
-Receive: 188


WWW
« on: September 23, 2013, 08:04:03 08:04 »

Hello!!! Everyone i am working on PIC32MX795F512L and i have to use it's RTCC for some time based application, and wants that if someone disconnect the supply from this controller, even then RTCC must run.
For which what i did, is just connect a battery as backup supply, in case of external supply failure, the controller gets supply from its internal battery and goes in sleep mode (In Sleep Mode RTCC continues to operate and other peripherals are disabled).

I am attaching my circuit below.

My External supply is a 12V DC Adapter, i decrease the voltage to 5V using 7805 Voltage Regulator, then LM1117 3.3V regulator is used to down it further, two schottky diode B2515LG are used to connect, the supply and Battery Supply, the output of diodes are going to controller's Supply Voltage.
When i disconnect the external supply(12V DC Adapter), the output of 7805 is 2V and through voltage divider i am getting around 1.15V at PIN INT2 of controller, and due to such high voltage no interrupt is generated.
This 2.0V at output of 7805 is creating problem, why is it so, please suggest me something to solve this problem.
Logged
str67
Newbie
*
 Warned
Offline Offline

Posts: 25

Thank You
-Given: 29
-Receive: 23


« Reply #1 on: September 23, 2013, 08:47:43 08:47 »

Hi,

I would propose to connect PIC ground to your external supply ground. At the moment the capacitor at the output of the 7805 might have problems with discharging.

Greetz,
str
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 154

Thank You
-Given: 103
-Receive: 188


WWW
« Reply #2 on: September 23, 2013, 09:05:35 09:05 »

My PIC32's Ground is connected with the supply ground, in fact all the ground on the board are connected with each other, battery's ground, external supply ground, PIC's ground all ground are connected with each other.

Might be this problem has something to deal with capacitor connected across 7805, when with time, the Voltage value has not decreased.
I checked the input of 7805 it is around 1.41V and the output is still 2.0V
Logged
str67
Newbie
*
 Warned
Offline Offline

Posts: 25

Thank You
-Given: 29
-Receive: 23


« Reply #3 on: September 23, 2013, 09:12:45 09:12 »

Did you measure the voltage at the output of LM1117 ? If all grounds are connected and external 12V is open (really completely open?) there is no reason, why the charge on the capacitors at the output of the 7805 cannot discharge completely. Unless, maybe D2 is broken?

str

PS: Another idea: what is the voltage at INT2? Maybe you configured it as output pin?
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 154

Thank You
-Given: 103
-Receive: 188


WWW
« Reply #4 on: September 23, 2013, 10:21:52 10:21 »

The Output of LM1117 is around 0.818V, i think its due to the reason that its input has 2V.
And D2 is not broken, as i had connected an LED on the path of external power supply which is glowing when external supply is connected and not glowing when external supply is removed connected.
and this means that my circuit is working on external supply and if external gets removed then only Battery Operates.

At INT2 pin 1.1V, as i had configured it as input pin.

In main when enabling interrupt i did like that..

Code:
/*
     * Enable External Interrupt-2
     * Used to Detect Supply off Condition
     *
     */
    TRISEbits.TRISE9 = 1;
    mINT2SetIntPriority(6);
    mINT2SetEdgeMode(0);
    mINT2ClearIntFlag
    mINT2IntEnable(1);
    /**/


and the ISR Code is as follow:-
Code:
void __ISR(_EXTERNAL_2_VECTOR,IPL6SOFT) SleepWakeUp_Interrupt(void)
{
    int  value;
    if(PORTEbits.RE9 == 0)
    {       
        mINT2SetIntPriority(5);
        mINT2SetEdgeMode(1);        //Rising Edge
        mINT2IntEnable(1);
        EnableSleepMode=1;          //Enable Sleep Mode
    }
    else
    {
        EnableSleepMode=0;
        Delay_ms(100);
        SYSTEMConfigPerformance(SYS_CLOCK);
        mOSCSetPBDIV(OSC_PB_DIV_2);
        //Configures the System for Multi-Vectored Mode
        INTConfigureSystem(INT_SYSTEM_CONFIG_MULT_VECTOR);
        value = OSCCON;
        while (!(value & 0x00000020))
        {
            value = OSCCON;    // Wait for PLL lock to stabilize
        }
        Lcd_Init();
        Lcd_Write_Text("Waking...");
        Delay_ms(1000);
        mINT2SetIntPriority(5);
        mINT2SetEdgeMode(0);        //Falling Edge
        mINT2IntEnable(1);
    }
    mINT2ClearIntFlag();
}

This is how i use interrupt to go into sleep mode.

I changed the value of 2.2k resistor to 10k, to drop my Low Level Logic to 0.5V and its working now, means my code is working, but i dont want to do this way.
But this ensures that my code is fine but the problem is in Hardware.
Logged
jumulab
V.I.P
Junior Member
*****
Offline Offline

Posts: 45

Thank You
-Given: 65
-Receive: 42


« Reply #5 on: September 23, 2013, 10:26:01 10:26 »

Have you checked if the IRQ input  pin uses internal pull-up.?
If yes, you have an resistor divider and is for this reason you "see" the voltage
at the output of regulator when low power is enabled and no supply.


Regards
Logged
PaulC
V.I.P
Active Member
*****
Offline Offline

Posts: 162

Thank You
-Given: 3584
-Receive: 132


information is free and should be shared for free


« Reply #6 on: September 23, 2013, 10:32:19 10:32 »

The circuit could be employed with other Microcontroller chips as a battery backup supply. Furthermore, it give energy failure signal (active reduced) for further processing.
note the 4148

Logged

find it , read it , share it .
h0nk
Active Member
***
Offline Offline

Posts: 120

Thank You
-Given: 90
-Receive: 83



« Reply #7 on: September 23, 2013, 10:59:49 10:59 »

You should either use:

- A Supervisory circuit for Your supply, which generates proper signals for Reset/Interrupt.
- The Brown-out detector of Your controller to generate the Reset/Interrrupt.


Best Regards


Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 154

Thank You
-Given: 103
-Receive: 188


WWW
« Reply #8 on: September 23, 2013, 11:06:12 11:06 »

Quote
Have you checked if the IRQ input  pin uses internal pull-up.?
If yes, you have an resistor divider and is for this reason you "see" the voltage
at the output of regulator when low power is enabled and no supply.


I had tested other IRQ pins and they work properly, I had connected two External Interrupts INT1 and INT3, with push buttons on them and they are working properly and yes they are pulled high by me externally, i can't pull high this line as other resistors are also involved.


Posted on: September 23, 2013, 11:00:54 11:00 - Automerged


Quote
Hello PaulC
The circuit could be employed with other Microcontroller chips as a battery backup supply. Furthermore, it give energy failure signal (active reduced) for further processing.
note the 4148

My Circuit is almost similar to that one, i am using other diode schottky diode in place of 1N4148 and i am sensing 5V Supply for 3.3V Micro-controller.
Logged
jumulab
V.I.P
Junior Member
*****
Offline Offline

Posts: 45

Thank You
-Given: 65
-Receive: 42


« Reply #9 on: September 23, 2013, 11:28:34 11:28 »

If you have checkesd and no internal pull-up are present, you can try another way,
discharge completely the input at linear regulator, how : program the input of interruption
like output and discharge a time the capacito trougth R2,  wait a time and reprogramm
the input like interrupt enable sleep-up.
Other question is : your interrupt is edge triggered ? or level triggered,  when you apply
power, this is an slow edge ramp, and it is possible not trigger the interrupt.
I am not an user of PIC32, but in other micros like Renesa and Atmel this is possible to do.

Regards
Logged
xpress_embedo
Active Member
***
Offline Offline

Posts: 154

Thank You
-Given: 103
-Receive: 188


WWW
« Reply #10 on: September 23, 2013, 12:14:28 12:14 »

Quote
If you have checkesd and no internal pull-up are present, you can try another way,
discharge completely the input at linear regulator, how : program the input of interruption
like output and discharge a time the capacito trougth R2,  wait a time and reprogramm
the input like interrupt enable sleep-up.
Other question is : your interrupt is edge triggered ? or level triggered,  when you apply
power, this is an slow edge ramp, and it is possible not trigger the interrupt.
I am not an user of PIC32, but in other micros like Renesa and Atmel this is possible to do.

As Per Reference Manual:-

Quote
The interrupt controller supports up to five external interrupt-request signals (INT4-INT0). These inputs are edge sensitive, they require a low-to-high or a high-to-low transition to create an interrupt request.
These interrupts are Edge Sensitive Interrupts.

I am not enabling interrupt as soon as controller starts, i had given some delay before proceeding further.
Logged
jumulab
V.I.P
Junior Member
*****
Offline Offline

Posts: 45

Thank You
-Given: 65
-Receive: 42


« Reply #11 on: September 23, 2013, 12:29:56 12:29 »

If your input is edge sensitive, a better solution is place an schmitt-trigger gate
before the processor input. In this case, the slow ramp when power supply is applied,
is converted to a fast edge and trigger the interrupt.
Remember, the state at the schmitt gate will change below Von to Voff. (dee data-sheets),
or the circuit never change their output. ( discharge the cap al linear regulator output).
Checks the voltage present at gate input.
Regards
Logged
Catcatcat
Active Member
***
 Warned
Offline Offline

Posts: 117

Thank You
-Given: 89
-Receive: 258



WWW
« Reply #12 on: September 23, 2013, 05:44:16 17:44 »

add in series with a resistor R1, a zener diode to 8-6 volts, this controller will give time for the earlier failure to detect the voltage Vdd and go into sleep mode..
Logged
Ichan
Hero Member
*****
Offline Offline

Posts: 840

Thank You
-Given: 312
-Receive: 387



WWW
« Reply #13 on: September 23, 2013, 06:01:36 18:01 »

Just a diode in series with R1 should be enough, i think.

-ichan
Logged

There is Gray, not only Black or White.
xpress_embedo
Active Member
***
Offline Offline

Posts: 154

Thank You
-Given: 103
-Receive: 188


WWW
« Reply #14 on: September 24, 2013, 04:26:05 04:26 »

Quote
add in series with a resistor R1, a zener diode to 8-6 volts, this controller will give time for the earlier failure to detect
the voltage Vdd and go into sleep mode..

The Problem is with 7805 i think so, i had asked the similar question on some other forum and one had replied me like this..

Quote
B2515LG is intended for use in high current applications where a small leakage current is of little consequence, for example in the power rails of SMPS or large computers where many Amps normally flow. In your application the current drawn is very low so the leakage through the diode is significant. With 3V reverse voltage across it, the leakage is specified at about 0.6mA at 25C and rises to around 15mA at 70C. Without knowing exactly how much current you use, I would suggest a BAT85 or similar would be more appropriate. It has leakage current of about 2uA under the same conditions.

So it might be the problem of reverse leakage current, i will change my diode to some other other and will see the effect of this.

Reason i used B2515LG is that, i had seen in some circuit that its Vf is around 0.2V, which is better than other diodes, so i used it, In my circuit its Vf is around 0.16V

I want a diode of low Vf because i am running PIC32 at 80MHZ and that's why don't want to decrease the Supply Voltage.
Logged
Pages: [1]
Print
Jump to:  


DISCLAIMER
WE DONT HOST ANY ILLEGAL FILES ON THE SERVER
USE CONTACT US TO REPORT ILLEGAL FILES
ADMINISTRATORS CANNOT BE HELD RESPONSIBLE FOR USERS POSTS AND LINKS

... Copyright 2003-2999 Sonsivri.to ...
Powered by SMF 1.1.18 | SMF © 2006-2009, Simple Machines LLC | HarzeM Dilber MC