Posts from: December '16
If you're following my blog, you must have noticed that I like writing about ideas and projects which I develop from the drawing board to the finished product. This is a similar story, but this time it's about a real thing on the market, and this post is a behind-the-scenes of its creation. So - let's dive in!
It all started from a thread in HardwareBG. I was a huge fan of the nixie tubes even before that:
These indicators were manufactured in huge quantities during the sixties and seventies, until LEDs made them obsolete shortly after. In this post you'll understand part of the reasons for that.
Determined to make my own nixie clock, I joined forces with other similar-minded people, went to a local electronics shop which happened to have 4 tubes Mullard ZM1080 in stock and bought them.
At first glance, the nixie tube is a glass bulb, which contains about ten naked conductors; the impression from a working one is somewhere in-between an incandescent light bulb and a neon sign. Its Bulgarian name - "gas discharge indicators" - hint at their true nature: the air from the bulb is drawn out (like in a vacuum tube), and there's partial pressure of neon (and other helping gasses). The voltage between the terminals is too low to cause the familiar luminescence and you get glow discharge in characteristic yellow-amber colour, surrounding the negative cathodeBTW, a luminescent tube that has run its course and no longer emits light will have the same tell-tale yellowish glow near the ends. (in this case we have 10 cathodes: naked wires, shaped like digits). The similarity with incandescent bulb is illusory - the nixie tubes don't emit any significant heat.
Besides the cathodes, the bulb contains a single anode (a positively-charged eclosing grid, which needs to be 160-180 volts more positive than the cathodes). In order to display a specific digit, you need to connect the anode to a high-voltage supply, and ground the respecitve cathode. If the high-voltage supply is just right, you'll get a pleasant lit digit:
In practice it's necessary to limit the current through the nixie tube, as otherwise it may burn out. This necessitates the 10k resistors you'll see in the schematics below. Gather 6 nixie tubes in a row, and you can make a digital nixie clock.
The need to provide high voltage is a mild nuisanceand probably №1 reason for the downfall of the technology, which takes some googling to resolve. I found out how to make a HV supply out of a 555, MOSFET and an inductor, and after soldering it I went on to think how to multiplex the nixie display.
What does multiplexing mean in this case? (advanced readers: you may skip the following explanations)
If two computers needed to communicate, and for some reason only light signalling was available, that wouldn't be much of a problem. One of them would have a light emitter, e.g. a LED, and the other would posses a light detector, e.g. a photodiode. With the use of a suitable serial interface that blinks the LED, the communication is all set. However, if a computer needs to communicate with a human ... nooo, a single LED is far from sufficient. You'd need tens and hundreds of light-emitting elements, of various shapes and arrangements... you, dear reader, are probably seeing these words displayed on an arrangement of such kind having at least half a million pixels.
And the problem is that when a computer processor needs to command a complex of light-emitting elements, their large number always complicates the design. Let's visualize this with 6 nixie tubes:
What we have here is a microcontroller with 60 commandable "grounding" pins (open drain outputs). We can light up any digit on any lamp.
There a couple of issues with that design, the smaller of them being that we'd need a MCU with at least 60 pins and 60 PCB traces, which would be a pain to route. The bigger issue is that such a MCU doesn't exist because of the high-voltage tolerance requirement - most MCUs these days employ low-voltage semiconductor processes, and can rarely withstand more than 20 volts, and most commonly the limit is even lower at 5.5V. And we're dealing with 160V... If you wired a normal MCU here, it would blow up immediately.
This necessitates the use of HV-capable transistors (e.g., BS108), which you command via TTL outputs of the MCU:
Now that's one ugly schematic: the number of PCB traces increased threefold, and just placing the transistors would require soldering 180 joints. Including the MCU and nixie tubes that's more than 300. Soldering such a PCB would be an incredibly dull and cumbersome deal.
To our rescue we can notice that the scheme above grants a lot of freedom on which digits we can light up, and most of that isn't terribly useful. For example, we can light both cathodes "2" and "6" in a single nixie tube, which would work, but would just look ... strange. What we really want from one indicator is to show any of the digits 0-9, or nothing at all. These 11 options can be conveniently encoded into 4 bits, which are decoded by a specialized IC like 74141:
74141 is a really useful chipthis is hardly surprising: it has been created specifically to drive nixie tubes: the four inputs (labeled A, B, C, D) accept a binary number between 0 and 15. Each of the ten outputs (Q0-Q9) is the open collector of a high-voltage transistor inside. If you choose a number in 0..9 (e.g., you put 5 volts on C, and 0 volts on A, B, and D), the decoder will interpret the number ("4") and connect the respective output ("Q4") to ground. Input codes 10-15 are interpreted as empty - the nixie tube is unlit.
Using 6 pcs of 74141 (or their Soviet counterparts, К155ИД1), the number of solder joints decreases to 198 in total, the MCU needs only 24 I/O pins and the design looks more approproate. We haven't multiplexed anything yet, though.
Let's divide the nixie tubes into two groups of 3: odd and even. We'll put a diverting element on the anodes, which commands which group is active:
If the switch S1 lets the HV supply to the odd group only, we have a complete control over lamps #1, 3 and 5: the decoders command the cathodes of lamps 1+2, 3+4 and 5+6, respectively, but the even-numbered won't lit up as they lack anode voltage. If we want to show "18:33:40" on the display, we send "1", "3" and "4" to the decoders and the actual display would be "1_:3_:4_".
After that we switch S1 to supply the even group and simultaneously send "8", "3" and "0" to the decoders: the display would show "_8:_3:_0":
As you can see, if you switch between the two options fast enough, a human won't notice the flicker and would assume the display shows "18:33:40" with half of the normal brightness.
In fact, we can multiplex even more! 6 can be divided by 3:
Of course we can do a full multiplexing, too:
Are there any in drawbacks here? For one, the brightness diminishes: at full multiplexing it is just one-sixth of the nominal. Of course, we can compensate that by increasing the nixie tube voltage, but this puts the nixies into tougher operationThe nixie tubes aren't eternal (yet another reason for their demise), because in their normal operation, a small amount of the cathode material is sputtered and deposits on the nearby surfaces. If you aim for longer service life, it's advisable to run them on the lowest voltage possible..
Another issue is that whatever you gain by simplifying the low-side drivers (at the cathodes) you lose back by complicating the high-side drivers (at the anodes). It's actually worse, since the switch S1 requires discrete transistors - two per group - there isn't a convenient IC like 74141 for the high-side drive. A balance has to be made; look at this comparison table:
The 2x3 and 3x2 options seemed the best. To help me decide between the two I knocked up a quick prototype to check what % duty cycle looks OK as brightness when the lamps are supplied with 160 volts. Here's how it looked like:
In the end I chose the 2x3 scheme: 50% max brightness and three decoders were required in total.
So after that I was ready to transfer the high-voltage supply and the commanding logic to a PCBstarting with the first prototype this time, as it would have been unwise to use perfboards, considering the dangerous high voltageswell, the inconvenience of that approach is that several takes are needed in order to get all the details right and figure out all the bugs.
This was the first revision (v1.00):
As I wanted the PCBs to be compact, I used the "two-storey" design from the battery level meter. The bottom PCB holds the HV circuit, the MCU, buttons and the timer chip. The top board has the nixie tubes, the decoders and the odd/even switch (S1).
I was also quickly introduced to the struggle of finding nixie tubes: I had 4 pcs only. For a complete clock you need six; luckily, Private from the HardwareBG boards had some, and practically gave away 2 of them so the set was completed:
Try guessing which ones are Private's :)
v1.00 was soon abandoned, as I definitely haven't provisioned enough space between the pairs of bulbs. I also bought these russian guys:
The prolem here was that their pins were at the bottom, while the display part was at the top; i.e., they required to be mounted on a vertical piece of PCB, in order to be compatible with the ZM1080 design. The solution was to place them on a small slotket boards, like this:
The main board has holes for both the ZM1080, as well as a 12-pin connector to the slotkets:
Let's see whether that works:
Up next was to put something to act as the colons separating the pairs of digits. There are some glim bulbs specially made for that, but I was able to find these: MTX-90. They aren't meant to be used for indication (they are a semiconductor device), but had pretty much the same colour and intensity, and the size was good, so I added them here:
During this time, the PCBs went through two revisions: 1.01 had a bunch of fixes to bugs, improper element layouts and pinouts... v1.02 saw the PCBs enlarged to their proper dimensions and the capability to host both types of nixie tubes. Revision 1.03 carried only minor fixes.
The bottom board also had a lot going on:
- I made the timing function of the clock based on DS1307 (carrying on my experience with the DS1302). Just like the case with the plant grow light, I wanted to abstain from timekeeping in the MCU - I wanted the external chip to handle it, and keep the correct time if the main power went out. This time the backup power was provided by a lithium coin cell:
- Three tactile switches are used to set the clock and toggle between various display settings:
- I wanted to have the temperature and humidity measurements, just like those chinese home clocks. The temperature is easy, I could have used a thermistor, I had the code ready. Humidity is more difficult. After some research I found out the cheap chinese sensors, DHT-22, which had suitable specs - at least on paper:
- I implemented various schemes which should, at least in theory, prolong the life of the nixie tubes. One of them is the "screensaver" function. The display only needs to be lit when you're looking at it - otherwise, after 10 minutes of idle it automatically turns off. To wake it up you can just clap hands, and a sound detector would pick it upInitially I used a µA741 op-amp, since this was my jelly-bean amp I had stocked (judging from its legendary history). Only later did I found why the Rail-to-Rail I/O features of modern op-amps are that important. Since I already had laid out the circuit for a 741, I substituted a pin-compatible modern equivalent, MCP601.The pot commands the sensitivity.:
Alas, the functionality of the clock was there. Next task was making it more safe. Even though the two PCBs were just fine laid out one above the other, the design is not solid and also exposes a bunch of wires and conductors that carry the high voltage, so it was unsafe. Instead of looking for a suitably sized box and later on wondering how to cut the necessary holes, the isolation was achieved with suitably cut acryllic sheets:
My first idea was to use steel fasteners between the four surfaces, as shown above. What I didn't like was how the shiny metal contrasted with the otherwise black design, so I tried oxidizing them with acid to turn them black. However, the resulting effect (as above) wasn't looking too good, as it was more like genuine rust, and not really black:
Plan B: let's put a simple stud, affix it with several nuts at the end, and hide it behind plastic round spacers. Sadly, I needed some oddly uncommon lengths, and the only supplier that had them in white:
This worked, but I still wanted black and turned to ebay. There I found a length of black nylon tubing with the suitable inner diameter. You just need to cut it to lengths required. The spacers fabricated in this manner had two tell-tale signs of their origin: the labels, and the inherent curvature. And while the label paint is soluble in alcohol, straightening the pieces is all but impossible. Try finding it here:
The cutting of studs and spacers was an arduous and boring job:
Thus I finally made two complete clocks: one per each nixie tube type. As I suspected others could want to solder one themselves using the same design, we (including the colleagues) decided to create a soldering kit.
The first job was to accumulate some more serious quantities of nixie tubes and 74141 decoders, as they are no longer manufactured and are rare finds (new old stock). Their prices also fluctuate quite a bit. Looking through dozens of online shops, local offers, repair forums and various bulgarian and russian websites, at some point I had more than 100 nixies of various types and state:
The decoders proved more difficult to find, but luckily I was able to find a guy from Bulgaria, which apparently had some amount stocked; even better, the ones he had were practically new:
As both the nixie tubes and the 74141s are very old and, for that reason, unreliable, I had to devise a way to test them en masse. For the lamps I just repurposed the HV board from the first prototype, added an aligator clip for the anode and a DMM probe for the cathodes. With that arrangement you can quickly test all digits.
The decoders were more complicated and I made the following contraption:
It's a very simple scheme which is powered through the button and quickly tests out all outputs of the decoder.
Statistics from the tests was that most NOS components (miraclously) worked. The defective lamps tended to be completely gone, I haven't yet met a partially working one. The decoders are the reverse, and the bad ones tended to have only one faulty output, while the others worked fine. But in the end they also went to the trash bin.
The huge assortiment of elements of various sources led me to categorize and bin them into the following boxes:
Up next was packaging. The soldering kit isn't very big and after some short search through my computer junkyard I was able to find the following suitable box from a video card:
I measured its dimensions and went to a cardboard box manufacturer, where we had to find a template with similar dimensions. In theory, they can create a template speicifcally tailored to your requirements. But that was an expensive deal, so we went to choose a template that some other client had used for his own boxes and was quite similar to ours. The cardboard is cut there and you get a pack of 50-100 unfolded sheets:
which you need to fold afterwards into boxes. Here's how a populated box looks like:
Packaging the insides wasn't anything hard, as only the nixie tubes require special care, in the form of cardboard or bubble-wrap. For the resistors, transistors and the like, we used just some regular zip-lock slipswhich, like any other thing that's polluting the crap out of the environment, are absurdly cheap: you get 100 pcs for about a beer's worth. The last thing was to figure out how to place ICs and sockets. When you get them from the electronic shop, they pack them in a tube, or a on a styrofoam pad. It turns out that Dynacord (an audio systems suppler) has some styrofoam sheets which they sell by the square meter and is quite cheap (it's used for soundproofing though, so our purpose is totally different). The big sheets are easily cut with an office knife into the smaller pads that were required.
After a while I became highly proficient in "aligning the Tetris", wasting less and less amounts of the material:
And thus the first bigger batch was manufactured:
As the production grew, it became harder and harder to keep track of all items, so, to that end (and to help us with the other products as well) I created a small internal system to account it all and automate generation of PDFs with barcodes and delivery-and-acceptance forms:
Up next was getting some well written documentation - an integral part of any "solder it yourself" kit. The long doc was heavily helped with corrections and clarifications by Alex, and thus the Assembly and User Manual was born.
Release was drawing near and I engaged in making a small webpage, showcasing the product, and I needed some promo materials. I didn't have much experience in product photography, but after some reading I knocked up a lightbox from spare sheets I had lying around and now I had the beautiful white background:
An important aspect here is the lighting. The CFLs emit a cool daylight, 6500K. This contrasts a lot with the normal warm-white 2700K lights I had everywhere else in the apartment; however when you apply the white balance for 2700K, the colour of the nixie cathodes turns into an unpleasant cold and violet hue.
With the pictures ready, I went on to see how those big, flashy full-screen websites are made (yes, the appearance is key here). Turns out that is simple - using Supersized I created a minimalistic page to showcase the product.
Up next was distribution and sales. To that end, our friends from Robotev jumped in, we agreed on terms and prices, I brought one batch to their office and the product entered their catalogue. We were up to wait for the first sales.
In order to prop up the popularity of this otherwise unknown product, I did two things; first of them being to spend my Google AdWords credit I was given as a present years ago.
While it is trivial to make a Google Ads campaign, targeting the right customers is tricky. If your keywords are the reasonably specific ones (nixie clock, gas-discharge lamps, nixie clock), then the visitors are really a tiny trickle.
Google was offering the keyword "clock", all by itself. I followed that advice, but it turned out to be a bad one - this stole away from the huge traffic of people looking for wrist watches. In that case, people were just not looking for this, and although the impressions increased a lot, the click-through rate fell dramatically. Soon I abandoned the campaign, it was definitely not heling.
The other thing which proved more successful is to give one demonstrational clock for display in Robotev's office. Do you remember the nice ZM1080 nixie tubes from the first prototype? Well, they ended up here:
Even though most of our clients wanted to solder the kits themselves, it turned out there's some interest into ready-made ones. I went to the packaging company again to look for bigger boxes:
The white colour of the boxes made it possible to create larger and flashier labels:
To support the product (on a tip from Robotev) I put up a forum. Also, I continued to try new elements and ideas. Here's one clock I crafted specifically for the round anniversary of a good friend of mine, this time using the ИНС-1 indicators for colon separators:
And another one, which I used to experiment with a different colour scheme:
What did I learn:
- Supply chains! Even though the product is not complicated, the assembly of a single kit requires sourcing elements and materials from 14 different suppliers, and that doesn't even include the New Old Stock parts. If you consider them as well, the count is usually 17, and the NOS items were the hardest to source, as we've dealed with 27 different places to get them. If a fire was to burn our warehouse to the ground, I would need to go to/speak with 17 different entities in order to get even a single new kit done. And this, of course, is only level one. God only knows how many suppliers does our main electronics distributor (Comet Electronics) have; I bet each of the four transistor types used in the kit is manufactured in a different place. And you get this for a humble bookshelf clock. I can only imagine what the supply chain of an auto manufacturer is like ...;
- Prepare instructions for the idiots, especially if the idiot may be you :) I thanked myself at least ten times that I had written the Nixie Clock Packer's Guide right at the start (it describes the process of assembling a single Nixie Kit step-by-step). This is just a wall of details, which happens to always end up in the short-term memory :);
- Simplifying the manufacture. At some point I got fed up of cutting studs and nylon tubes, and changed the spacing between the PCBs just so that I can use standard spacers. Other changes were in, too: in v1.03 the kit included 4 resistors 10K, ⅛W and 6 pcs ¼W. Why... ? I'm not really sure. That were the engineering requirements. In v1.04 all of them are ¼W;
- Foolproofness can help in unexpected ways... I hold the belief that each device powered by a coaxial DC connector should include some form of reverse polarity protection. In the Nixie clock that is a schottky diode. Simple. But works.
I had assembled a demo clock for our office, up until one day the colleague tells me - "our office clock doesn't work - it lights up, but doesn't display time and instead spits out an incomprehensible babble". Astonished, I went to check up on it (it worked days ago), and just to be sure I connected it to the bench power supply. It suddenly worked as expected. The thing was that the old wall-wart was needed somewhere else, and my colleague inadvertently substituted a bulkier AC wall-wart; and thanks to the bypass capacitor and the diode, that formed a crude rectifier, but, apparently, not good enough for stable operation...;
- Price! As a guy of engineering background, I am always annoyed by products that were evidently cost-cut to the point they lack important features. See my previous post about the combo audio port for example.
The sad truth is that the price has an enormous effect on the customers. We know, since we experimented with the price of the kits, and the different discounts were met with immediate reactions. Another fact is that I believe a lot of people wouldn't go through the hassle of DIY soldering the kits, and would prefer ready-made devices, but bought the kits just because they're cheaper!
- The people that want DIY are a minority :( The main goal of having the kits offered was to give the customers the absolute freedom in styling their contraption in unique and creative ways. As far as I know, most people didn't do anything like that and instead punctually follow the instructions. We only received this variant:
- The devil's in the details The saying is very true, and getting all the details just right is really hard, as you can only think of so many of them. In 9 of 10 cases when people don't buy a product, it is because they don't like a particular detail, but won't tell you that (this applies to basically everything in the world). In the rest 10% you get lucky and you get feedback. Citing one example: did you notice the pink isolation rings that separate the cathodes/digits of the ИН-12 nixies? Turns out there are different batches of otherwise identical lamps, and on some of them the rings are white. Our client had recieved his nixies in a mix of both types. The appearance is otherwise identical in their main function... but here's one detail, which I would never, never notice. Clients are very important :)
- We need to find a way to export this kit from Bulgaria, since the market for these very geekish products here is very tiny. By the way, if somebody would like to cater for selling these over ebay - please contact me;
- Add a PIR sensor, so the wakeup from the screensaver happens on movement too, not just on loud noise;
- Tranfer the code to AVR, since it's definitely the platform for DIY enthusiasts, and most people have experience (and programmers) for that;
- Throw in a GPS for automatic time sync;
- and much more...
As with any other big project, this one could be expanded more ad infinitum. However, this post got overly long already, so I have to wrap it up. Congrats to all who reached here:) I must pay my HUGE thanks to the dozens of people which helped me to get traction with this project and turn it into reality. I won't enumerate them, the list is long - you guys know who you are! Thanks for helping my dream come true!