Go Down

Topic: chronodot (Read 13836 times) previous topic - next topic


I have a Chronodot RTC (version 2.1) and I'm trying to figure out how it's supposed to be wired up to my Arduino. I've been referring to this link: http://docs.macetech.com/doku.php/chronodot
There's an Arduino program on there, but it doesn't indicate anywhere in the program the pins on the Arduino to which I need to connect the wires. Anybody know? Thanks.


Also, does anybody know anything about Arduino libraries made specifically for Chronodot?


Macetech's example code uses the Wire library, and from the documentation:

On most Arduino boards, SDA (data line) is on analog input pin 4, and SCL (clock line) is on analog input pin 5. On the Arduino Mega, SDA is digital pin 20 and SCL is 21

..and that just leaves you with VCC and GND to hook up.

I'm not aware of any libraries for the DS3231.


Thanks. I wired the SDA and SCL pins to A4 and A5, respectively, and I wired the VCC and GND pins to power and ground on my breadboard, respectively. I uploaded their example program and opened the serial monitor, but I'm not getting any data. Do you have any idea what the problem could be? Do I need to wire any of the other pins on the Chronodot?


Double check you are using the analog pins and not digital 4 and 5.
Capacitor Expert By Day, Enginerd by night.  ||  Personal Blog: www.baldengineer.com  || Electronics Tutorials for Beginners:  www.addohms.com


My wires were connected to the correct pins.


I'm not aware of any libraries for the DS3231.

Here is one:


You need pullup resistors on the A4/A5 lines also (like 10K) if the chronodot does not include them:

"The SDA and SCL pins are used to communicate with the ChronoDot, using the I2C standard interface. The I2C bus requires pullup resistors from SDA and SCL to VCC. Since many devices that have I2C buses already have the resistors in place, these are not provided with the ChronoDot. But there are two locations for 4.7K or 10K resistors to be soldered, in case your controlling device does not have its own pullup resistors. "
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


Thanks, I tried using 10K resistors. I simply connected one leed on each resistor to the VCC rail of my breadboard and the other leeds to the SDA and SCL pins. No results. Do I actually need to solder the resistors onto the Chronodot board?


Do I actually need to solder the resistors onto the Chronodot board?

No, that is not a requirement. Here is a useful I2C troubleshooting sketch. It scans all possible legal I2C addresses and tells you if there is a response from any address. After uploading, just open the serial monitor and set to 38400 baudrate, then press the reset button on the board and see if your Chronodot is answering the inquirey.

Code: [Select]

* I2CScanner.pde -- I2C bus scanner for Arduino
* 2009, Tod E. Kurt, http://todbot.com/blog/

#include "Wire.h"
extern "C" {
#include "utility/twi.h"  // from Wire library, so we can do bus scanning

// Scan the I2C bus between addresses from_addr and to_addr.
// On each address, call the callback function with the address and result.
// If result==0, address was found, otherwise, address wasn't found
// (can use result to potentially get other status on the I2C bus, see twi.c)
// Assumes Wire.begin() has already been called
void scanI2CBus(byte from_addr, byte to_addr,
               void(*callback)(byte address, byte result) )
 byte rc;
 byte data = 0; // not used, just an address to feed to twi_writeTo()
 for( byte addr = from_addr; addr <= to_addr; addr++ ) {
   rc = twi_writeTo(addr, &data, 0, 1);
   callback( addr, rc );

// Called when address is found in scanI2CBus()
// Feel free to change this as needed
// (like adding I2C comm code to figure out what kind of I2C device is there)
void scanFunc( byte addr, byte result ) {
 Serial.print("addr: ");
 Serial.print( (result==0) ? " found!":"       ");
 Serial.print( (addr%4) ? "\t":"\n");

byte start_address = 1;
byte end_address = 127;

// standard Arduino setup()
void setup()
   Serial.println("\nI2CScanner ready!");

   Serial.print("starting scanning of I2C bus from ");
   Serial.print(" to ");

   // start the scan, will call "scanFunc()" on result from each address
   scanI2CBus( start_address, end_address, scanFunc );


// standard Arduino loop()
void loop()
   // Nothing to do here, so we'll just blink the built-in LED



Thanks retrolefty. Here's what I got…I'm attaching a screencap to this message.

I'm also attaching a picture of what I have wired up; maybe you guys can tell me if I got anything blatantly incorrect?
Also, there are two places that say R1 and R2 as you can see here in this image: http://www.adafruit.com/images/medium/ChronoDotV2_MED.jpg do I need to solder 10K resistors into those holes?


Sep 08, 2011, 08:47 am Last Edit: Sep 08, 2011, 09:00 am by retrolefty Reason: 1
Ok, the problem is how you are mounting the chronodot to your breadboard, you are shorting all the pins together on each side of the dot, and not actually wiring anything to any of the dot pins. Breadboards holes are all wired together only on the 5 holes in a row. You need to rotate the chronodot 90 degrees and have it straddle the center section. Does that make sense? You maybe could use a ohm meter to get a better idea of how the breadboard holes are arranged and used?



Thanks so much! I feel so derpy for not realizing that. It works now.

However, I'm confused by the data that it's spitting out. I posted a screencap. Shouldn't it be getting the exact time?


You need to tell it what time it is to start. After that, assuming you have battery backup as well, it will have the correct time.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.


How do I do that? I tried using the script and library I found on this site, but to no avail: http://www.radekw.com/blog/2011/01/09/connecting-chronodot-and-setting-the-time/

Go Up