Reading temperature from DS pin and voltage on the BAT pin of Tiny RTC (RS1307 )

How do you do this?

Plugging those pins into arduino analog pins doesn't seem to work.

The BAT pins shows a voltage of 1.36V which aint right.

How do these pins work?

If you mean the DS1307, the data sheet for the chip is extremely informative. Here is a tutorial Overview | DS1307 Real Time Clock Breakout Board Kit | Adafruit Learning System

jremington:
If you mean the DS1307, the data sheet for the chip is extremely informative. Here is a tutorial http://learn.adafruit.com/ds1307-real-time-clock-breakout-board-kit

It is not a standalone DS1307 IC though.

Rather one of these:

It also has a DS18B20 thermometer on it which is apparently connected to the DS pin of the board.

Don't you have a description of the module that includes a circuit diagram?

There are lots of Arduino tutorials, with accompanying software libraries, to read the DS18B20. From your comment, one would connect the Arduino to power, ground and DS for that purpose.

The picture you showed is of this module, which from the description does not have a DS18B20.
http://dx.com/p/tiny-rtc-i2c-24c32-ds1307-real-time-clock-module-for-arduino-146677

jremington:
The picture you showed is of this module, which from the description does not have a DS18B20.
http://dx.com/p/tiny-rtc-i2c-24c32-ds1307-real-time-clock-module-for-arduino-146677

I am trying to piece together what this ds pin is for. I read some where that that is what this pin was for.
Any idea what this pin is for if my module also does not have a DS18B20?

I can find plenty of datasheets for DS1307 and DS18B20, but very little detailed info on the tiny rtc module regarding the pinout.

Some of these 'Tiny RTC' modules have a DS18B20 included, some do not.

The 3 holes in the top corner of the image in Reply #2 is where the DS18B20 is installed - the component is installed on the battery side, as seen in this image

If installed, this is how it can be wired up

You might also need a resistor between VCC and DS.

I have a number of these cheap modules at home and, from memory, mine don't have the temperature sensor attached - I assume you could solder one in if you wanted too.

Cheers

Magicj:
Some of these 'Tiny RTC' modules have a DS18B20 included, some do not.

The 3 holes in the top corner of the image in Reply #2 is where the DS18B20 is installed - the component is installed on the battery side, as seen in this image

If installed, this is how it can be wired up

You might also need a resistor between VCC and DS.

I have a number of these cheap modules at home and, from memory, mine don't have the temperature sensor attached - I assume you could solder one in if you wanted too.

Cheers

OK, so I reckon I have my answer then......the DS pin on my particular module does nothing.

I traced the track back to a resistor but I have the 3 additional solder points at the edge, which you have described, that have nothing on them.

From what I have seen, most of the cheap modules don't have the temp sensor included - not sure why you would want it anyway :~

Magicj:
From what I have seen, most of the cheap modules don't have the temp sensor included - not sure why you would want it anyway :~

I had in mind that it might be possible to compensate for temperature based time drift in code.

Magicj, do you have any idea how this module trickle charges the battery?

Is it through the vcc pin or through the bat pin?

I doubt very much that the module charges the battery. Why do you think that it does?

jremington:
I doubt very much that the module charges the battery. Why do you think that it does?

Well it would seem to me to be pretty pointless for the makers to use a rechargeable lithium battery if they did not provide a means to re-charge it when there was power available.

You are correct, there is a provision to recharge that battery. The schematic for the Tiny RTC module can be found on this page: Real Time Clock Module | Hobbyist.co.nz

The charging circuit only works if you connect Vcc on the module to 5 V. Looking at the schematic, I suspect that if the module is powered for a long time at 5V, this particular circuit will overcharge and eventually destroy the cell. The charging rules for the LIR2032 can be found here: http://www.powerstream.com/p/Lir2032.pdf

jremington:
You are correct, there is a provision to recharge that battery. The schematic for the Tiny RTC module can be found on this page: Real Time Clock Module | Hobbyist.co.nz

The charging circuit only works if you connect Vcc on the module to 5 V. Looking at the schematic, I suspect that if the module is powered for a long time at 5V, this particular circuit will overcharge and eventually destroy the cell. The charging rules for the LIR2032 can be found here: http://www.powerstream.com/p/Lir2032.pdf

Then I will remove the battery from one, hook it up to 5V and measure the voltage at the positive of the battery holder.

If it is more than 4.2V then it shouldn't be too difficult to solder in an appropriate resistor to GND to reduce the charging voltage

jremmington, with one of my tiny rtc modules, I just removed the battery and measured the voltage at the positive terminal of the battery holder and I get 4.64V.

That's about 0.44V above the 4.2V specified in the datasheet you supplied.

How sensitive are these button cells?

I don't know how sensitive those cells are but an ordinary LiPo battery will be damaged if charged at that voltage. If the chemistry is the same in the LIR2032, I think it will be damaged too.

There is something else very strange about the schematic posted for the Tiny RTC, which is the R4/R6 high-resistance voltage divider that reduces the battery voltage for input to the DS1307. It consists of 470K and 1.5 M resistors and is outlined on the schematic, suggesting that the divider is optional. It would reduce the battery voltage by a factor of 0.75 and I couldn't imagine why it is there.

In trying to figure out why, I ran across this post: concerning "unreliable operation of these modules" http://forum.43oh.com/topic/4131-ds1307-rtc-eeprom-from-ebay-possible-unreliable-operation/

The poster agrees with me that this is a very poor design and suggests a fix.

the module does have a 3.2k resistor between the temp sensor ds and vcc

as for disabling its charging to put a cr2032 in it

  • Remove D1, R6 and R4
  • Solder jumper wire in place of R6

looks like an easy fix