Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Help ! calculating capacitance for the required circuit

Status
Not open for further replies.

Clarkdale44

Member
Hello

I have a device which needs to stay on, when the mains power fails, it takes about a second before the battery kicks in, this makes the device reboot and it takes a while to get everything back together. So i wanna add a capacitor in parallel to the device, so that it could power the device for just 1 second until the battery takes on. I just want to know how to calculate its capacitance.
My device is rated at 1 amps, takes 9 volts input.

Regards!
 
Hello

I have a device which needs to stay on, when the mains power fails, it takes about a second before the battery kicks in, this makes the device reboot and it takes a while to get everything back together. So i wanna add a capacitor in parallel to the device, so that it could power the device for just 1 second until the battery takes on. I just want to know how to calculate its capacitance.
My device is rated at 1 amps, takes 9 volts input.

Regards!

A couple of thoughts. A capacitor is not going to supply alternating voltage like the mains do. What causes the battery circuit to kick in? Is it the drop of constant voltage, or the loss of alternating voltage. If it is the former, then anything you do to prop up the constant voltage will just delay the time the batteries kick in. You probably already have a capacitor at the output of the power supply to smooth out the ripple. Do you want to increase that capacitance more? If you do, it will increase the startup surge current. Hope the rectifier can handle the increase. You can easily figure out the amount of capacitance needed if you know the constant voltage when everything is running on the mains, the load the mains supply, the time you want to keep the constant voltage above the minimum voltage level, and the minimum voltage level.

Ratch
 
Your best option is keep the battery on float all the time , so there is no latency after a power failure using diodes or equiv. to use the higher voltage to supply the 9 Watt per second or 9 Joules of energy per second. THe storage capacitance could be in many Farads with low ESR to maintain the voltage like a battery.
 
A couple of thoughts. A capacitor is not going to supply alternating voltage like the mains do. What causes the battery circuit to kick in? Is it the drop of constant voltage, or the loss of alternating voltage. If it is the former, then anything you do to prop up the constant voltage will just delay the time the batteries kick in. You probably already have a capacitor at the output of the power supply to smooth out the ripple. Do you want to increase that capacitance more? If you do, it will increase the startup surge current. Hope the rectifier can handle the increase. You can easily figure out the amount of capacitance needed if you know the constant voltage when everything is running on the mains, the load the mains supply, the time you want to keep the constant voltage above the minimum voltage level, and the minimum voltage level.

Ratch

My device is running from 9v ac adapter, battery circuit kicks in using a set of relays, it connects/disconnects battery between the device and battery charger. Relays takes a second to switch battery from charger to device, this makes the device reboot. I wanna add capacitor parallel to the dc (9v) connection of the device. So when the main fails, while the relays connect battery to the device, during that 1 sec time the capacitor takes over. This should stop the device from reboot.
 
Watt-seconds= Joules per second
If your load demand is 3 seconds then consider 18 Joules of energy.
for dv/dt to be say 10% in 3 seconds the time constant must be 18 seconds
since RC=T=~60% , then 10% V drop is 6T in 3 seconds or T= 18s
Since V/I= 9 Ohms, C= T/R= 18/9 = 2 Farads. ESR must be low eg<0.1V @ 1A or <0.1 Ohm.
 
My device is running from 9v ac adapter, battery circuit kicks in using a set of relays, it connects/disconnects battery between the device and battery charger. Relays takes a second to switch battery from charger to device, this makes the device reboot. I wanna add capacitor parallel to the dc (9v) connection of the device. So when the main fails, while the relays connect battery to the device, during that 1 sec time the capacitor takes over. This should stop the device from reboot.

OK, let's take a typical example. Suppose you don't want to go below 7 volts. If you still want to supply 1 amp at 7 volts, then your load is around 7 ohms. Use the equation below to determine the time constant, and then the capacitance needed.

Clarkdale44.JPG


