DS3231 RTC Battery Backup

HI all -

I cant seem to find a definitive answer anywhere online and my electorincs knowledge is still pretty limited - so I am hoping someone can advise.

I am utilsing a DS3231 RTC with my Arduino Nano project but space is at a premium so I am looking to reduce part volume where possilbe. I am using the RTC to keep accurate time but I dont need the battery backup functionality - I am happy to set the time after every Nano power down.

Using the schematic from Adafruits DS3231 as a basis (Adafruit Learning System) which I will utilise in my intergrated PCB design can I simply leave the VBAT connection on the DS3231 not connected? Or must they be dealt with?

Any advice or feedback would be warmly recieved.

Thank you

What does tjhe DS3231 datasheet recommend?

See page 7.

"If VBAT is not used, connect to ground."
Perfect - thank you for the pointer! Quite simple then. Thanks again

If you want to save battery power, you might consider wiring the 3.3V supply to the Vbat pin, and connecting Vcc to ground. This video is about a different module, but the explanation would apply to your board as well.

The bottom line is that the DS3231 chip draws less current when powered from Vbat than from Vcc. Nobody knows why.

@ShermanP - Thank you for pointer!

Essentailly swapping the VCC & VBAT wiring? Therefore utilising the 3.3v output from the Nano to power the VBAT pin on the DS3231 (decoupled with 1.0uF cap) and GND'ing the VCC.

My schematic is as follows - does this look right to you?

You should consider the SOIC-8 version if space is a concern

PDF

Also, while you're at it, you should connect the 32K output of the DS3231 to TOSC1 of the Arduino so you have a very accurate 32K clock driving TIMER2. It will come in handy in the future.

Good recommendation - the SOIC-8 pin device is in stock with jlcpcb who will be manufacturing the combined PCB including SMT assembly - so I will definitely plumb for this. Thank you.

Does my schematic look correct though? I can easily substitute this for the 8 pin device.

Which pin on the nano is TOSC1??

The combined control board PCB is for a word clock. Comprising of nano, DS3231, LDR, motion sensor and tactile buttons. There is a jst connector to connect to a Neopixel matrix.

As mentioned before, I am not precious on the battery backup. The time can quickly be set on power on via the external tactile buttons.

Thank you for your comments.

The schematic looks ok to me. But be advised that on Nano clones the 3.3V pin is supplied by the CH340 USB adapter chip, and it only provides a few millamps. It should be enough to power the DS3231 and the two 10K pullup resistors, but not much more than that. There is also the issue that the DS3231 will be running at 3.3V and the Nano at 5V, so there might be a problem on the I2C lines - I really don't know about that, but others should be able to tell you if it works ok. The safest option might be to power the DS3231 and the pullups with 5V instead of 3.3V. But of course that would draw more current.

You are going to do a test circuit before ordering boards, aren't you?

Interesting. The nano will be powered by a supplementary micro USB port connected to RAW (VDD) in schematic.

I have successfully tested the clock powered from the 5V output pin of the nano but as of yet not had anything hooked up to the 3v output pin.

The 5v VDD input onto RAW won’t output 3v on nano clones then?

I have successfully tested the build with the standard DS3231 module that you see everywhere - but I want to remove the battery and scale down the volume. Hence pursuing the individual DS3231# chip.

The Raw input (called Vin on my Nanos) is the input to the 5V regulator on the Nano, and your Vdd would need to be 6.5V or more so the regulator will work properly. If you are supplying 5V to the project, it should connect directly to the 5V pin, which is the output of the regulator. Or you could just connect the external 5V supply to the Nano's USB connector, which also goes to the 5V pin, but through a diode.

The CH340 is powered from the 5V pin, and it has a 3.3V internal regulator that provides power to the Nano's 3.3V pin. So as long as it's working, you will have the 3.3V supply.

Note that the pullup resistors on the popular DS3231 module are 4.7K, whereas Lady Ada's are 10K. I don't think that matters, but as I said before, you would do well to test your actual circuit before going into production rather than relying on what's said here.

So connecting VDD to the 5.5v pin will still power the Nano? I was of the understanding that the 5.5v pin was purely an output pin and that the Nano had to be powered via its built in USB or via the VIN pin?

The project will be powered from a generic 5v plug/socket connected via micro usb cable to a micro usb connector - not the Nano's built in mini usb. I appreciate now, that anything connected to VIN needs to 7-12v (as per datasheet).

