Go Down

Topic: ZS-042 DS3231 RTC module (Read 45938 times) previous topic - next topic

dunio

Nov 11, 2014, 11:41 am Last Edit: Nov 11, 2014, 08:36 pm by dunio
Hi there,

I recently got my DS3231 module labeled ZS-042 off of ebay and it came with a CR2032 3V battery.

The module works at 3.3V and also 5V however after some days of usage at 5V I noticed that the battery has become quite "thick". A quick check with the multimeter confirms that the module force-charges the battery with VCC! Not quite nice. Here a pic:


So you should at least power this module only at 3.3V, even then, question to the experts: is it save to "charge" a 3V CR2032 at 3.3V continuously without it breaking after some time? 2nd question: is it ok to charge a LIR2032 at 5V?

Other than that the module works quite well with the time library :)

Edit: corrected 3202<>2032 messup

shahidali55

Charging the LIR2032 at 5V is not such a good idea, it will shorten the life of the battery. Charging a CR2032 is a BAD idea. Just cut the PCB trace between the diode and the 201 resistor and use a CR2032. Check the attached image "trace_cut.png"
A CR2032 will last more than 10 years

dunio

#2
Nov 11, 2014, 08:38 pm Last Edit: Nov 12, 2014, 12:57 am by dunio
Ah, ic, but as a LIR2032 is 3.6V, a VCC of 3.3V would be not be sufficient to charge it. So this thing is a complete fail?

I think it would be best to use a supercap instead of the CR/LIR battery, something like this:

spelle

Just received this module myself and very happy that I found this thread before wiring up the circuit.
Maybe the best solution, with a CR2032 as battery backup, is simply to desolder the diode. Then VCC is decoupled from the battery and pin 13 on DS3231.

VanJ

#4
Dec 09, 2014, 01:18 pm Last Edit: Dec 09, 2014, 02:38 pm by VanJ
Hi there,

I recently got my DS3231 module labeled ZS-042 off of ebay and it came with a CR2032 3V battery.

The module works at 3.3V and also 5V however after some days of usage at 5V I noticed that the battery has become quite "thick". A quick check with the multimeter confirms that the module force-charges the battery with VCC! Not quite nice. Here a pic:


So you should at least power this module only at 3.3V, even then, question to the experts: is it save to "charge" a 3V CR2032 at 3.3V continuously without it breaking after some time? 2nd question: is it ok to charge a LIR2032 at 5V?

Other than that the module works quite well with the time library :)

Edit: corrected 3202<>2032 messup
I don't understand, how the charging current can be 5V at 5V VCC, when there is a diode in the charging circuit. I thought it should be Vcc - 0.7V (voltage drop on the diode) = 4,3V, or not? That would be just a bit above the standard charging current (4.2V) for the Li(ion,pol) batteries. And the resistor in series should drop the charging voltage also, or not?

crnv

I received two ZS-042 modules from ebay today which look like the one shown in the picture. Since I found this thread while looking for a library for this module, I would like to clarify something:

I cannot confirm that the battery is charged at VCC. I measured 4.2V after the diode when attaching the module to a VCC of 5V. So it is OK to use the module at 5V if a LIR2032 is used.

However, it is a bad idea to use the module with a CR2032, unless you cut the PCP trace as suggested by shahidali55.


Sideshow_Ben

Looking at this post 6 months after it was started, I'm wondering whether anyone has decided the better thing to do is cut the wires or use an LIR2032 battery instead?

Gypo

Hi

Thought this might help....

The use of a LIR2032 could well work fine if you leave the circuit as it is and use a 5V supply.

The LIR2032 can have a maximum charge voltage of 4.2V and a maximum charge current of 35mA.

Someone is saying in the discussion that they measured 4.2V between the diode and the 200ohm (201) resistor.  Assuming that is correct, that takes care of the maximum charge voltage for the LIR2032.

The resistor will take care of the max charge current for the LIR2032, because....

The current that will pass through the 200 ohm resistor (resistor 201) to the battery is the voltage across the resistor divided by its resistance.

So in the worst case the maximum current that can ever pass to the battery is;-
             Voltage between the diode and resistor = 4.2V
             Voltage the other side of the resistor (battery completely discharged) = 0V
             Voltage across resistor is therefore 4.2V - 0V = 4.2V
             Resistors resistance = 200 ohms

             The current through the resistor and to the battery = (4.2V - 0V) / 200 = 21mA

As the battery charges and its voltage rises the voltage across the resistor will decrease.
As the voltage across the resistor decreases so will the current to the battery. e.g.         
             Assume the battery has charged to 3.0V
             The current through the resistor and to the battery will be = (4.2V - 3V) / 200 = 6mA

So as the battery gets closer to being fully charged the current to it will drop and effectively will provide a trickle charge for the battery....

Regards
Gypo




dunio

This sounds promising. Some german vendor on ebay suggested that one should use a zener diode to drop the voltage as the device as-is does harm the lir on the long run...