So you need over a half farad to sustain one amp for 1 sec assuming the voltage drops from 9 to 7 volts. You can see from the plot that after 1 sec at 1 amp, the voltage is down to 7 volts.

Ratch
 
OK, let's take a typical example. Suppose you don't want to go below 7 volts. If you still want to supply 1 amp at 7 volts, then your load is around 7 ohms. Use the equation below to determine the time constant, and then the capacitance needed.

View attachment 93469

So you need over a half farad to sustain one amp for 1 sec assuming the voltage drops from 9 to 7 volts. You can see from the plot that after 1 sec at 1 amp, the voltage is down to 7 volts.

Ratch

Thanks man, i appreciate it... I just saw these things are quite expensive...If its that expensive, i just came up with another hunch.. I am just gonna connect a 9v (alkaline) battery parallel to the device with few diodes to stop the battery from receiving current from the 9v adapter. When mains fail, it should take the load of the device immediately and keep it powered up until the main battery kicks in. We are talking about less than a second here so i think it should work. This may cost me a battery every 10-20 days....
 
9V alkalines will have an ESR which rises rapidly near end of life and with 1A load will may drop more than you expect. Perhaps a 9V Lithium cell.
 
I would suggest looking at your relay drive circuit.

The typical release time of most relays is under 10 milliSeconds. If you're seeing 1 second, then there is something else going on. I suspect that the cause might be the oft overlooked fact that most relays will stay engaged even when the voltage has fallen to as low as 15% of it's nominal voltage.

If your 9V adapter feeds your relay as well as a 5V regulator, then your regulator will shut down fairly high on the unpowered RC curve of the adapter, but the relay will stay engaged quite a bit longer.

If that is what you've got, then you want to speed up the release time of the relay. I would place a NPN transistor in the negative leg of the relay, Feed the base with a small resistor and a 7 or 8 volt zener. That should cause the relay to release much faster.

If that isn't what you are doing, then please post a schematic.
 
Hi,

There are a number of ways to go about doing this.

An extreme example is to use a back up DC to AC converter that runs constantly under no load, and when the power goes out the converter is switched into the circuit to power the load. I actually had to design a commercial switch to do this way back when i worked in the industry, but it had to handle 100 amps and used big SCR's and was called a "Static Switch". Your circuit would require a small converter and small relay though which would be much simpler.

The main point though is that you can make your own static switch by sensing the mains and clicking in a relay to power the load, and since you have a DC load, you can use a back up battery that stays charged until needed, and then switched into the circuit for that 1 second required interval.

Given a way to sense the mains, the storage requirements become much lower. For example, using a capacitor as the storage element and using a voltage doubler to charge it, the equation for the cap value is:
C=(2*W)/(V2^2-V1^2)

where your load power is W, and the top charge voltage is V2 and lower voltage is V1.
Your load is about 9 ohms which at 1 amp is 9 watts, but at 8 volts it is probably less like 7.11 watts, but lets assume 8 watts. At 8 watts the equation with a voltage doubler gives us a capacitance of 62000uf. With a voltage tripler, we would only need 25000uf.
So you can see that as we double or triple the voltage we need less capacitance, although we do need a buck converter too which will mean the cap has to be a little larger than calculated above (maybe 10 percent higher).
The cap would stay charged all the time until it was needed.

So there are a number of ways to do this. The battery back up being switched in is probably the simplest and cheap because the battery is never used until that 1 second requirement time comes around. You can then use diodes to switch the battery in too, if the voltages are stable enough during normal operation to allow that. The battery needs to be a decent size battery however, like a lead acid or li-ion type, and then it can be recharged automatically when the power comes back on.
 
Thanks guys for all the suggestions... its much appreciated. Well after thinking about the using the 9v rechargable battery instead of capacitor. I used implemented it in the circuit today. It took a while before i stopped all the return current with diodes but the final voltage outputs were fine and the circuit was able to do what i was making it for..