*"The CH340 is powered from the 5V pin, and it has a 3.3V internal regulator that provides power to the Nano's 3.3V pin. So as long as it's working, you will have the 3.3V supply." *

Are you suggesting that if I connect VDD to the 5v pin I will still get 3.3v out from the 3v pin and could therefore connect the DS3231 to this?

nytram6:
So connecting VDD to the 5.5v pin will still power the Nano? I was of the understanding that the 5.5v pin was purely an output pin and that the Nano had to be powered via its built in USB or via the VIN pin?

Yes, you can power the Nano directly at the 5V pin with a regulated 5V supply. See the schematic for the typical clone Nano:

http://actrl.cz/blog/wp-content/uploads/nano_ch340_schematics-rev1.pdf

Are you suggesting that if I connect VDD to the 5v pin I will still get 3.3v out from the 3v pin and could therefore connect the DS3231 to this?

Yes. See the schematic. But I've seen elsewhere that the maxium current supplied on the 3.3V pin is 30mA. As long as you don't get any material voltage sag on this pin when powering the RTC, you should be ok. But if there's any doubt, you could power the RTC from 5V instead. The RTC will work fine either way.

If the Nano is equipped with an FT232 for USB, then 50mA of 3.3V current is available.

CH340 does not appear to have a 3.3V output voltage capability

I have just tested powering my nano via a 5V regulated supplementary micro usb connected 1. VIN & GND and 2. 5V & GND and in both instances I get 3.3v with a multimeter across 3v & GND.

Again, I know the datasheet specs 7v+ on VIN - but it’s interesting that 3.3v is available via either configuration.

CrossRoads:
If the Nano is equipped with an FT232 for USB, then 50mA of 3.3V current is available.

CH340 does not appear to have a 3.3V output voltage capability
https://cdn.sparkfun.com/datasheets/Dev/Arduino/Other/CH340DS1.PDF

Yes it does. It's the V3 pin. As shown on the Nano's schematic, that pin connects to the Nano's 3.3V output pin.

nytram6:
I have just tested powering my nano via a 5V regulated supplementary micro usb connected 1. VIN & GND and 2. 5V & GND and in both instances I get 3.3v with a multimeter across 3v & GND.

Again, I know the datasheet specs 7v+ on VIN - but it’s interesting that 3.3v is available via either configuration.

Well, if you'll look at the schematic link I posted, you'll see that Vin connects to the input of the 5V regulator, and the datasheet for that regulator will give you the proper voltage range for that input.

When you connect your 5V supply to Vin, what is the voltage on the 5V pin?

Just a thought. I would make the connection from Vbat to ground in such a way you could cut a clad and jumper in a battery. For instance don't connect the Vbat to ground with a trace going under the chip. The battery would be off board so no board space is lost.

You may never use the battery or perhaps during trouble shooting You don't have to repeatedly reset the time date.

ShermanP:
When you connect your 5V supply to Vin, what is the voltage on the 5V pin?

Regualated 5v supply onto VIN gives 4v on the 5v pin.
I have now moved away from VIN and will supply 5v pin with a regulated supply.
It might just be easier to supply the DS3231 from the 5v pin instead of 3v pin - SDA & SLA will be (A4 & A5) output 5v. Not sure if this may cause issues when 3v is supplied to the DS3231.
Realistically, the clock will be powered via a regulated 5v mains supply and never a battery pack. The battery pack would need to be charged/replaced to often.

Powering the DS3231 with 5V would certainly eliminate any possible problem that 3.3V might cause.

The only thing about not having battery backup for the DS3231 is you may have to set the clock on even a brief mains power glitch. If you never get those, your electric service is better than mine. But perhaps adding a diode and a capacitor would keep the RTC running for a while if there's a power glitch. Connect the 5V supply to Vbat through a diode, which would give you about 4.35V at Vbat (close enough to 5V), then add a capacitor from Vbat to ground - 10uF or more. Maybe others here could comment on whether this would work. The DS3231 periodically goes into a high-current heating mode, and that might be too much for a capacitor to handle.

As per my schematic in post #4 VBAT is already decoupled to GND with a 1.0uF cap as per the DS3231 datasheet. Will increasing this to your recommended 10.0uF be safe?

Also, what diode would you suggest? I am struggling with identifying diode ratings. Is it just a 5V diode I would need?

Thanks for all the help - all very new to this and I’m trying my best to interpret the jargon!