/Projects/Warm Tube Clock v1 - Nixie Clock

This clock is designed to be easy-to-build, with all usual parts - except the tubes of course, and modular - meaning you can put any kind of Nixie tube on the top "shield" board and completely redesign it's look. If you don't fancy Nixie tubes (looser!), you can multiplex other kind of display.
Clock works at voltages from 7.5V to about 14V and consumes around 200mA. The PCBs are 10cm x 3cm, so pretty small. Beware that it generates high voltages of around 200V so don't touch anything while it is operating. It shocked me few times and I dropped the clock on the table (no damage done to me or the clock).

in16b

The shield board has 4 RGB LEDs under the Nixies that can be turned off if you don't like how it looks. It shows time, full date and temperature. There is also a "candle mode" in which all four tubes lit up and simulate the flickering of candles. This looks pretty cool in dark room and you can even put it on the dining table for a bit of romance.

All project files are available for download by clicking on the red download button below (open source hardware).

UPDATE: Project is on Hack-a-Day, ...and now also on HackedGadgets, and on TubeClockDB, whoho :-) !

UPDATE 6/2/2011: New version of project!

main2

main4

So here are the clock's options:

1. time display
2. date display
3. temperature display
4. configurable times of showing for all of above (for example, the clock can display time for 20 seconds, and move to next thing to display: date, temperature or both and go back to time. It can even be set to display only the temperature)
5. configurable Nixie tube brightness
6. configurable color of bottom RGB LEDs that blink at 1/2 Hz rate (or even turned off)
7. the "temperature color blender" option that displays blue color at lower temperatures, red at high temperatures and mixes these two colors between these extremes (or even turned off)
8. configurable color of bottom RGB LEDs while displaying date (or even turned off)
9. fading tubes while showing the date for better understanding of what is on display (DD.MM and YYYY)
10. Nixie tube saver option - this option turns off Nixie tubes at defined "sleep" time and turns them back on at defined "wakeup" time (for example, the clock can be configured to shutdown at 23:30 and turn back on at 07:30 in the morning) in order to prolong the life of tubes
11. alarm function with user-configurable melody with snooze function
12. user configurable snooze length with automatic snoozing so that the clock doesn't ring constantly forever if forgotten about
13. Nixie tube cross-fading with configurable fade speed
14. the famous "candle mode" for the romantic "touch"
15. cathode anti-poisoning on every 15 minutes

in8e

Few notes about the design

After seeing a few RGB LED projects around the web with the TLC5940 IC I decided to give it a try by using it to multiplex the Nixie tubes and drive RGB LEDs at the same time. I chose the SMD version TLC59401 and after some trial an error I managed to make it work, and it works great. The interrupt routine inside AVR sends new data to TLC59401 in a configurable periods of time (refresh rate). This rate is different for each model of Nixie tube, so for IN-16 tubes slower rate is required than it is for the IN-8 tubes. Advantage of using the TLC IC to multiplex Nixies is that it is possible to adjust each Nixie tube with a different brightness quite easily.
The power booster is just like the one used in the Ice Tube clock but with feedback option (I can safely say that this clock is pretty much inspired by the cool Ice Tube clock). The AVR has no clue of what duty cycle it must set for the PWM output to generate the required voltage, so it reads back the voltage produced on the HV output and increments the duty cycle until required voltage is produced. This way the value of coil in booster circuit is not firmly defined.

Power supply unit (5V)

psu

main3

The power supply unit has a self-resettable fuse that will cut the power if things get freaky and restore the power once it cools down. The PSU has three outputs +9V, +5V/1 and +5V. The +9V is used in HV voltage booster section and is actually whatever you supply the clock with (from the power source), the +5V/1 is used to power everything on-board except the AVR. The AVR is powered by +5V source which is battery backed-up, meaning that when power gets lost the AVR will continue working on 3V button cell battery. These two "separated" 5V power supplies are done by using three 1N5817 high-speed diodes.

HV voltage booster

booster

in8c

This circuit is a basic boost converter (step-up converter) device just like the one you've read about here http://en.wikipedia.org/wiki/Boost_converter. The coil used in this circuit is 1200uH (any value around 1000-1200uH can be used) from Coilcraft. The PWM frequency used for booster MOSFET switching is 31.250 kHz with different duty cycles for different output voltages. The high voltage builds up in the storage capacitor C13 and is being measured by AVR through the voltage divider circuit formed by R3 and R4. Nixie tubes get their needed high voltage (the current actually) through a current limiting resistor R5 and they are protected with Zener diode ZD1 200V. The high voltage is further being filtered with capacitor C14 which is actually not mandatory (I never soldered it and the clock works like clockwork). The Zener diode is optional but it is recommended. Any generated voltage higher than ZD1 voltage (200V) will be spent on resistor R5 which will cause it to heat up. If the clock can't produce required voltage upon startup, it will report this by beeping and blinking all LEDs in red color and will stop working (go to sleep). However if it produces over-voltage, it will reduce the voltage to below requested value and report this by blinking all LEDs in orange color, but the clock will continue working. To fix this, another power source with slightly different voltage usually does the trick. If that doesn't work out, another coil should be used.

