A RTC (Real Time Clock) module keeps track of the current time.
One of the most used RTC is Maxim’s DS1307 (datasheet) that has an handy I2C serial interface. I chose a module by SparkFun with DS1307 chip, the needed 32KHz crystal and a lithium coin cell battery to keep RTC updated even without external power supply.
LadyAda, starting from Jeelab one, developed a very good Arduino library (RTCLib) for DS1307. The connection is very simple:
- (Arduino) PIN 5V -> (RTC) PIN 5V
- (Arduino) PIN GND -> (RTC) PIN GND
- (Arduino) PIN A4 -> (RTC) PIN SDA
- (Arduino) PIN A5 -> (RTC) PIN SCL
With 74141, you need 4 digital PINs for each Nixie tube: the Arduino I chose hasn’t enough I/O PINs. There are some integrated circuits, called I/O expander, that allow you to expand the number of pins using a communication bus.
The PCF8575 IC (datasheet) offers 16 I/O PINs and an I2C interface: with the same 2 PINs you use to communicate with the RTC chip, you can also drive 16 outputs connected to 4 Nixie drivers.
This IC is available in SOIC package; I soldered it on a SOIC->DIP adapter to make tests easier:
Finally I connected the two modules on a breadboard:
In the next page, I’m going to show you some Arduino sketches…