Introduction to TM1638 Display Module for Arduino

Pictured below is an electronic display module we have been testing out recently.

TM1638 Arduino Display Module

Available at under £2 including delivery (see here: buy TM1638 module), the pictured device offers 8 LEDs, 8 input buttons, and 8 7-segment LED display digits which can be fully controlled with just 3 pins from your Arduino (or other microcontroller unit).

We are looking at these to offer alternatives to the LCDs (liquid crystal displays) we currently use in our solar water heating pump controllers and low voltage disconnects in particular, since the two sets of 4 digits on these modules’ displays can show a voltage to two decimal places plus other information, or two temperature sensors readings also to two decimal places simultaneously. Seven segment displays are much more readable from a distance, and the availability of 8 LEDs and 8 user input buttons opens up many new possibilities.

Initial results of testing have been very positive. If you are interested in getting started with these modules and Arduino, an excellent starting off point is this excellent article: Arduino and TM1638 LED Display Modules from the Australian site tronixstuff.com. All you need is an Arduino board, the Arduino IDE (the software required to programme your Arduino), and the TM1638 library available here.

DS3231 Real Time Module used as Master Clock

Further to our recent post on using the DS3231 RTC module in situations where extremely accurate long duration timing is required, here is an example of a project we recently completed using this same module.

DS3231 Real Time Clock (RTC) module for Arduino

A Slave Clock is a clock which depends for its accuracy on another clock – the Master Clock. Our client has a Mercer UK slave clock which requires a 12V pulse once every 30 seconds for it to run accurately. He wanted an accuracy better than +/- a few seconds per week. As the DS3231 is accurate to better than 2ppm (parts per million), it will gain or lose no more than one second every six or so days.

DS3231 Real Time Clock (RTC) with Arduino for Mercer Slave Clock time base

Pictured above is the unit we put together coupling a DS3231 module with an Arduino Pro Mini (clone) for the master clock. The Arduino constantly monitors the time from the DS3231, and each time the number of seconds in the time is 00 or 30, a half-second long 12V pulse is output to the slave clock.

Pictured below is one of master clocks fitted into the back of Standard Electric Time Company secondary (or slave) clock.

It is a double faced clock which is destined to hang in a small museum.

If you need any kind of accurate timer, please email neil@reuk.co.uk with details of your requirements.

Accurate DS3231 Real Time Clock as Alternative to DS1307

We have put together a lot of controllers which required a real time clock (RTC) – in particular dataloggers and other timers running over long periods of time which were required to do (or record) operations at specific times through the day consistently over weeks and months.

DS1307 real time clock (RTC) module for Arduino

Pictured above is a DS1307 module. These are available from just £1 including delivery from China/HK via eBay – see here: DS1307 Modules.

With a backup button cell (e.g. CR2032) on the underside of the module, these DS1307 modules will keep time even when disconnected from the main power source for months and even years on end. However, in our experimental projects (using this RTC with an Arduino for dataloggers amongst other things), we have found these DS1307 modules to vary hugely in their time-keeping accuracy – some gaining/losing a few seconds per day, and others gaining/losing as much as 3-5 minutes per day. While they have proved to be very consistent – i.e. a unit which gains 3 minutes per day will gain 3 minutes per day every day – having to test each unit individually over a few days and then modifying the Arduino project code to cancel out errors is not practical.

Some of the error is caused by ambient temperature changes affecting the accuracy of the timing of the crystal resonator. Some more of the error is also caused by the quality of the crystal itself and its attachment to the PCB in these economical modules.

DS3231 Real Time Clock (RTC) module for Arduino

Pictured above is an alternative to the DS1307 which we have found to be far superior in its time keeping accuracy which uses the DS3231. These are now also available on ebay from just £1: see here: DS3231 modules.

In extensive testing we have found the time-keeping of these modules to be excellent. The DS3231 chip on the module is marketed as being accurate to 2ppm (parts per million), which means less than one second lost or gained every 5 to 6 days. The units we have tested thus far have all come in at under 1ppm accuracy, so a couple of seconds at most lost or gained per month.

This accuracy is achieved in part by the incorporation of a temperature sensor in the DS3231 which can compensate for changes in ambient temperature. The measurements from this temperature sensor are also accessible to the user (accurate to +/- 3 Celcius) which makes for a handy extra feature. These DS3231 modules also have 32kb of available EEPROM memory which can be utilised by your projects, and many other useful features.

Click here for a very simple DS3231 introduction  from the Instructables website. If connecting a DS3231 module to an Arduino, you need to install the Arduino DS3231 Library from here which includes quite a detailed manual document to help you get started setting and accessing the stored time and temperature etc from your DS3231 module.

One thing to note is that due to recent changes to air mail postage rules, most of these modules are no longer sent out with a button cell (backup battery) provided (even when the eBay listing has one pictured). You will therefore need to source yourself a CR2025 or CR2032 button cell locally if you have a project necessitating backup for the time keeping.