Nixie cathode driver

cathodedriver

Nixie tubes that show digits have 10 or 11 cathodes for all numbers 0-9 and an optional dot. To save pins on the AVR, a BCD decoder is used. This is not an ordinary BCD decoder because it can withstand high voltages used to power the Nixies. This driver is IC2 K155ID1 which is a 74141 equivalent. It has 10 outputs for 4 BCD inputs. Between two middle Nixies on the top board there are two "colon" neon bulbs (small Nixies) also working on high voltage. These two are "driven" by two NPN high voltage transistors T1 and T2 MPSA42.

Beeper and temperature sensor

beeptemp

1002871

The beeper is a small speaker just like in your PC's mainboard. A piezo speaker can also be used here, but the sound will not be as fuzzy as it is with PC speaker. It is driven with a BC547 NPN transistor and volume is adjusted with R10 resistor. The sound is produced on AVR's pin PB1 (OC1A) by software - not hardware PWM. The alarm sound melody is user-adjustable in wt.h header file.
The temperature sensor is Maxim-IC DS18S20 and is directly connected to AVR's appropriate pin. The 1-wire library used in this project is not interrupt-safe, meaning that the 1-wire data transmission will be interrupted sometimes by ISR routines and will produce invalid temperature readings (00.5 degrees). This can be fixed in the source-code by disabling interrupts in certain parts of the source-code. This, however, I didn't do since it can produce display flickering during temperature readings.
Both the beeper and temperature sensor are supplied by IC2 7805 stabilizer and do not consume any power from the backup battery.

ISP port and buttons/switch

ispbuttons

in8d

The clock is controlled with just two buttons and a switch. Switch is used to turn on/off the alarm. The buttons are used to request the temperature and date to be shown, enter the settings menu or activate the "candle mode".
The clock can be (re)programmed without taking out the AVR chip with this standard ISP port. Before programming, make sure that the switch SWALARM is turned off (disconnect state). Also make sure to disconnect the programming cable from the ISP connector after programming, or display flickering and "ghosting" effect can be seen on Nixie tubes while clock is working.

ATMEL AVR brain

mcu

main1

The brain of the clock is ATmega328P AVR microcontroller (the datasheet says it works at low voltages as 1.8V, and this is great because it must continue working on 3V backup battery). The important thing to notice here is the external crystal of 32.768 kHz that is used to clock the internal Timer1. That timer is set with a prescaler of 128 so that it generates interrupt once per every second and that is used for internal RTC. For some reason the AVR doesn't interrupt on every second, but slightly faster (not ideal). So, the capacitors C2 and C3 around the crystal should be adjusted for the smallest error, meaning you should put a variable capacitors here, or experiment with these values to get best (near to ideal) results. You can also use ATmega168 if you strip the source code to bare minimum (not using A/D feedback voltage measurement, and commenting out the "temperature color blender code" would be a good start). Another thing to notice here is the CLKO output of the AVR. Yes, this output is used to export AVR's internal clock signal and is used to clock the TLC59401 on the upper "Nixie shield" board.

Nixie anode & RGB LED driver

tlc59401

in8g

The anode driver for Nixie tubes is made with NPN optocouplers OPT1..OPT4 TLP627. These optocouplers can withstand "Vce" voltages of more than 200V which is required. They are used in "common collector" configuration aka emiter follower / voltage follower because Nixie tubes don't draw much current and this seams efficient. I have seen this kind of usage of NPN optocouplers in other Nixie tube clocks and it works like a charm. When Nixie tubes are displaying numbers, these optocouplers are being switched in high speed providing anode voltage to one Nixie tube at a time. That is called multiplexing. They are switched by the Texas Instrument's excellent IC TLC59401 and on it's remaining 12 outputs (16 in total) there are 4 RGB LEDs with common anode. The interrupt routine in the AVR refreshes the TLC59401 IC all the time thus sending new data to all LEDs and all optocouplers. Driving the TLC59401 IC is pretty easy once you figure out how. There are 7 inputs that require our attention; GSCLK pin - this pin needs to be provided with a constant clock; BLANK pin - on every 4096 impulses of the GSCLK signal it requires a small impulse that will reset it's internal counter; XLAT pin - this pin has to be triggered whenever new data is clocked in (this is done together with the BLANK pin); MODE pin - this tells the IC if the incoming data is Data or Command; SCLK, SIN pins are for sending data over SPI bus. The important thing to note about the TLC59401 is that you must solder the bottom pad to GND. If you fail to do that, the chip will not work properly or at all!

