1
\$\begingroup\$

I'm making a binary clock that is normally powered using USB 5V.

I already have a battery (CR2032) for the RTC chip. So I want to also use this battery to power the board, when a button is pressed (and USB isn't connected). So you can tell the time, when you don't have a USB port nearby.

This is the schematic I came up with:

enter image description here

Now my question is: when the board is powered via USB, does the PNP transistor prevent the 5V from going into the battery (when the button is pressed)?

Also, since the IC-INPUT has a pull-up to 5V, is there any danger in that 5V is coming into the battery via the pull-up (~30K), 3K3 and 33K? When applying Ohm's law I get around 0.03mA of current, so I guess I'm good. But I don't want to have the battery explode on me.

Note that I'm also using the button as an input for the microcontroller.

\$\endgroup\$
6
  • 1
    \$\begingroup\$ So the clock is powered at 5V. And you want to add a button which will power it on with 3V from the backup battery. Will the microcontroller work at 3V? What RTC chip are you using? \$\endgroup\$
    – Cornelius
    Commented Jun 7, 2014 at 15:49
  • 1
    \$\begingroup\$ Yes, that is exactly what I want. uC is a ATMega8L minimal voltage (2.7V). RTC is a DS3231SN. \$\endgroup\$
    – Gerben
    Commented Jun 7, 2014 at 15:53
  • \$\begingroup\$ And when powered from USB you want an always-on clock? Or use the button to turn it on? \$\endgroup\$
    – Cornelius
    Commented Jun 7, 2014 at 15:54
  • \$\begingroup\$ Always on when plugged into USB. When not plugged in, use battery, only when button is pressed down. This to save battery power (or the battery will be death in minutes) \$\endgroup\$
    – Gerben
    Commented Jun 7, 2014 at 15:56
  • \$\begingroup\$ Could you implement a simple battery charging mechanism (you'd need a rechargeable battery to use) that would kick in when USB is disconnected. Much like a car alternator... You could use an op-amp and some logic to "enable" the button so the clock remains on when the USB voltage exceeds that provided by the battery. The battery will need to constantly feed your circuit to keep the time correct, I assume? \$\endgroup\$
    – Kinnectus
    Commented Jun 8, 2014 at 21:08

1 Answer 1

1
\$\begingroup\$

It seems this doesn't work. I measured the circuit with 5V applied, but no battery. At the battery socket measured 5V and 5mA when I shorted it to ground. So the transistor seems to act like a 1K resistor.

Second problem was that the IC has clamping diodes. So when the circuit was off a current would go from the battery, through the pull-up and the clamping diode, to VCC. Lowering the value at the Base, resulting in even more current leaving the battery. A few milli-amps total. Enough to have the battery run low pretty fast.

Nice idea, but it didn't work out )-:

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.