Showing posts with label nixie. Show all posts
Showing posts with label nixie. Show all posts

Wednesday, March 11, 2020

Rothko Clock Nixie Shield with 6 IN-17 tubes

This compact 6-tube Nixie shield was designed by Tyler a long time ago, when kickstarter was young, and I was following closely and contributing often. Soon after the successful campaign, this open source project, together with its supporting documentation and web site, seemed to have disappeared from the internet.
I already reviewed the Nixie shield here (as part of the "Rothko" clock), and covered it a bit more in another post.
Since I found it appealing, both as a soldering kit and as a miniature Nixie board, I also:
  • modified slightly the original schematic (eliminated the under-the-tube LEDs)
  • redesigned the PCB
  • named the clock "Rothko", to accompany my other clocks in the masters series, "Mondrian" and "Kandinsky". Note that, in this case, the "Rothko" clock is the union of 2 boards: this 6-tube Nixie shield and wsduino (which itself can be replaced by any Arduino with an RTC).


A kit for the Nixie shield is offered on Tindie. The PCB was designed to be self explanatory, but some people prefer the safety of assembly instructions. The slides below, recycled from the original deck, show the sequence of steps.


Once fully assembled, plug the Nixie shield into your Arduino, then upload this basic clock sketch (reads RTC and displays hours and seconds; no setting buttons, no Bluetooth, no buzzer/alarm):

#include "Arduino.h"
#include "avr/pgmspace.h"
#include "Wire.h"
#include "DS1307.h"
#include "avr/io.h"
#include "avr/interrupt.h"

// global variables
unsigned char INDEX = 1;   /* 1 to 6 */
unsigned char HOUR  = 7;   /* 1 to 12 */
unsigned char MINUTE = 45;  /* 0 to 59 */
unsigned char SECOND = 23;  /* 0 to 59 */

boolean is12HMode = false;


// read time from DS1307 at intervals;

#define MAX_TIME_READING_COUNTER  15000
long timeReadingCounter = MAX_TIME_READING_COUNTER;


// timer2 used for nixie tube multiplexing

ISR(TIMER2_COMPA_vect)
{
/* HOUR = 10, 11, or 12 or top of minute?*/
if ((HOUR / 10) || SECOND==0)
{
PORTB = 0x10;  // turn HOUR tens LED on
}
else
{
PORTB = 0x00;  // turn HOUR tens LED off
}

switch(INDEX++)

{
/* HOUR tens place */
case 1:
/* blank anodes */
PORTD = 0x00;

/* set cathode */

PORTB |= (HOUR / 10);

/* only turn anode on if one */

if (HOUR / 10)
{
PORTD = 0x04;    
}
break;

/* HOUR ones place */

case 2:
/* blank anodes */
PORTD = 0x00;

/* set cathode */

PORTB |= (HOUR % 10);

/* turn on anode */

PORTD = 0x08;
break;

/* MINUTE tens place */

case 3:
/* blank anodes */
PORTD = 0x00;

/* set cathode */

PORTB |= (MINUTE / 10);

/* turn on anode */

PORTD = 0x10;
break;

/* MINUTE ones place */

case 4:
/* blank anodes */
PORTD = 0x00;

/* set cathode */

PORTB |= (MINUTE % 10);

/* turn on anode */

PORTD = 0x20;
break;

/* SECOND tens place */

case 5:
/* blank anodes */
PORTD = 0x00;

/* set cathode */

PORTB |= (SECOND / 10);

/* turn on anode */

PORTD = 0x40;
break;

/* SECOND ones place */

case 6:
/* blank anodes */
PORTD = 0x00;

/* set cathode */

PORTB |= (SECOND % 10);

/* turn on anode */

PORTD = 0x80;

/* reset index */

INDEX = 1;
break;
}
}

void setup()
{
// configure pins
pinMode(2, OUTPUT);
pinMode(3, OUTPUT);
pinMode(4, OUTPUT);
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);
pinMode(9, OUTPUT);
pinMode(10, OUTPUT);
pinMode(11, OUTPUT);
pinMode(12, OUTPUT);

cli();  // disable global interrupts


// timer2 1kHz interrupt

TCCR2A = 0x00;
TCCR2B = 0x00;
TCNT2 = 0x00;
OCR2A = 0xF9;
TCCR2A |= (1 << WGM21);
TCCR2B |= (1 << CS22);
TIMSK2 |= (1 << OCIE2A);

sei(); // enable global interrupts

}

void loop()
{
    timeReadingCounter++;
    if (timeReadingCounter > MAX_TIME_READING_COUNTER)
    {
      getTimeFromRTC();
      timeReadingCounter = 0;
    }
}

void getTimeFromRTC()
{
int16_t rtc[7];

RTC_DS1307.get(rtc, true);


SECOND = rtc[0];

MINUTE = rtc[1];
HOUR = rtc[2];
if (is12HMode && HOUR > 12)
HOUR = HOUR - 12;
}

