{"id":50,"date":"2011-03-11T01:43:12","date_gmt":"2011-03-11T06:43:12","guid":{"rendered":"http:\/\/ahdesign.us\/blog\/?p=50"},"modified":"2012-01-12T15:27:30","modified_gmt":"2012-01-12T20:27:30","slug":"nixie-clock","status":"publish","type":"post","link":"https:\/\/ahdesign.us\/blog\/nixie-clock\/","title":{"rendered":"Nixie Clock"},"content":{"rendered":"<p>Here&#8217;s my Nixie Clock I designed when I was still in school.\u00a0 Actually, the majority of this design occurred when I was on a coop at a company at RIT.\u00a0 I had little real work to do, so designing this passed the time.\u00a0 I&#8217;ll post more details on this later, but this is the finished project:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"Nixie Tube Clock Project\" src=\"http:\/\/thehoneckers.com\/var\/resizes\/AndyProjects\/nixie_clock\/IMG_6577.jpg?m=1317676606\" alt=\"Nixie Tube Clock Project\" width=\"640\" height=\"411\" \/><\/p>\n<p><object style=\"height: 390px; width: 640px;\" width=\"640\" height=\"390\" classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\" codebase=\"http:\/\/download.macromedia.com\/pub\/shockwave\/cabs\/flash\/swflash.cab#version=6,0,40,0\"><param name=\"allowFullScreen\" value=\"true\" \/><param name=\"allowScriptAccess\" value=\"always\" \/><param name=\"src\" value=\"http:\/\/www.youtube.com\/v\/TT_iOveCOfg?version=3\" \/><param name=\"allowfullscreen\" value=\"true\" \/><param name=\"allowscriptaccess\" value=\"always\" \/><embed style=\"height: 390px; width: 640px;\" width=\"640\" height=\"390\" type=\"application\/x-shockwave-flash\" src=\"http:\/\/www.youtube.com\/v\/TT_iOveCOfg?version=3\" allowFullScreen=\"true\" allowScriptAccess=\"always\" allowfullscreen=\"true\" allowscriptaccess=\"always\" \/><\/object><\/p>\n<p><!--more-->More pics of what it took to get to this state are here: <a href=\"http:\/\/thehoneckers.com\/v\/AndyProjects\/nixie_clock\/\" target=\"_blank\">Nixie Clock Gallery<\/a><\/p>\n<p>The heart of the clock is a Xilinx XC95144 PLD.\u00a0 There isn&#8217;t a single line of software code that runs this clock.\u00a0 Instead, it runs purely in gateware, which was described using VHDL.\u00a0 I really liked VHDL in college and still do, but I don&#8217;t get a chance to use VHDL much at work =(.\u00a0 Anyways, I used the PLD because FPGAs were too expensive at the time, and I wanted a purely hardware based design.\u00a0 An FPGA sorta is purely hardware, but it implements the VHDL hardware description using look up tables (LUTs) in a big block of SRAM whereas the PLD has actual logic gates in it.<\/p>\n<p>The following is a very early prototype of the clock:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone\" title=\"Nixie Tube Clock Prototype\" src=\"http:\/\/thehoneckers.com\/var\/resizes\/AndyProjects\/nixie_clock\/DSCN0504.jpg?m=1317663800\" alt=\"Nixie Tube Clock Prototype\" width=\"640\" height=\"480\" \/><\/p>\n<p>The power supply for the clock is a bit clunky, but it works as I couldn&#8217;t design a switching power supply to save my life at that point in time.\u00a0 Instead, I was able to find some cheap transformers that had dual 120V primaries and dual 12V secondaries. Since the nixie tubes need ~170V to illuminate the element inside them, I put one transformer&#8217;s primaries in parallel to run off 120V and then hooked the 12V secondary to the secondary of the 2nd transformer and wired the second transformer&#8217;s primaries in series, giving me ~240VAC with a 12VAC tap for the clock&#8217;s logic.\u00a0 Once rectified, I had pretty high DC voltage and once I figured out how much current a single tube would consume when it was on (the tubes are on a multiplexed bus, meaning only a single tube is on at a time), I used a resistor to drop the voltage to the Nixie&#8217;s correct working voltage.\u00a0 This ends up working just fine, but it&#8217;s not terribly efficient.<\/p>\n<p>If I were to redo one part of the clock, it would be the power supply.\u00a0 I can build switching power supplies easily now, and making a 120V to 170V boost converter wouldn&#8217;t be tough at all.\u00a0 Or maybe I&#8217;d use a 12V or so to 170V boost&#8230; Some sort of transformer needs to be present to isolate the clock&#8217;s electronics from very high current line voltage.\u00a0 It&#8217;s more of a safety issue than anything, as I found out the hard way =).\u00a0 My first design to create 170VDC from 120VAC utilized diodes to form a voltage doubler.\u00a0 Somehow something go shorted to ground, lights dimmed, flames ensued, and in a flash a chip disintegrated off a circuit board.\u00a0 Only the legs were left (this was a through-hole DIP part).\u00a0 The body was completely gone.\u00a0 I tried again using the same circuit but being more careful, but I quickly learned that 1\/4W resistors and high voltage don&#8217;t mix.\u00a0 It doesn&#8217;t take much current through them at 200+ volts to instantly make them burst into flames.\u00a0 While exciting to watch electronic morph into pieces of garbage, a non-isolated design is dangerous.\u00a0 I have not had any of these problems since using the transformers to boost voltage, and the finished clocks (two of them now) have been running day and night for about 6 years now.<\/p>\n<p>For the tubes themselves, there&#8217;s not enough pins on the PLD I used to drive each one discretely.\u00a0 It probably would have taken up a lot more logic to drive them that way anyways.\u00a0 To solve this, each of the six tubes is on a common bus.\u00a0 To light up an element in the tube, a tube has to be enabled, and then the element is selected.\u00a0 Opto-isolators are used to interface the PLD almost directly with the tubes.\u00a0 The little decimal point dots in the bottoms of the tubes are just the binary representation of a counter inside the PLD.<\/p>\n<p>The only major problem that had to be overcome was element ghosting between tubes since they&#8217;re on a multiplexed bus.\u00a0 Discretely driven tubes do not have this problem.\u00a0 I don&#8217;t remember exactly what the problem is, but I believe it&#8217;s similar in nature to what happens when you energize an inductor (or relay coil, electromagnet&#8230;.etc), and remove power from it.\u00a0 The magnetic field collapses and sends a surge of power, called back EMF, into whatever was supplying the power.\u00a0 With the tubes the effect isn&#8217;t quite as drastic, but it is similar in the sense that when voltage is removed from an element, the charge doesn&#8217;t disappear instantly.\u00a0 It needs to be bled off or else when the next tube is enabled, the charge from another tube&#8217;s element dimly lights up the same element in the next tube.\u00a0 There is probably a more efficient way of fixing this now that I know more about electronics, but at the time, it was easily solved in exactly the same manner as you kill back EMF for relays, coils, &#8230;etc: a reverse-biased diode.\u00a0 When you&#8217;re driving the tube, the diode doesn&#8217;t conduct, but once the driver is turning off and the tube element voltage minus the driving voltage is greater than the diode&#8217;s forward voltage, the reverse-biased diode becomes forward-biased and bleeds off the charge to ground.\u00a0 Unfortunately this means that you need a lot of diodes to prevent ghosting.\u00a0 In my case, I needed 12 diodes per tube (digits 0-9 and two decimal dots) for a total of 72 diodes per clock&#8230;maybe less as the first tube would only be lighting digits 0-2.\u00a0 I don&#8217;t remember if I took that into account or not.\u00a0 I may have been planning to do fancy animations, which would make use of all elements in all the tubes.<\/p>\n<p>Anyways, the timebase of this clock is a Maxim DS32KHZ TCXO (temperature controlled, crystal oscillator).\u00a0 This oscillator runs at 32.768KHz and that drives everything the PLD is doing inside from refreshing the tubes to actually keeping track of seconds.\u00a0 I&#8217;m not syncing this to the 60Hz line voltage or grabbing time sync stuff over the air or from the internet.\u00a0 This part is quite accurate, and it only deviates +\/- 10 or so seconds a year (calculated based on measuring the time difference after a month).\u00a0 This is by far the most accurate, free-running clock in the house.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s my Nixie Clock I designed when I was still in school.\u00a0 Actually, the majority of this design occurred when I was on a coop at a company at RIT.\u00a0 I had little real work to do, so designing this &hellip; <a href=\"https:\/\/ahdesign.us\/blog\/nixie-clock\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"class_list":["post-50","post","type-post","status-publish","format-standard","hentry","category-nixie-clock"],"_links":{"self":[{"href":"https:\/\/ahdesign.us\/blog\/wp-json\/wp\/v2\/posts\/50","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ahdesign.us\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ahdesign.us\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ahdesign.us\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ahdesign.us\/blog\/wp-json\/wp\/v2\/comments?post=50"}],"version-history":[{"count":6,"href":"https:\/\/ahdesign.us\/blog\/wp-json\/wp\/v2\/posts\/50\/revisions"}],"predecessor-version":[{"id":55,"href":"https:\/\/ahdesign.us\/blog\/wp-json\/wp\/v2\/posts\/50\/revisions\/55"}],"wp:attachment":[{"href":"https:\/\/ahdesign.us\/blog\/wp-json\/wp\/v2\/media?parent=50"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ahdesign.us\/blog\/wp-json\/wp\/v2\/categories?post=50"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ahdesign.us\/blog\/wp-json\/wp\/v2\/tags?post=50"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}