Building a clock

I want to build a clock but I'm not sure what part will work with the Arduino. I'm wondering if either of these will work.

Part 1:

Part 2:

From the data sheets I think they would both work, but I'm not 100% sure how to read the datasheets yet.

Thanks.

"This is a great battery-backed real time clock (RTC) that allows your microcontroller project to keep track of time even if it is reprogrammed, or if the power is lost. Perfect for datalogging, clock-building, time stamping, timers and alarms, etc."

That looks like it will work. It's nice that they listed the parts list. I'm going to try to buy the parts and build it myself on a breadboard as an extra project.

I would recommend using a DS3231 RTC chip as I find them to be much more accurate than DS1307 RTC's and external component count is less. My first clock used a DS1307 and lost about 7.5 seconds per day, my second clock used a DS3231 and gains about 2 seconds per month.

Riva:
I would recommend using a DS3231 RTC chip

I agree with Riva about the accuracy of DS3231 vs DS1307, but the problem is you can't get the bare DS3231 chip in a breadboard-friendly DIP format. You would have to use a breakout board, which is bulky, and solder the component on yourself.

I would suggest simply getting a pre-built DS3231 module, which will have the backup button cell & holder already in place. They're cheap on eBay. Get one with a rechargeable or at least replaceable button cell. If you buy one with a non-removeable, non-rechargeable button cell, you never know how much life it has left in it. I bought one once that went flat in a few months (maybe the cell was faulty).

The more interesting part of a clock project, in my opinion, is the display, alarms, chimes and whatever else you can dream up. No point making a clock you could just buy in a shop!

Paul

Thanks for the information.

It's too late right now because I already bought 2 DS1307+ last night, but I will keep it in mind for a future project.

From the sounds of it, I think I would rather have the DS1307+ anyway. It might not be as accurate, but it comes in a format that I can use on a breadboard, and I kind of like buying the crystal separate.

My goal with this is to try and learn something new, and being able to put the clock together myself would really help. If I buy something that is already assembled then I really won't learn anything new from the project.

I didn't notice anything on the datasheet for the DS1307+ that states it will lose time, but it does state that some factors, like low power source, or noise in the line could make the chip less accurate.

I'm going to keep the other part number written down in case I need a more accurate design later, but since I've already ordered this part I'm just going to use it for now.

Also, I have an Ethernet shield. I have no idea how to use it yet. But maybe there is a way to use it, to synchronize my clock with the government time server every few days. Just like Windows does. I'm not sure if it's possible, but it's an interesting thought.

Then I would not have to worry about it losing time as much.

CSGuy:
From the sounds of it, I think I would rather have the DS1307+ anyway. It might not be as accurate, but it comes in a format that I can use on a breadboard, and I kind of like buying the crystal separate.
The critical part for good time keeping is the crystals. They not only need to be the correct frequency but using the wrong capacitance can also effect accuracy.

My goal with this is to try and learn something new, and being able to put the clock together myself would really help. If I buy something that is already assembled then I really won't learn anything new from the project.
I have always bought DS3231 chips, mounted on a breakout board & added battery holder as you can see here (the red breakout board)

Also, I have an Ethernet shield. I have no idea how to use it yet. But maybe there is a way to use it, to synchronize my clock with the government time server every few days. Just like Windows does. I'm not sure if it's possible, but it's an interesting thought.
Search for 'Arduino NTP' and you should find plenty of stuff on reading internet time.

PaulRB:
The more interesting part of a clock project, in my opinion, is the display, alarms, chimes and whatever else you can dream up.

Yes, yes. Tell us, CSGuy, what will your clock do? 24v into the bed frame? Servo motor with attached fly swatter to the face?

I want a FogHorn LegHorn clock that says "Boy, I say boy! Time to get up, boy! Stop looking like a bag of wet mice and come alive, boy!"

Is there an emoticon for sarcasm?

I had a friend with a Ford Probe or some similar Chrysler model that spoke "Lights are on", kind of stuff. I always kidded him we'd reprogram them for a Mr T voice: "I pity the fool who left the lights on!" (back in the early Rocky and A-Team days - yeah, I am getting old!).

PaulRB:
Is there an emoticon for sarcasm?

Not being sarcastic. I really do want a FogHorn LegHorn clock. It would be cool.

Okay, maybe the servo flyswatter thing was silly.

I don't know, that would certainly encourage movement - especially like after the 3rd swat or so 8)

I might just add a fly swatter to the clock now.

What I should really add is one of those robotic arms with a tazzer gun attached. If you hit the snooze button more than 3 times the arm kicks into motion.

That was the idea behind my 24v to the bed frame suggestion. Conductive threads in the sheets perhaps. LOL.

You could for sure put some vibration motors on the the frame.

You should hook a super capacitor up on the headboard of the bead. If you hit snooze too many times then the super capacitor is over charged above your head. That should be enough to wake you up!

One of the Jacob's Ladder things. If the sound of all that voltage going bzzzzz, bzzzz, zzzz in close proximity doesn't get your behind to move, nothing will.

bigred1212:
I really do want a FogHorn LegHorn clock.

I already have 3: a Croad Langshan and two Cream Legbars!

Do you get the blue eggs?

From the Cream Legbar hens, yes.

CSGuy, if learning as much as you can by using the most basic components is your thing, I suggest a 7 segment led display. You can learn about multiplexing by driving it directly with the Arduino (and transistors). Perhaps even Charlieplexing.