Tag Archives: Clock

Arduino Real Time Clock with Temperature Monitor

Hi guys, in one of our previous tutorials, we built a real-time clock with temperature monitor using the DS3231 and the 16×2 LCD display shield. Today, we will build an upgrade to that project by replacing the 16×2 LCD display with an ST7735 based 1.8″ colored TFT display.

Apart from changing the display, we will also upgrade the features of the project by displaying the highest and lowest temperature that has been measured over time. This feature could be useful in scenarios where there is a need to measure the maximum and minimum temperature experienced in a place over a particular time range.

This tutorial is based on the ability and features of the DS3231 RTC module. The DS3231 is a low power RTC chip, it has the ability to keep time with incredible accuracy such that even after power has been disconnected from your project, it can still run for years on a connected coin cell battery. Asides from its ability to accurately keep time, this module also comes with an accurate temperature sensor which will be used to obtain temperature readings during this tutorial.

Arduino Real Time Clock with Temperature Monitor – [Link]

ATtiny85 runs at 0.000011574Hz clock

What is the lowest possible clock frequency at which a microcontroller can still do useful work? Here’s a little project that attempts to explore this weird question. by @ idogendel.com:

ATtiny85 runs at 0.000011574Hz clock – [Link]

RELATED POSTS

Arduino Real Time Clock with DS1302 and Nokia 5110 LCD Display

Hi guys, in one of our previous tutorials, we made a real time clock, using the DS3231 RTC Module and the 1602 LCD display module. For this tutorial, we will be building something similar using the DS1302 RTC module and the Nokia 5110 display module. Unlike the 1602 LCD module which was used in the previous tutorial, the Nokia 5110 LCD module has the ability of displaying customized graphics which will help us display our data with better UX.

Arduino Real Time Clock with DS1302 and Nokia 5110 LCD Display – [Link]

Real Time Clock and Temperature Monitor using DS3231 Module

The DS3231 is a very low power RTC chip, it has the ability to keep time with incredible accuracy such that even after power has been disconnected from your product, it can run for years on a connected coin cell battery. This module has the ability to communicate via I2C or SPI but for this tutorial we will be using the I2C mode for communications between our arduino and the DS3231. The module also comes with a quite accurate temperature sensor which we will be using to get temperature readings. The collected temperature and clock data is then displayed on the 16×2 LCD via the Arduino.

Real Time Clock and Temperature Monitor using DS3231 Module – [Link]

ESP32 NTP OLED clock

@ blog.danman.eu build a OLED display NTP clock and document his process on his blog:

As a first project with my new ESP32 module with OLED display I chose to build OLED clock. I thought I’ll just find some existing code, upload it and it’s done. There are a few such projects for ESP8266 in NodeMCU. So I started with NodeMCU upload.

ESP32 NTP OLED clock – [Link]

Solr: Digital Wrist Watch Calculates time from Sun Position

Time can be calculated using the azimuth of the sun (aka solar time). Based on this idea, Tinkerman has built an unusual project called Solr. The concept is to translate the position of the sun into time presented on a vintage display. This new digital watch is freak enough to work only with a battery and the sun. The battery is needed to power the electronic parts and the sun is needed to calibrate the shadow of a screw with a reference line to calculate the time digitally using a digital compass.

Solr watch in action

The PCB has a white line and all you have to do is to align the shadow of the screw to it. The science behind this project rely on the fact that a change of 1 degree in longitude equals to 4 minutes. So, as the day is passing the orientation you need to follow to make the shadow align with the white line increases and therefore the time can be calculated. HMC5883L ( 3-axis digital magnetometer) is used to determine the orientation. This chunk of code in Solr’s repo makes the method used to calculate the time very clear.

The firmware (written in Arduino C) behind this project has three main tasks:

  1. Calibrating the HMC5883L, and the calibration procedure is explained in the HMC5883L datasheet.
  2. Calculate the time according to the bearing of the circuit.
  3. Display on HP QDSP-6064 display.

HP QDSP-6064 display

The PCB is assembled using the assembling service (PCBA) from Seeedstudio and designed using Eagle CAD. You can download the source files from here.

 