Something diffenrent: I wanted to use the ds3231 to send an interrupt every second to my arduino pro mini (5V). There are some libs that set up the ds3231 to do just that however not the most cited one (https://www.pjrc.com/teensy/td_libs_DS1307RTC.html). Also I don't like the overhead of a library if I only want a 1Hz Interrupt.

To wire the stuff up connect SQW of the ds3231 to pin 2 or 3 of your arduino pro mini. Actually interrupt 0 is pin 2 and interrupt 1 is pin 3 - that confused me just a bit. Also you do not need a pullup resistor.

Now here a simple sketch that just requires the Wire.h library that comes with the sdk:
#include <Wire.h>

volatile bool ledstate = 0;
volatile bool interrupt = 0;

void rtc_interrupt()
{
  ledstate = !ledstate;
  interrupt = 1;
}

void setup() {

  pinMode(13, OUTPUT);//Led
  Wire.beginTransmission(0x68); //DS3231 address
  Wire.write(0x0E); //The configuration register
  Wire.write(0);  //This will enable the interrupt at 1Hz intervals
  Wire.endTransmission();

  attachInterrupt(0, rtc_interrupt, FALLING); //the ds3231 pulls the line to GND when issuing an interrupt
}

void loop() {

  if (interrupt) {
    digitalWrite(13, ledstate);
    //your code goes here...
    interrupt = 0;
  }
}

dunio

Hi

Thought this might help....

The use of a LIR2032 could well work fine if you leave the circuit as it is and use a 5V supply.

The LIR2032 can have a maximum charge voltage of 4.2V and a maximum charge current of 35mA.

Someone is saying in the discussion that they measured 4.2V between the diode and the 200ohm (201) resistor.  Assuming that is correct, that takes care of the maximum charge voltage for the LIR2032.

The resistor will take care of the max charge current for the LIR2032, because....

The current that will pass through the 200 ohm resistor (resistor 201) to the battery is the voltage across the resistor divided by its resistance.

So in the worst case the maximum current that can ever pass to the battery is;-
             Voltage between the diode and resistor = 4.2V
             Voltage the other side of the resistor (battery completely discharged) = 0V
             Voltage across resistor is therefore 4.2V - 0V = 4.2V
             Resistors resistance = 200 ohms

             The current through the resistor and to the battery = (4.2V - 0V) / 200 = 21mA

As the battery charges and its voltage rises the voltage across the resistor will decrease.
As the voltage across the resistor decreases so will the current to the battery. e.g.         
             Assume the battery has charged to 3.0V
             The current through the resistor and to the battery will be = (4.2V - 3V) / 200 = 6mA

So as the battery gets closer to being fully charged the current to it will drop and effectively will provide a trickle charge for the battery....

Regards
Gypo

I just tested this and it's not true. Without a battery inserted the voltage reading at the battery terminals is 4.67V

After 20 hours of charging a LIR 2032 (3.6V) in the unmodified ZS-042 module the voltage at the battery is 4.4V and the LIR is already a bit bloated.

AlyssonR

My solution was to cut the trace that leads to the battery +ve terminal, strip the solder resist in order to make two solder pads, and to put in a surface mount diode (1N4148 or equivalent) so that it will block any "charge" current.

This simple mod is the same as we used to use back in the days of boards of 'non-volatile' static RAM when the NiCd batteries died and we put in 3 AA alkaline cells.

While the battery voltage is dropped somewhat, it still provides sufficient power to keep the clock running.

heni40

#11
Aug 15, 2015, 07:08 pm Last Edit: Aug 15, 2015, 07:09 pm by heni40
Hey guys,
I have a different question to the RTC Module but didn´t want to open a new thread.

So I was calling the Module over I2C address 0x68. Since I upgraded my sketch, I now need to use a different address. I always thought I could alter the address shorting the A0, A1 or A2 pins.
I shorted the A1 pin. The address should be 0x6A then right?
Unfortunately I still get an answere from the RTC via the address 0x68.

What am I doing wrong??
Thx in advance...
heni40

harry3si

Hey guys,
I have a different question to the RTC Module but didn´t want to open a new thread.

So I was calling the Module over I2C address 0x68. Since I upgraded my sketch, I now need to use a different address. I always thought I could alter the address shorting the A0, A1 or A2 pins.
I shorted the A1 pin. The address should be 0x6A then right?
Unfortunately I still get an answere from the RTC via the address 0x68.

What am I doing wrong??
Thx in advance...
heni40
As far as I know, the A0,A1 and A2 jumpers are used for changing the address of the onboard EEPROM 24C32.
The address is 1 0 1 0 A2 A1 A0 R/W
this means 0xa0 for writing, 0xa1 for reading when A0=A1=A2=0

Hope I could help you.

The Modules I received ALL come with the LIR2032 now.  Maybe someone had an issue. 
Mitch
Visible Diode Lasers LLC
http://www.visiblediodelasers.com
info@visiblediodelasers.com

travipross

I wish I saw this thread earlier! I've been running this module with the included CR2032 battery at 5V ever since I got it with no issue until today. Today I heard a loud pop noise and looked up to see that the battery exploded and shot across the room. Pretty surprising considering how long it's been operating just fine.

Looks like I'll be getting an LIR2032 or cutting that trace!

Go Up