@MrAl
Thanks man, your suggestion is also good, but unfortunately, i may not be able to find a 25000uf cap anywhere near. They do have 10000uf, so i can just connect three of them parallel together, and then use a voltage tripler to charge it up. Well, i already finished building the battery method you suggested and its working fine for now after a lot of tickling. Lets see how it works.

@ChrisP58
yeah, my 9v adapter powers my device as well as the two relays, which npn transistor you think i should use?
 
What are the coil specs of your relays? How do you have the two relays wired?

And what is the actual measured output of your 9V adapter when loaded?
 
What are the coil specs of your relays? How do you have the two relays wired?

And what is the actual measured output of your 9V adapter when loaded?

Well, i don't know coil specs, the relays are wired together on pcb, by default the battery is attached to the device, when power is applied to the relays, it switches the power source from battery to adapter (the one that is also powering the relays). The measured output of 9v adapter when its fully loaded is 9.4v and when no load it is 9.8v.
 
Thanks guys for all the suggestions... its much appreciated. Well after thinking about the using the 9v rechargable battery instead of capacitor. I used implemented it in the circuit today. It took a while before i stopped all the return current with diodes but the final voltage outputs were fine and the circuit was able to do what i was making it for..

@MrAl
Thanks man, your suggestion is also good, but unfortunately, i may not be able to find a 25000uf cap anywhere near. They do have 10000uf, so i can just connect three of them parallel together, and then use a voltage tripler to charge it up. Well, i already finished building the battery method you suggested and its working fine for now after a lot of tickling. Lets see how it works.

@ChrisP58
yeah, my 9v adapter powers my device as well as the two relays, which npn transistor you think i should use?

Hi again,

Well, whatever is easiest for you and you like best, that's the way to go :)

Also, it may be a good idea to later look into why the relay system doesnt work faster like it is, as Chris seems to be suggesting. It may be hard to fix though because they might not sense the voltage directly but by using the coil of one of the relays. That's how it is done sometimes. The problem with that is that the line voltage has to decrease low enough to let the relay open which may be too low for your device to run at. They also use a capacitor sometimes to keep the relay on a little longer so it doesnt switch by any short term sag (and a rectifier to power the DC coil relay). You could look into this though if you feel like it.
Sometimes i mod stuff rather than try to troubleshoot, because once it is modded you know exactly how it is working and dont have to figure out some hair brained scheme that somebody else thought up.
 
Hi again,

Well, whatever is easiest for you and you like best, that's the way to go :)

Also, it may be a good idea to later look into why the relay system doesnt work faster like it is, as Chris seems to be suggesting. It may be hard to fix though because they might not sense the voltage directly but by using the coil of one of the relays. That's how it is done sometimes. The problem with that is that the line voltage has to decrease low enough to let the relay open which may be too low for your device to run at. They also use a capacitor sometimes to keep the relay on a little longer so it doesnt switch by any short term sag (and a rectifier to power the DC coil relay). You could look into this though if you feel like it.
Sometimes i mod stuff rather than try to troubleshoot, because once it is modded you know exactly how it is working and dont have to figure out some hair brained scheme that somebody else thought up.

Thanks again, i will keep that in mind. I have already saved the suggestions here in my to do list.
 
Well hello, my battery method failed way too well that i can't even explain and i don't care about it anymore. I now know why the relays takes 1 second to switch power. The issue is the power supply. Well the adapter has filtering capacitor inside it that's quite normal, it is storing enough charge to cause the relays to stay on for 1 more second when mains fail. Now i need to know how to deal with it? How to make the relays switch faster?
 
