Thursday, November 21, 2013

Nixie tube clock miscellany

Honestly, one of the reasons behind my latest infatuation with Nixie tube clocks is trying to understand why so many people got so fascinated so quickly and so suddenly with them, although they are not cheap, and although they simply show the time with 4, sometimes 6, digits.

In any case, I'm in the bandwagon now. I designed an Arduinix(TM) variant, based on my previous observations. One of the main differences is that the components sit low on the board, so that a "tube shield" can be plugged on top, similar to akafugu's VFD modular clock. The top "tube shield" can host (at least in theory) up to six IN-2 or four IN-17 (four IN-12 would not fit).




For the "IN-2 tube shield", I downloaded and used the eagle library called "russian-nixies.lbr". Guess what? For the digits to be shown vertically, the IN-2 part needs to be rotated about 45 degrees clockwise. I did not know that until I got my IN-2 tubes. Essentially, the IN-2 tube shield I have is kind-of useless now, unless one uses it for an "artist project" (to quote Pete of PV Electronics, seller of Nixie kits on ebay). That means that the tubes are connected to the PCB with wires, so that they can be placed at artist's fancy. I know Nick is an artist :)

Lesson learned: don't design the PCB until you have all parts in hand.

PS Getting the high voltage (180V) on the new board was just a matter of adjusting the trim pot. No surprises this time.

PS2 Although I did not try it yet, the "Open source Nixie tube shield" sketch should work, with minor modifications, with Arduinix, I reckon.

PS3 Please contact me if you have a need for this PCB or want to buy one.

Wednesday, November 20, 2013

Alarm clock app for iPhone

My young friend Rami left his comfortable and safe permanent job with a solid consulting company to start his own business, mainly writing apps for mobile devices. His first app is "Deep Sleep Alarm" for iPhone, available for download in the App Store.

The app is free, with nice graphics and useful functionality, basically making sure you are not "cheating" when  waking up :)  Please give it a try.



He is currently working on the Android version.
Rami, keep up the great work!

Monday, November 18, 2013

Another Nixie clock

For "unknown" reasons, these days things don't move as fast as they used to. I have a dozen or so unfinished projects on my desk, most of them waiting for parts to arrive. And usually and unfortunately, when I get the long awaited part, something else is missing... or not fitting,... or not working.
Today I was finally able to finish the "Open Source Nixie Tube Shield", for which I pledged $15 on kickstarter in return for the PCB.
Without paying attention to the schematic (was it even published before the campaign ended?), I thought it was just another variation of the same Nixie theme, which it really was. I expected to have all parts on hand already, including the Nixie K155ID1 driver Russian IC. Surprise! Instead, the circuit uses CD4028 decoder plus HV transistors. And that's where the 4 week wait is coming from.

I liked the compactness of the board even before I soldered the almost 100 components. But I was a bit disappointed when I realized the shield had a (minor) flaw: the area above Arduino's USB A connector is as highly populated as the rest, if not more. Not only the metal encasing of the USB connector will short the high voltage components on the shield above, but the shield cannot be even pushed all the way in.
A workaround (which I ended up using) is to have an intermediary shield between Arduino and the Nixie tube shield. Another solution is to use an Arduino variant with the mini B USB, like Seeeduino or Leonardo.

But all's well that ends well. To cut the story short, the sample sketch provided worked just fine without interventions. Hardware-wise, I added a DS1307 RTC (since I was going to build a clock), a buzzer (for alarm and chime) and a Bluetooth module (to set up the time without buttons). The only kludge required was a change in the core file Tone.cpp, where I replaced Timer2 with Timer1.

Below are a few photos. For enclosure, I (again) went for the the poor-man's solution, this time hand-cut (as opposed to laser-cut) transparent acrylic plates. (The long standoffs are 60mm, in case one wants to reproduce the experiment.)


I was happy to "upcycle" my Arduino Duemilanove, with the nice bottom exposed and visible :)
The prototype shield was something that I thought I will never use again, but it came in handy.


I also borrowed an idea from akafugu, with the bigger front plate creating a nice slope.