Nixies

nixies

in8a

in16c

shields

On the upper board (the Nixie shield) there are four Nixie tubes and there are two shield designs for two different Nixie tubes: IN-16 (smaller in size but much more beautiful) and IN-8 (medium sized). Between two middle tubes there are two "dots" or "colons" which are controlled individually so when showing the temperature only upper "dot" is lit, and when showing the date only bottom "dot" is lit. These "dots" are actually a very tiny neon indicator bulbs that you can find in wall sockets, indicator lamps or voltage testers. Luckily they glow in the exact same color as Nixies. Cathodes of all Nixies are connected to the outputs of K155ID1 (74141) and cathodes of "dots" are connected to two NPN transistors MPSA42.

Alarm test and "menu" presentation


Changing some settings on the clock


Introduction and overview of the clock


Nixie Digits - Cross Fading Example


See more images on Flickr

Author (sent by): Trax

Download counter: 40,432

Rating: (2.97, votes 4831)

Vote:

Date: 17-11-2010

Lokalna verzija ove stranice: Warm tube clock v1 - Nixie sat

786_warmtubeclock.rar

Bookmark and Share Comments (61)

comment [21]

Thanks for the reply. I am really an amateur at coding...actually REALLY an amateur...lol...I have assembled your clock design and flashed the micro and just realized it was a 24 hour clock. I looked at the code and it seemed a little over my head. I was thinking that one of the colons could indicate PM but would require modification that is beyond my skill level. Perhaps I could commission you to modify the code to add a menu item setting to 12 or 24 hour mode if you be so kind? I know of more people h
IP: 24.231.144.250

comment [20]

Not much, just some IFs have to be changed, where the value is checked for 24 overflow has to be changed to 12, and things like that.
IP: n/a

comment [19]

It appears the clock is a 24 hour design. Can it be changed to a 12 hour clock? What changes to the firmware would be necessary? Any information appreciated.
IP: 24.231.144.250

comment [18]

Nisam napravio sat nego diferencijalni termometar za solarno grijanje. Dva DS18B20 i prikaz za 3-znamenkastom 7seg display-u koji je multipleksiran. Dok nisam onemogućio interrupt pogriješio je svako cca deseto očitanje temp, zbog čega se nepotrebno palio relay (dosta bitna pogreška za ovakvu primjenu). Nakon što sam pauzirao interrupt niti se treptanje primjetilo, niti je ikad više pogrešno očitao temp.
IP: 93.139.87.33

comment [17]

@Ruslan: hvala za info, probacu cim stignem... :-) kakav si ti sat napravio?
IP: n/a

comment [16]

Prekrasno izgleda, samo jedna ispravka. Kažeš da će display treptati ako onemogućiš interrupt za vrijeme komunikacije sa ds18s20. Iz iskustva znam da neće, jer je vrijeme potrebno da se obavi kritična komunikacija nekoliko ns. I sam sam mislio da će treptati,a kad sam isprobao nema šanse da se to treptanje primjeti! Još jednom svaka čast!
IP: 195.29.242.36

comment [15]

@mbruck, haha - da, ti si zapoceo moje Nixie ludilo! Na prvoj slici su IN-16, a na cetvrtoj su ipak IN-8. Napajanje je skoro pa 200V zato što ih multipleksiram, tako pise u uputstvu kod multipleksiranja - mogu izdrzati veci napon pri tom radu a svijetle normalno.
IP: n/a

comment [14]

Ovo na slikama nisu IN-8 mes'čini... A sve krenulo sa onom jednom što si je dobio od prijatelja iz sunčanog Mostara. :) Iako se nikad nismo upoznali... Mmmm, da ... Zašto napajanje 200V kad je po nekim ruskim uputsvima max. 180V?
IP: n/a

comment [13]

Cijene vidi na: www.batchpcb.com, seeedstudio.com
IP: n/a

comment [12]

Neko je pitao za Nixi u Srbiji.. http://www.guja011.com/nixie.htm Nego, ako nije tajna, koju si kolicinu PCB-a narucio (da ne pitam od koga..) i koliko te kostala cijela isporuka. Pocinjem da se smaram sa izradom istih pa razmisljam da predjem u narucivanje...
IP: 81.93.84.2


Comment page: <1234567>


add comment

name

e-mail (will not be published)

website

How much is = also add letter "a" at the end of your result! Eg.: 7a

Please log-in!

You can log-in on forum link: Login page. After logging-in, return to this page and click refresh in your browser.

site friends

sponsored links

ads