# Sram battery backup

I don't have an option here in my country , No non-volatile sram and i need it for my project . i designed a circuit for that and need anyone's opinion if it's ok or need a correction .

• How much memory do you need? Some RTCs like DS1307 have some spare bytes that are battery backed. – filo Apr 4 '18 at 5:22
• There are battery back-up IC's for sram that use MOSFET's so no Vdrop or extra current drain. – Sparky256 Apr 4 '18 at 5:33
• Look into the Maxim Max703/704. They are designed for lithium coin cells. – Sparky256 Apr 4 '18 at 5:37
• Use double asterisk (**) around a word you want in bold. I would always recommend a MOSFET over a bjt, just because you can bias them with 1 or 2 megohm resistors. Very little current is wasted. – Sparky256 Apr 4 '18 at 5:46
• nice opinion **Thaks for asterisk ** – Ahmed Hassanein Apr 4 '18 at 5:52

Given the specs say

Data retention current:  1.0 μA (MAX.) (V = 3 V, T = 25°C)


I see at least three problems:

• The two 1 kΩ at the battery transistor will draw too much current when VCC is out. 40 kΩ each seems more appropriate to me. (2.2V / (1µA / 25)) ~= 88 kΩ; 40 kΩ should be good enough.

• When the battery is half used its voltage will be below the minimum data retention voltage, plus you will have a (small) voltage drop at the transistor. This may or may not work, or, worst, it may work when you test it and stop working at a later time.

• The 2N3904 will not cut until VCC is below 0.7~0.8 V. If VCC goes down slowly (electrolytic capacitors, ...) there will be a time during which both this transistor and the one feeding current from the battery will be active. In this situation the third transistor, the bottom one, will probably work in reverse and feed current from the battery to VCC (VCC is now 1 or 2 volts below Vbat). This will drain the battery through the 1 kΩ. In the worst scenario the leak will keep VCC above .7 V and, because it will never stop, it will drain the battery in a few days.

I'd suggest changing the two resistors at the base of the 2N3904 to a divisor that will cut it somewhere between 3 and 4 volts at VCC, possibly adding a third resistor from the emitter of the bottom transistor to introduce a Smith Trigger effect and avoid any possibility of oscillations during the transition.

• totaly you are right yes more current will be drawn through Emitter Base junction and the circuit will be shorted at transition time – Ahmed Hassanein Apr 16 '18 at 18:16

this is my new design

• This design draws less current by using voltage divider at the base of Q3 , the current = 4 microamps when VCC =5v , Q3 won't work below 4v at VCC rail and that makes the transition between vcc and battery happens when Q3 is off .
• 1N5817 has a low forward voltage drop ** (.450 v @ 1A datasheet)** , after bench testing it, this Diode conducts 1 mAMP at .2 volts and
that makes using battery at it's full life (ex.. if the battery
voltage = 3v the point D will be 2.8v and if the battery reached the cutoff voltage (2.25v)the point D will be 2.05v .
• Counting the expected CR2032 life if the capacity = (220mAH
datasheet)
bat capacity / circuit current
the ram retention supply current = 1 uAMP at temp 25c i'll use 10 uAMP as a safe margin in case the circuitry works in higher
temp
220mAH / .010 = 22000 H / 24 = 916 days

• Isn't R27 to high? 330K? At 1uA it will be a minimum 0.3V voltage drop on it. Not the mention the noise sensitivity of such a high impedance point. – Dorian Apr 18 '18 at 12:03
• I think you also misread the datasheet , the max standby current is 50uA and 6 typical, not 1uA. 1uA is the input leakage current that is a different thing. Still, this solution is good if you change the value of R27 to a much lower value. Or just connect D6 straight to D point. This will help in case that RAM leaves the suspend state while on battery for a short time. – Dorian Apr 18 '18 at 12:12
• @Dorian when the battery is fully charged the voltage across R27 = 2.7v thus (2.7 / 300k = 9 microAMP) and when the battery near the cutoff boundary 2.3v the voltage across R27 = 2v that gives 6.667 microAMP . i'm seeking retention mode not standby Data retention supply voltage min = 2V Data retention supply current max = 1.0 uA temp 25c Data retention supply current max = 3 uA temp 40c – Ahmed Hassanein Apr 20 '18 at 3:59
• 2.7 across R27? With a 3.4V fully charged CR2032 and the diode will leave 0.5 for VDD? Can you post a link to the datasheet you use? – Dorian Apr 20 '18 at 7:28
• pdf.datasheetcatalog.com/datasheet/Sharp/mXtvvut.pdf – Ahmed Hassanein Apr 20 '18 at 16:37

I wasn't sure if I should post an answer or comment but the explanation is to long to be included in a comment to the Ahmed answer.

First , I would avoid any not needed high impedance point. You want your data to survive for 3 years, anything can happen, a voltage spike , a gsm phone or a piezo lighter used near your board. I would use lower values for R25..R27. none of them have nothing to do with the power consumption but higher values can lead to a higher noise sensitivity.

In fact you should drop R27 because the circuit should be resilient to transitory out of the standby events that might happen on power off/on or due unwanted voltage spikes.

The datasheet I found states maximum 1 uA for 25 degrees Celsius, 3 for 40 and 15 over the temperature range at 3v Vddr, I wouldn't worry to much about that, you won't keep your board for three years at 80C. 5uA overall would be fine for an approximation. Rather a temporary high current (due a high temperature) combined with the high value of R27 can lead to VDD to drop under the retention voltage.

I would use R24 = 100k, R25 = 15.1k, R26 = 20k and R27 = 0

I don't see a dependence voltage to current consumption in the datasheet.

• Thanks for explanation ... i neglected that the effect of noise could force RAM to standby mode and by R27 current value, it won't provide sufficient current . what do you mean by ** higher values can lead to a higher noise sensitivity** ?? do you mean due to low current the device could change it's state easy like going from retention to standby mode by for example unknown spike or interference . – Ahmed Hassanein Apr 20 '18 at 16:56
• Yes. The datasheet is the same – Dorian Apr 20 '18 at 17:05
• i think of correcting the resistors value in my answer to make the solution obvious for other people – Ahmed Hassanein Apr 21 '18 at 8:19
• Of course, since it will be the only complete answer you can make the corrections and choose it. If you really make something functional I would wait at least the first tests. Tough, nothing stops you to appreciate ather answers to. – Dorian Apr 21 '18 at 8:45