Introduction: Arduino Clock With DS3231 and LCD1602

This project is part of a bigger one but it can be a standalone project. It's basically a clock with two buttons for setting the time and date.

It doesn't look that great on the breadboard with all those wires but it does the job and it can be simplified by using a I2C display, but I'll cover that subject in a future instructable.

The operation mode is quite simple, you have two buttons, the first one, linked to the pin 8 on arduino is used to select the parameter (date, hour minute ...) and at the end to save the new date. The second button, which is attached to pin 9 on arduino, is used to increment the selected parameter and at the end to cancel data you have just entered (don't save) in case you're not happy with it.

Step 1: Parts Needed:

1. Arduino UNO R3 or compatible board

2. DS3231 RTC (Real Time Clock) module

3. CR2032 battery, if the module doesn't come with one

4. LCD 1602 display

5. 50K ohm variable resistor for adjusting the contrast of the 1602 LCD

6. 2 buttons for adjusting the date and time

7. Two 10K ohm resistors for button pins pulldown

8. Jumper wire for connecting the parts

9. Breadboard

Step 2: Assemble the Scheme

Since I'm sure you can't make the connection based on the first photo of the project, here's the scheme for it.

Step 3: Write the Code:

You can find the code for this project here, in the attached file. Feel free to modify it to suit your needs. The code is explained inside the .ino file. Any suggestions is welcome.

Also the library I used is attached. Other libraries of DS3231 might not work.