One thing I skipped (because I don't like the combination) is the blue (or any other color, for that matter) LEDs under the tubes.

A working version of the code is available here. It is based on Tyler's code (timer-based multiplexing of the digits, anti-cathode poisoning etc), with added support for RTC (DS1307) and functionality for setting up the time, alarm time, enabling/disabling alarm etc through Bluetooth (using an Android phone or tablet, for example).
The clock can execute the following commands, sent from BlueTerm (after pairing with the device):

  • TIME=hh:mm - sets the current time (second is set to 0);
  • ALARM TIME=hh:mm - sets the alarm time; the alarm hour and minute are also saved to eeprom (and retrieved from there whenever the clock is powered back on);
  • SHOW ALARM - sends back to BlueTerm the alarm hour and minute
  • ALARM ON - enables the alarm; this is also saved to eeprom; the Alarm On/Off status can be shown with a LED connected to A0;
  • ALARM OFF - disables the alarm;
  • STOP ALARM - turn off the sound after the alarm starts beeping;

Note that all commands must be upper case.

The "Stop alarm" feature is reminiscent of Rami's "Deep Sleep iPhone app" and also of Ramos alarm clock (coincidentally, another Nixie clock, close source though), where both of them are asking for user interaction to stop the sounding alarm. Well, in order to stop this Nixie clock from beeping, one needs to open BlueTerm, pair the devices, then type in "STOP ALARM", a sequence of actions that requires anyone to be pretty much awake.

Monday, October 14, 2013

My experience with the Arduinix Nixie tube shield

This was not an easy project to finish. Anything that could go wrong, it did, due to a rare combination of ambiguous hardware kit design (that's what started it all), and bad luck (software bugs in Arduino IDE 1.0 nevertheless). In the end, I learned a few things, which made me a better person :) :) :)

Please don't take this as a rant, nor as a (negative) review. As usual, the main purpose of the post is to document the experience and eventually help others troubleshoot similar problems they may have with the Arduinix shield kit.

The first issue I had was not getting the high voltage (180V) required by the Nixie tubes. For some reason, the provided schematic and assembly instructions are ambiguous on the exact value of the C3. This made me look at other HV power supplies, with the conclusions captured in this post. Anyone taking a closer look at the Arduinix HV schematic will notice at least 3 differences compared to others using the same 555-based design:

- the very important capacitor C3 has unusually small value (only 47pF, compared to 2.2nF, a much better value, according to the calculations);
- pins 6 and 7 are connected;
- transistor Q5 is shown as PNP (though correctly marked as MPSA42, an NPN transistor).


The assembly instructions, showing 2.2nF for C3, say that the value of this capacitor varies "the most", "as we make slight modifications and improvements to the kit". What improvements in a standard, proven and tested schematic?


What else was there for me to try? Most of the components around the oscillator, of course: the inductance, the resistors, the capacitors. The highest voltage I got was about 80V. So I decided to revert to "the standard". I cut (top side) and re-routed (bottom side, see photo) the PCB traces around pin 6, 7 and R14/16, I replaced C3 with a 2.2nF, and, unsurprisingly, I got the long desired 180V.




Next step was the software. After I uploaded the sample sketch using Arduino 1.0, only 2 digits were lit.
Three hours and a lot of effort and frustration later (even wondering how everybody else got this sketch working), I realized that Arduino 1.0 itself was the problem. Even the simplest test sketch, tried on multiple Arduinos, failed, incredibly, to work!!! (And you can try it and confirm this too.) Here it is:

void setup() 
{
  Serial.begin(9600);
  Serial.println("in setup");
}

void loop()     
{
  Serial.println("in loop");
  delay(1000);
}

Switching to Arduino 1.0.4 solved it. My Arduinix shield is now functional. Making it into a clock is going to take a few more steps though, including hardware (adding RTC, probably by resurrecting Wiseduino+), writing the software (with functionality to set up the time from buttons), and of course, the most challenging of them all, making a proper enclosure.


A few more observations:
- the INS-1 neon lamps are too tall to be used as dots between the IN-17 Nixie tubes;
- it seemed that the little Nixie PCB could be placed at the same level as the Arduino board (and under the shield, as opposed to on top, as it is currently, see the photo above); it has holes that align with those in the original Arduino 2009, but the ICSP connector is in the way though;
- all photos on arduinix gallery show the Nixie board attached to the shield by ribbon cables; I wondered a bit if my solution, using regular headers, was proper;
- this is the cheapest open source Nixie-kit out there.



Saturday, October 5, 2013

High voltage power sources for tubes (Nixie, VFD, Geiger)

Updated June 2, 2017 - added VFD power supply with automatic dimming (#4 in the list below), contributed by Ken

This is a superficial review of the few schematics I encountered while building Nixie clocks, VFD clocks and Geiger counters (no tube amplifier just yet). Although the schematics seemed basic at a glance, they usually ended up being a challenge (that is, they rarely worked right away) for me. That's another reason I am trying to cover them here, so I can use this post as consolidated reference any time I need it.

Tubes require high voltage to work. Some (Vacuum Fluorescent Display) need 40V, others (Nixie) 180-200V, and some others (Geiger) even higher, 400-1000V. The high voltages are generated these days by switching-mode power supplies. Essentially, there is only a handful of popular solutions, and each DIY tube kit picks one of these, based on size, power requirements, cost.

In principle, a switching mode power supply, also known as "boost converter", uses a square wave oscillator ("switch") to create magnetic energy in an inductor, then releasing it as high voltage.
Some scientific explanation (with formulas) can be found here, some practical advice (with schematics and photos) here. Adafruit has a very useful online boost calculator.

1. One of the most popular solution for the square wave oscillator is by using the ubiquitous 555. This is inexpensive, but requires some tweaking and adjusting (values of resistors and capacitors). The schematic is standard, but there seem to be a few variations.
The one below is from Ronald Dekker.


Frank clock (from Pete's Nixie kits) uses an almost identical schematic, but a different set of values for R2-R3- C4 (used for setting the frequency). In the end, the oscillator frequency is about the same at approx 30kHz, calculated with formula  f = 1/0.693/C4/(R3+2R2)  (in the schematic below).


Same 555 is used in Arduinix, but in a different configuration, although still as astable oscillator. This one has an extra HV capacitor (C4) in series with a resistor (R15), whose exact purpose I don't understand. The oscillation frequency is also weird, according to the above formula, with C3 at 47pF, should be 1.5kHz. No wonder this did not work for me.


Another almost identical HV power supply for Nixie tubes is used in the recently-kickstarted "Nixie tube shield" (for which I pledged $15 for the PCB, and yet to receive it).


And finally, 555 is also used to generate the higher voltages required by Geiger tubes, as used by BroHogan (and MightyOhm). The frequency of oscillation is 4.5kHz (f = 1/R1/C2). (I built several Geiger kits from BroHogan and they were all trouble-free.)



2. Other solutions use specialized chips like MAX1771 and MC34063.
Shown below is the high-efficiency boost converter from Nick de Smith (sold by ogiLumen), based on MAX1771.


Akafugu's VFD Version 1 clock uses the same MAX1771, to generate a lower 50V (for VFD tubes) MC34063 to generate 38V for the tubes (thanks Ken for the  correction - see his comment at the end of the post).


For MK2, Akafugu uses the same MC34063 chip (schematic not published yet).
The same chip is also used in their Nixie clock (schematic shown below), to generate 180V. This HV circuit has its own (all SMD) board, which I assembled it myself and worked without a glitch.



3. Yet others use a PWM pin of a microcontroller. This method requires the processor to be connected and programmed in order to generate the high voltage. The solution is cheap (saves an extra chip), smaller in size (again, one less chip), and also seems to be highly efficient.

Below is the HV schematic used by Adafruit's IceTube clock.


Some of the microcontroller-based boost converters have feedback (close loop, with PWM adjusting to the voltage output, if I am not mistaken), as are those from Cogwheel and Satashnik (shown below, respectively).



As with any analog electronics circuit, troubleshooting a HV supply is not easy. A suitable tool would be an oscilloscope, allowing for the measurement and adjustment of the frequency and pulse width. Once these are cleared, the high voltage could be adjusted usually from the trim pot. To modify the voltage range, try different values for the inductor.

4. A very useful addition is Ken's VFD power supply with automatic dimming, schematic shown below. Detailed info can be found here.