Ks0130 keyestudio EASY plug DS3231 Clock Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
==EASY plug DS3231 Clock Module==
[[image:ks0130图.jpg|thumb|600px|right|EASY plug DS3231 Clock Module]]
<br>[[File:ks0130-1.png|500px|frameless|thumb]]<br>


==Introduction==
==Introduction==
The DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC) with an integrated temperature-compensated crystal oscillator (TCXO) and crystal. The device incorporates a battery input, and maintains accurate timekeeping when main power to the device is interrupted. The integration of the crystal resonator enhances the long-term accuracy of the device as well as reduces the piece-part count in a manufacturing line. <br>
The DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC) with an integrated temperature-compensated crystal oscillator (TCXO) and crystal. <br>
Note: this module needs to be used together with EASY plug control board.<br>
A real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit) that keeps track of the current time.<br>


It integrated with a battery input, which can maintain accurate timekeeping when power off. The integrated crystal resonator ensures the accuracy of clock. So this RTC solution should be worth to try.<br>
This module should be used together with EASY plug control board.
<span style=color:red> '''Special Note:''' <br>
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface. <br> If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module. </span><br>
<br>


==Specification==
==Specification==
* Interface: Easy plug
* Temperature range: -40℃ to +85℃
* Temperature range: -40 to +85; Timing accuracy : ± 5ppm (±0.432 seconds / day)
* Timing accuracy: about ± 5ppm
* Device package and function compatible with DS3231
* Two calendar clock
* Output: 1Hz and 32.768kHz
* Output: 1Hz and 32.768kHz
* Reset output and Input Debounce of Pushbutton
* High speed (400kHz), I2C serial bus
* High speed (400kHz), I2C serial bus
* Supply voltage: +3.3V to +5.5V
* Supply voltage: 3.3V to 5.5V
* Digital temperature sensor with a precision of±3℃
* Output Level: TTL level
* Working temperature: -40 ~ ℃ to +85 ~ ℃
* 16 pins Small Outline Package (300mil)
* Size: 38*20mm
* Weight: 6g


<br>
==Technical Details==
* Dimensions: 38mm*20mm*18mm
* Weight: 5.4g


<br>
==Connect It Up==
Connect the EASY Plug DS3231 Clock module to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
<br>[[File:ks0130.jpg|500px|frameless|thumb]]<br>


==Connection Diagram ==
<br>
<br>[[File:ks0130-2.png|500px|frameless|thumb]]<br>
==Upload the Code==
Below is an example code. Open or drag below code to [https://wiki.keyestudio.com/Getting_Started_with_Mixly  Mixly Blocks] and upload. <br>
<br>[[File:ks0398 21.png|500px|frameless|thumb]]<br>


<br>
==What You Should See==
<br>[[File:ks0398 21-2.png|600px|frameless|thumb]]<br>
<br>
Done uploading the code, open the serial monitor and set the baud rate to 9600, you should be able to see the date and the time.
<br>[[File:ks0398 21-3.png|600px|frameless|thumb]]<br>
<br>
<br>


==Sample Code==
==Resources ==
<pre>
#include <Wire.h>  // place file “Wire.h” under the directory “libraries” of Arduino
#include "DS3231.h"  // place file “DS3231.h” under the directory “libraries” of Arduino
DS3231 RTC; //Create the DS3231 object
char weekDay[][4] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" };
//year, month, date, hour, min, sec and week-day(starts from 0 and goes to 6)
//writing any non-existent time-data may interfere with normal operation of the RTC.
//Take care of week-day also.
DateTime dt(2015, 12, 16, 10,25, 33, 3);//open the series port and you can check time here or make a change to the time as needed.
void setup ()
{  Serial.begin(57600);//set baud rate to 57600
    Wire.begin();
    RTC.begin();
    RTC.adjust(dt); //Adjust date-time as defined 'dt' above
}
void loop ()
{  DateTime now = RTC.now(); //get the current date-time
    Serial.print(now.year(), DEC);
    Serial.print('/');
    Serial.print(now.month(), DEC);
    Serial.print('/');
    Serial.print(now.date(), DEC);
    Serial.print(' ');
    Serial.print(now.hour(), DEC);
    Serial.print(':');
    Serial.print(now.minute(), DEC);
    Serial.print(':');
    Serial.print(now.second(), DEC);
    Serial.println();
    Serial.print(weekDay[now.dayOfWeek()]);
    Serial.println();
    delay(1000);
}
</pre>


==Resources ==
https://fs.keyestudio.com/KS0130


'''PDF'''


https://drive.google.com/open?id=1QHUXpcPLB87DfdQB7pMQLfJoHeO2pKnc
<br>


'''Libraries'''
==Buy from ==
*[https://www.keyestudio.com/newkeyestudio-easy-plug-ds3231-clock-module-for-arduino-steam-p0097-p0097.html  '''Official Website''' ]


https://drive.google.com/open?id=1Vc-3syIIwFtBpHjWFxSikPDSFsT4Y1SD
*[https://www.aliexpress.com/store/product/New-Keyestudio-EASY-plug-DS3231-Clock-Module-for-arduino/1452162_32643881814.html?spm=2114.12010612.8148356.8.274657f6NrgpUc  Shop on aliexpress ]


==Buy from ==


http://www.keyestudio.com/keyestudio-easy-plug-ds3231-clock-module-for-arduino.html
[[category:EASY Plug]]
[[category:Module]]

Latest revision as of 16:43, 7 January 2021

EASY plug DS3231 Clock Module

Introduction

The DS3231 is a low-cost, extremely accurate I2C real-time clock (RTC) with an integrated temperature-compensated crystal oscillator (TCXO) and crystal.
A real-time clock (RTC) is a computer clock (most often in the form of an integrated circuit) that keeps track of the current time.

It integrated with a battery input, which can maintain accurate timekeeping when power off. The integrated crystal resonator ensures the accuracy of clock. So this RTC solution should be worth to try.
This module should be used together with EASY plug control board.

Special Note:
The sensor/module is equipped with the RJ11 6P6C interface, compatible with our keyestudio EASY plug Control Board with RJ11 6P6C interface.
If you have the control board of other brands, it is also equipped with the RJ11 6P6C interface but has different internal line sequence, can’t be used compatibly with our sensor/module.


Specification

  • Temperature range: -40℃ to +85℃
  • Timing accuracy: about ± 5ppm
  • Output: 1Hz and 32.768kHz
  • High speed (400kHz), I2C serial bus
  • Supply voltage: 3.3V to 5.5V
  • Output Level: TTL level


Technical Details

  • Dimensions: 38mm*20mm*18mm
  • Weight: 5.4g


Connect It Up

Connect the EASY Plug DS3231 Clock module to control board using an RJ11 cable. Then connect the control board to your PC with a USB cable.
thumb


Upload the Code

Below is an example code. Open or drag below code to Mixly Blocks and upload.

thumb


What You Should See


thumb

Done uploading the code, open the serial monitor and set the baud rate to 9600, you should be able to see the date and the time.
thumb


Resources

https://fs.keyestudio.com/KS0130



Buy from