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.

7805 is giving 2.0V at its o/p when no i/p is connected, in battery backup ckt?

Status
Not open for further replies.

xpress_embedo

Advanced Member level 4
Joined
Jul 5, 2011
Messages
1,154
Helped
161
Reputation
396
Reaction score
189
Trophy points
1,353
Location
India
Activity points
10,591
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.

7805 Output Problem.JPG
 

I presume that the missing regulator ground is only a drawing error.

B2515LG is specified with mA range leakage current, it's apparently unsuited for the application.
 
To get 2V at the output of the 7805 implies leakage back through the LM1117 as well. That is quite possible, especially if the PIC has any outputs left high which could be feeding other components on the 3.3V rail. The best solution may be to replace R1 with say 4 diodes in series (or a 3.3V Zener) so the 2V is dropped low enough that it make the INT pin low even when 2V is present but still goes high when 5V is there. You should also add a capacitor at the input to the 7805 for stability and of course check you actually have a ground connected!

Brian.
 
I presume that the missing regulator ground is only a drawing error.

B2515LG is specified with mA range leakage current, it's apparently unsuited for the application.

Regulator Ground is Properly Connected with the Controller's ground, i had checked all the grounds all are properly connected with each other.

B2515LG is specified with mA range leakage current, it's apparently unsuited for the application.

I didn't understand the meaning of this line.

- - - Updated - - -

To get 2V at the output of the 7805 implies leakage back through the LM1117 as well. That is quite possible, especially if the PIC has any outputs left high which could be feeding other components on the 3.3V rail. The best solution may be to replace R1 with say 4 diodes in series (or a 3.3V Zener) so the 2V is dropped low enough that it make the INT pin low even when 2V is present but still goes high when 5V is there. You should also add a capacitor at the input to the 7805 for stability and of course check you actually have a ground connected!

Brian.

Yes its clear that, by replacing the R1 with 4 Diodes will work for me, but one more thing..

The Output of LM1117 is around 0.818V, i think its due to the reason that its input has 2V. (Is it still possible that i am getting 2V at 7805 o/p due to the LM1117 3.3 and and what if i place a diode between the 7805 o/p and LM1117 3.3 I/p)

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.
And it will also work with 4 diodes but i dont have place to add 4-diodes in my pcb, so i just changed the resistor R1 to 10k
But this ensures that my code is fine but the problem is in Hardware.


But still i want to correct this fault.
 

What FvM is saying is the 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.

Adding a diode between the regulators might help but you will have to add an extra capacitor at the input of the second regulator if you do that.

Brian.
 
Thanks Brian,

I will change the B2515LG Diode with some normal diodes like 1N4148 (Its is in my stock now).

I use B2515LG because its Vf is around 0.2V, as PIC32 needs 3.3V so i need a diode which has very less Vf.

(My PIC32MX is operating at 80MHZ and as per datasheet of PIC32MX one can't drop down the Supply much when operating the PIC32MX at 80MHz, that's why i used this diode)
BAT85 you are suggesting is having a Vf of 0.4V, it can create problems as my Supply Drop Downs to (3.3V - 0.4V = 2.9V)
So it can create problem.

Is there any diode, having Vf very less and also dont have much leakage current.
 

The battery is rechargeable or not?? you can just take out the left side diode to make it as a rechargeable battery circuit, and changing the right side diode is enough....

still with not rechargeable batteries, You don need to replace both the diodes the replacing only right side diode is enough, then you don need to increase the battery voltage...
 
My Battery is Not rechargeable, which diode should i use, BAT85 is not available right now, I am having 1N4007 and 1N4148.
 

you can use 1n4001 - 7 which has only 5uA leakage current.. 1n4148 is a fast switching diode it also have low leakage current but we don need it here....
 

you can use 1n4001 - 7 which has only 5uA leakage current.. 1n4148 is a fast switching diode it also have low leakage current but we don need it here....

But 1N4007 has a voltage drop of 0.7-0.8V and due to which my voltage will drop to 3.3V-0.7V = 2.6V
And as per Datasheet of PIC32MX795F512L, i cant operate PIC32MX795F512L at 80MHZ with 2.5~2.6V, it means i will run my controller on the verge, which will fail.

I had tried this with 3.0V battery, with diode dropping the voltage 0.2V its giving 2.8V to controller supply.
And my controller stops running.

That's why i am saying that i need a diode having low leakage current as well as very less forward bias voltage drop.
 

exactly what is the operating range for your pic and what is your available battery voltage...?
 
Last edited:

exactly what is the operating region for your pic...?

By Operating Region i am assuming that you are asking for Voltage Range.

The Voltage range of PIC32 depends on the speed at which it is operating, ideally it is 3.3V

In device datasheet it is written that when PIC32 is operating operating at 3\80MHZ Supply voltage should not go below 2.6V.

That's why i need a diode having very less Vf, and when External Supply fails, the PIC32 is operating ar 32.768Khz so no issue with this.
 

Then you can use three 1N4007 instead of your LM1117-3 (because it just always drops 2 V and nothing more) and your right side diode...(taking two components and putting three diodes)

If you think you need one more regulator (already one is there) you can use LM1117 - 3.5 instead of LM1117-3 also right side diode with 1n4007 (3.5 - 0.7 > 2.6)..

I assume there is no problem in the battery side...
 

Actually I had designed my PCB, and i need 3.3V for some other device connected to Controller, is there any diode in someone's notice which gives Forward Bias Drop of 0.2V

I can buy it, from the market.
 

I think a 0.5 to 1 A/20V schottky rectifier might be an acceptable compromise, e.g. MBR0520 or MBRS120. Depends mainly on how meach reverse leakage current you can tolerate, particularly regarding battery lifetime. The problem in the original post can be overcome by placing a load resistor at the 3.3 V regulator output.

A straightforward solution would be an actively controlled FET switch, but it doesn't fit your PCB without modifications.
 

My Circuit will Consume Maximum 1Amps in worst case, So i will order MBRS120.


A straightforward solution would be an actively controlled FET switch, but it doesn't fit your PCB without modifications.

I will modify my PCB in next design, and will add what you are saying, What is this actively Controlled FET Switch
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top