void setTime(int hour, int minute, int second)
{
  RTC_DS1307.stop();
  RTC_DS1307.set(DS1307_SEC, second);
  RTC_DS1307.set(DS1307_MIN, minute);
  RTC_DS1307.set(DS1307_HR, hour);
  RTC_DS1307.start();
}



Sunday, March 17, 2019

Debugging the IN-17 Nixie clock (aka "Rothko clock")

This weekend I felt like doing something, which rarely happens lately. From the pile of semi-failed ("started but not finished", "finished but not working", "not fully functional" etc.) I picked the Nixie clock with 6 IN-17 tubes. Its problem was that it did not display any 6 nor 7, on all tubes. A quick check with the meter showed, indeed, a short between 2 neighbor pins. Upon visual inspection (not as easy as it used to be) and with a lot of luck (and magnification), I found the culprit: one tube in the middle of them all had two pins crossed (inverted), as shown in the photo below.




Here is the board with the IN-17 removed.


Since it was impossible for me to re-insert the old short-pined IN-17 (because of the tight space), I had to use a new one. Everything turned out well in the end.

Now onto the usability of this pretty Nixie clock. The only way to set the time is to send commands from a Bluetooth device (phone, tablet). This is not very "user friendly", nor quick, is it? The obvious "remedy" to this situation was to add a couple of buttons on top, where they can be easily pressed. As you may know from my old post, the high voltage (170V) for powering the IN-17 tubes is generated in the same top-of-the-board area, definitely not a good place for fingers. The solution was to use a longer piece of prototyping PCB to cover the danger zone.


As in most simple clocks, the right button increments the minutes, the left one increments the hours, while the seconds are always reset.

I also added a hardware "12 hour mode" through the use of a jumper placed at the bottom of the board:


With the jumper off, the clock shows military time (the hours between 0 and 23).

Unlike the first version, this new Nixie clock, which I shall name "Rothko clock" from now on, uses just 2 boards: wsduino (with on-board RTC and XBee support, assembled for 9V power) and the Nixie shield itself. The 2-button hack should be made somehow permanent, probably by adding them onto the Nixie shield, similar to the LED matrix mini display shield used in the Mondrian clock. Also note that the alarm feature won't work (although implemented in the code, shared here) since there is no buzzer. Bluetooth should still work with a BTBee module plugged into its wsduino socket.

Interestingly, after all these years, one "new old stock" IN-17 Nixie tube can still be bought on ebay for about $7 (compared with about $2 for the bigger IN-12s).

Here are a few more detail photos on the wires that connect the buttons:





The hour buttons (on the left) is connected to A1.
The minutes button (right side) is connected to A0.
The "12/24H mode" header pins (with jumper, at the bottom side of the board) are connected to A2 and GND. Jumper on means pin A2 to the ground, thus enabling 12H mode.



Monday, July 24, 2017

IV-3 VFD confusion

So you want to build Axiris's IV-3 shield for Arduino, sourcing the IV-3 VFD tubes yourself, from any of the numerous ebay sellers, as I did.

Firstly, it is important to note that, although the assembly manual for IV-3 shield refers to it as "IV-3/IV-3a/IV-6 VFD shield for Arduino", which would make you think one could install either IV-3, IV-3A or IV-6 tubes, this is not quite the case. The reason is the difference in pin configuration:
  • IV-3: 9-segment + dot, 14 pins (1 not connected)

(pin configuration is bottom view)
  • IV-3A and IV-6: 7 segment + dot, 12 pins (1 not connected)
(pin configuration is bottom view)
  • and then, there is IV-3 v-82, which I bought on ebay: 7 segment + dot, 14 pins (3 not connected)
(pin configuration is top view)

IV-3 v-82 (as I named it, based on the printing on the back of the tube), is an amalgamation between IV-3 and IV-3A:
- can be found in either 7 segment or 9 segment (+ dot), although only 7 segments are connected;
- has 14 pins (as to support a 9 segment digit + dot), with 3 not connected;
- pin sequence differs from both IV-3 and IV-3A;
- the "key" (the trimmed unconnected pin) is on the opposite side compared to IV-3/IV-3A.
Below are some photos, with the "axiris" IV-3A on the left.



(Also notice the color of the ceramic insulator, white for the "axiris" IV-3A, pink for the IV-3 v-82.)

To adapt the IV-3 v-82 tube to the Axiris board, the pins need to be scrambled like this:


which leads to this ugly assemblage:



It would probably work with proper heat-shrink tubing around the tube terminals, but I preferred to order the correct IV-3A for which the board was designed.

Conclusion: Pay attention when (and if) you order the tubes for "Axiris IV-3 VFD shield" separately. The sure bet is to order IV-3A, with the white ceramic insulator, and the trimmed pin on the right side (when looking at the digit).

P.S. Also, make sure the tubes are "mirrory" black at the top. If the top is white, then the tube is damaged for sure, air got in the tube (basically the tube's glass is cracked), like in the photo below (right tube is damaged).