RELATED POSTS

Wooden Digital Clock is controlled over WiFi

androkavo @ instructables.com build a nice looking wooden clock that is able to show time, temperature, humidity and also it has alarm. The clock is controlled through your web browser using wifi connectivity and it also has a vibration sensor to stop the alarm.

Wooden Digital Clock is controlled over WiFi – [Link]

CMOS-TTL QUADRATURE ENCODER USING LS7084

The quadrature LS7084 Module is a CMOS quadrature clock converter. Quadrature clocks derived from optical or magnetic encoders, when applied to the A and B inputs of the LS7084 are converted to strings of a Clock and an Up/down direction control. These outputs can be interfaced directly with standard Up/Down counters for direction and position sensing of the encoder.

Features

  • Supply 5V DC
  • +4.5V to +10V operation (VDD – VSS)
  • On Board Power LED
  • J1 Encoder pulse multiplication ( Jumper JL Close =1X, Jumper JH Close = X4)
  • Header Connector for Encoder Interface
  • X1 and X4 mode selection
  • Programmable output clock pulse width
  • On-chip filtering of inputs for optical or magnetic encoder applications.
  • TTL and CMOS compatible I/Os
  • Up to 16MHz output clock frequency

CMOS-TTL QUADRATURE ENCODER USING LS7084 – [Link]

RGBdigit clock

by Lucky @ elektormagazine.com build a LED display clock able to display temperature, humidity and air pressure. He writes:

What do you do when you want to design ‘something’ with a vintage or modern display? A clock of course, and this is our first design with RGBDigits: multi-colour 7-segment displays. With a BME280 breakout board attached it will also display temperature, humidity and air pressure. The clock is controlled by an ESP12 module, which makes it possible to synchronise the clock with an internet time server, change the clock settings from any mobile device or computer in the network, or transmit sensor data via Wi-Fi.

RGBdigit clock – [Link]

Making An Arduino I2C Digital Clock

Using Adafruit’s 0.56″ 7-segment LED backpack and display and the DS1307 RTC (Real Time Clock) board, this tutorial will guide you to make a simple 4-digit clock that uses only 2 Arduino pins.

The 7-Segment Backpack is a combination of the LED display, header pins, and a PCB which need to be soldered together. The PCB contains a driver chip with a built in clock that multiplexes the display and constant-current drivers for ultra-bright consistent color.

This module uses I2C interface, which means it needs just two data pins to control the 4 digits instead of 14 pin, freeing up Arduino pins for other usages.

DS1307 is a battery-backed real time clock (RTC) that allows a microcontroller project to keep track of time even if it is reprogrammed, or if the power is lost. DS1307 breakout board also comes as a kit of parts to be soldered.

Building the digital clock

It is a simple process, connect the part as shown in the image, the red wire connected with 5V, black wire with GND, orange to A4 (SDA – data), yellow to A5 (SCL – clock).

Both RTC and 7-segment modules have an Arduino library, as normal with libraries, unzip the folders into your Arduino ‘libraries’ directory and then restart the Arduino IDE for it to pick them up.

Paste the following sketch into a new Arduino window and upload it to your board. It will set the RTC to the time at which the sketch was compiled and uploaded. So, if your computer picks up its time from the Internet, that will be pretty accurate.

#include <Wire.h>
#include "Adafruit_LEDBackpack.h"
#include "Adafruit_GFX.h"
#include "RTClib.h"

RTC_DS1307 RTC;

Adafruit_7segment disp = Adafruit_7segment();

void setup()
{
 Wire.begin();
 RTC.begin();
 if (! RTC.isrunning())
 {
   RTC.adjust(DateTime(__DATE__, __TIME__));
 }
 disp.begin(0x70);
}

void loop()
{
 disp.print(getDecimalTime());
 disp.drawColon(true);
 disp.writeDisplay();
 delay(500);
 disp.drawColon(false);
 disp.writeDisplay();
 delay(500);
}

int getDecimalTime()
{
 DateTime now = RTC.now();
 int decimalTime = now.hour() * 100 + now.minute();
 return decimalTime;
}

The full documentation of the project is reachable here.