The included simulation shows what I think may be going on. V1, D1 and C1 represent your power adapter. R1 and D2 aproximate your 5Vplt supply and its 1 amp load. R5 represents your relay as it is now. In the simulation the adapter power is cut at t=1 second. At that moment Vcc (the adapter output) drops rapidly down to the level where the voltage regulator cuts off. I don't know what your circuits thresholds are. In the sim I've modeled it at about 6.5 volts. From that point Vcc now drops much more slowly being discharged only by Relay resistance R5. As I said before, relays stay engaged down to ~15% of nominal. If that point for your relay is bout 2 volts, then it will hang on for about a second past the power supply cutoff point.

The circuitry to the right shows a revised relay drive circuit. By shifting the voltage at point A down by the zener D3, transistor Q1 is turned on, but fairly close to it's turn off point of ~0.6V. as such, Q1 turns off, and the relay it drives, at effectively the same moment that your 5Volt supply does. While much faster than it was, this may still not be fast enough to keep your device from rebooting. That will depend on how much capacitance you have on the 5Volt line.

If this still isn't enough, then there re a few other circuit changes that can be done that will ensure the relays switch slightly before the 5V regulator drops out.

Note: Component values used in my simulation are estimates only, and may not match, or be suitable for, your actual hardware.

upload_2015-8-2_1-22-9.png
 
Well hello, my battery method failed way too well that i can't even explain and i don't care about it anymore. I now know why the relays takes 1 second to switch power. The issue is the power supply. Well the adapter has filtering capacitor inside it that's quite normal, it is storing enough charge to cause the relays to stay on for 1 more second when mains fail. Now i need to know how to deal with it? How to make the relays switch faster?

Hello again,

It would be good to see a schematic.

Think about this...if you connect a new 120vac relay to the line itself that will switch off within about 100ms when the mains goes out, assuming it goes down all the way or pretty much all the way. That new relay can be used to break or make any connection you need, such as what the original relay was supposed to do.
Keep in mind that it will be much faster than the old method, so it might turn on and off if there is a short term dip in the line. That shouldnt hurt anything, but you should be aware that can happen whereas with the 1 second delay that would not happen. If the battery is just taking over the load though then that shouldnt matter.
Actually any method that senses the line can be used for this, as long as it is electrically isolated from the line (small AC output transformer or wall wart with AC output for example).
If you use say a 12vdc relay and a 12vac output wall wart, you could use a rectifier and small capacitor rather than a large capacitor. That would provide faster switching too and be isolated from the line voltage.
Using an AC output wall wart, rectifier, small capacitor, small transistor, you can sense within about a quarter cycle to half cycle time which is about 4.2 to 8.3 milliseconds. The transistor can then be used to switch something in or out, or connected to a relay to switch something in or out.
 
Last edited:
Hello again,

It would be good to see a schematic.

Think about this...if you connect a new 120vac relay to the line itself that will switch off within about 100ms when the mains goes out, assuming it goes down all the way or pretty much all the way. That new relay can be used to break or make any connection you need, such as what the original relay was supposed to do.
Keep in mind that it will be much faster than the old method, so it might turn on and off if there is a short term dip in the line. That shouldnt hurt anything, but you should be aware that can happen whereas with the 1 second delay that would not happen. If the battery is just taking over the load though then that shouldnt matter.
Actually any method that senses the line can be used for this, as long as it is electrically isolated from the line (small AC output transformer or wall wart with AC output for example).
If you use say a 12vdc relay and a 12vac output wall wart, you could use a rectifier and small capacitor rather than a large capacitor. That would provide faster switching too and be isolated from the line voltage.
Using an AC output wall wart, rectifier, small capacitor, small transistor, you can sense within about a quarter cycle to half cycle time which is about 4.2 to 8.3 milliseconds. The transistor can then be used to switch something in or out, or connected to a relay to switch something in or out.

Hello
I tried my best to make its schematic, but as i said there is not much to see in schematic anyway.
 
You could ditch the relays and use two diodes, in a diode-OR configuration. The only requirement, voltage-wise, is that the battery voltage should be less than the adapter output voltage.
diode-or-bridge.png
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top