0

DS3231 power consumption
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

DS3231 power consumption

by Lapatate on Fri Nov 15, 2013 7:45 pm

The DS321 can be used in data logging projects due to it's lower operating voltage than DS1307 and is given in the datasheet with a power consumtion of 100 uA at 3.3V, 170 uA at 5.5V. Unfortunatly this is not always the case, as when the device is hooked up with the RTClib the measured power consumption was in the order of 600 uA.

With a Library specially for the DS323X series the special registers can be changed and the two following things should be considered.

Disable the the 32Khz output
Disable the SQW output signal

Doing this brings you the advantage of this low power RTC since the power consumption is dropped by 6fold. Whish is an increadible power saving for projects such as long term data logging.

The code is derived from the DS3231 libray found here:http://hacks.ayars.org/2011/04/ds3231-real-time-clock.html

You can add the following to your code if you already have a library, which will set the special purpose registers to disable the 32KHz output and square wave output on the INT/SQW pin.


Code: Select all | TOGGLE FULL SIZE
void writeControlByte(byte control, bool which) {  // Set DS3121 RTC control bytes
   // Write the selected control byte.
   // which=false -> 0x0e, true->0x0f.
   Wire.beginTransmission(0x68);
   if (which) {
      Wire.write(0x0f);
   } else {
      Wire.write(0x0e);
   }
   Wire.write(control);
   Wire.endTransmission();
}


void setup() {
 
 //turn off 32kHz pin
  byte temp_buffer = temp_buffer & 0b11110111;
  writeControlByte(temp_buffer, 1);
 
 //turn of the SQW signal
  temp_buffer =   0b01111111;
  writeControlByte(temp_buffer, 0);

}


I believe this also counts for the Chronodot RTC's, although the current consumption of the DS3234 is a bit higher (400uA) according to the datasheets.
Lapatate
 
Posts: 14
Joined: Thu Nov 10, 2011 5:56 pm
Location: Berlin

Re: DS3231 power consumption

by adafruit_support_bill on Sat Nov 16, 2013 7:33 am

That is good to know! Thanks for posting.

adafruit_support_bill
 
Posts: 81544
Joined: Sat Feb 07, 2009 10:11 am

Re: DS3231 power consumption

by SensorOne on Thu Dec 12, 2013 5:47 am

Hi Lapatate, Thanks for the post - I'm just lookng at the same, that is to reduce the power consumed by the DS3231. From the datasheet it looks like the power can be reduced still further from 100uA to < 3uA by enetering 'timekeeping mode' - after much hunting round I can't figure out how to enter this mode, hopefully via software but it could we a hardware trick - wondering if you have looked at this mode and had any success? Cheers.
SensorOne
 
Posts: 13
Joined: Thu Sep 23, 2010 3:29 pm

Please be positive and constructive with your questions and comments.