My intention with the circuit below is to enable a DS1337+ (I2C, 8-DIP, RTC by Maxim) to have a battery backup, just like the DS1307.
The DS1337+ (and DS1672) is all I have in hads right now, so suggestions such as "just use a DS1307" aren't exactly what I am looking for. I already have all the components listed in the circuit below.
Basically the circuit is:
If there is +5V coming in from the arduino (header), then the DS1337+ is powered through a 3.3V regulated output provided by the MAX604, which in turn is powered by the Arduino. Otherwise it is fed by a CR2032 coin cell.
Q2 + R1 + R2 is simply as a "NOT" gate, having the arduino +5V as its input
LED D1 simply shows that there is power from the arduino.
The circuit above works in the protoboard, but it has a few drawbacks, and that's where your help comes in:
- In the picture above, Q2 is a 2N2222, but in reality it's a KA2222. I chose it over the 2N3904 because it has a lower voltage drop on the emitter than the 2N3904. I get at most 2.4V for Vcc @ U2 when it's unplugged. How can I maximized the voltage available to the DS1337 ?
- The MAX604 datasheet state that it has built-in protection for when Vout > Vin. I figure that will be everytime the circuit is disconnected from the Arduino. Would that do any hard to the IC in the long run?
- C1 is there not only to stabilize the output from the battery or from the MAX604, but also to prevent any lack of power when the circuit is being (dis)connected from the arduino and Q1 hasn't switched fast enough. Is 10uF enough for that?
- Is the circuit above correct? Can it be simpler considering all I want is to have 2 possible power sources for the DS1337?
Thanks in advance.