Go Down

Topic: Nixie Clock (eventually!) (Read 2 times) previous topic - next topic

frustro

So every Wednesday I man my buddies store http://reuseum.com and hang out for a few hours.  Last week I saw on the shelf an old multimeter that had 5 nixie tubes and a 29.99 price tag(would not power up of course, parts repair).  By the end of the day it was still there and so I decided that it needed a new purpose and home.  I ripped out the 5 tubes and the 4 74141's and did some research on the interwebs.  Today I received my power supply and decided to start figuring out how to run one of these things!

After one minor shock@180vdc and a blown 74141 I have this

[media]http://www.youtube.com/watch?v=soTx4mVoMqg[/media]


 The code I slapped together is simple, I found the datasheet for the tubes (Burroughs 5750-S) and from there began to test.  Tomorrow I hope to get 2 tubes going with a 4017 between my RBBB and the 74141's.  That means ShiftOut() I think....Not sure yet.

In the shop there are GPS units (they just did a workshop a few months ago) and that is what I am hoping to use for an accurate time source for this project.  The case that I would like is here, and the size of the tubes.






Code: [Select]


int aPin =  9;
int bPin = 10;
int cPin = 11;
int dPin = 12;



void setup()   {                

 pinMode(aPin, OUTPUT);
 pinMode(bPin, OUTPUT);
 pinMode(cPin, OUTPUT);
 pinMode(dPin, OUTPUT);  
}


void loop()                    
{
 zero();
   blank();
 one();
   blank();
 two();
   blank();
 three();
   blank();
 four();
   blank();
 five();
   blank();
 six();
   blank();
 seven();
   blank();
 eight();
   blank();
 nine();
   blank();
}

void blank()
{
 digitalWrite(aPin, HIGH);
 digitalWrite(bPin, HIGH);
 digitalWrite(cPin, HIGH);
 digitalWrite(dPin, HIGH);
 delay (500);
}

void zero(){
 digitalWrite(aPin, LOW);
 digitalWrite(bPin, LOW);
 digitalWrite(cPin, LOW);
 digitalWrite(dPin, LOW);
 delay (1000);
}

void one(){
 digitalWrite(aPin, HIGH);
 digitalWrite(bPin, LOW);
 digitalWrite(cPin, LOW);
 digitalWrite(dPin, LOW);
 delay (1000);
}

void two(){
 digitalWrite(aPin, LOW);
 digitalWrite(bPin, HIGH);
 digitalWrite(cPin, LOW);
 digitalWrite(dPin, LOW);
 delay (1000);
}

void three(){
 digitalWrite(aPin, HIGH);
 digitalWrite(bPin, HIGH);
 digitalWrite(cPin, LOW);
 digitalWrite(dPin, LOW);
 delay (1000);
}

void four(){
 digitalWrite(aPin, LOW);
 digitalWrite(bPin, LOW);
 digitalWrite(cPin, HIGH);
 digitalWrite(dPin, LOW);
 delay (1000);
}

void five(){
 digitalWrite(aPin, HIGH);
 digitalWrite(bPin, LOW);
 digitalWrite(cPin, HIGH);
 digitalWrite(dPin, LOW);
 delay (1000);
}

void six(){
 digitalWrite(aPin, LOW);
 digitalWrite(bPin, HIGH);
 digitalWrite(cPin, HIGH);
 digitalWrite(dPin, LOW);
 delay (1000);
}

void seven(){
 digitalWrite(aPin, HIGH);
 digitalWrite(bPin, HIGH);
 digitalWrite(cPin, HIGH);
 digitalWrite(dPin, LOW);
 delay (1000);
}
 
 
void eight(){
 digitalWrite(aPin, LOW);
 digitalWrite(bPin, LOW);
 digitalWrite(cPin, LOW);
 digitalWrite(dPin, HIGH);
 delay (1000);
}

void nine(){
 digitalWrite(aPin, HIGH);
 digitalWrite(bPin, LOW);
 digitalWrite(cPin, LOW);
 digitalWrite(dPin, HIGH);
 delay (1000);
}


Federico

Nixie tubes are so cool  8-) I want a couple too  ::)
Federico - Sideralis
Arduino &C: http://www.sideralis.org
Foto: http://blackman.amicofigo.com

CowJam

Quote
Nixie tubes are so cool  I want a couple too


That's exactly what I thought, then found an ebay shop called TUBE-USSR :D

Thanks for introducing me to nixies frustro.

CowJam

I wish there was a shop like that near me.

Can you show us your circuit diagram, please?  I've just bought some nixies and ICs and don't want to blow any of them.

frustro

Not much of an artist, so no diagram from me, but i can write it out!

From the code you can see that I am using digital pins 9-12.  The driver that I am using is the SN74141, you can find that datasheet pretty easily.  The power supply is a DC DC 12v to 180v unit that I got from techkits, there are others out there that are adjustable voltage as well, just do a search for nixie power supply.

So the basic wiring is

4 digital pins to pins A B C D of the 74141.
VCC is 5v+, i'm powering that off of the Arduino
GND is connected to the  common on the 180vdc power supply.
The remaining pins go to the corresponding leads on the nixie tube.
The nixie tubes are common anode, so i take the 180vdc from the power supply to the anode of the tube.  

That's it!

I'm sure there is an easier way to code the functions of the 74141 using an array, but I'm by no means a coder.


CowJam

Thanks Frustro.  I get muddled with anode/cathode so thanks for pointing that out, I wasn't sure if you ran 180v through the chip.

I got a set of 12 with sockets and the ICs ( http://cgi.ebay.com/ws/eBayISAPI.dll?ViewItem&item=400169956004#ht_994wt_905 ). Can't wait for them to arrive!

RickP

#6
Jan 04, 2011, 11:01 pm Last Edit: Jan 04, 2011, 11:03 pm by pannen Reason: 1
Hi,

I used the russian version 47141s and 4017 counters for my nixie powered reverse geocache -> http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1293755082

I made a lib for driving the nixies, maybe it's of use to you.

Nixie.h
Code: [Select]

#ifndef Nixie_h
#define Nixie_h

// Include the standard types
#include <WProgram.h>
#include <WConstants.h>

// Define the Nixie class
class Nixie
{
 public:
   // Constructor
   Nixie(int clockPin, int resetPin);
   
   void clear();
   void writeNum(int number);


 private:
   int _clockPin;
   int _resetPin;
   int _currentNum;
};

#endif //Nixie_h



Nixie.cpp
Code: [Select]

// Include the standard types
#include <WProgram.h>
#include <WConstants.h>
#include "Nixie.h"

#define _BLANK_NUM 10

//Atmega328 Version of fastWrite - for pins 0-13
#define fWriteA(_pin_, _state_) ( _pin_ < 8 ? (_state_ ?  PORTD |= 1 << _pin_ : \
PORTD &= ~(1 << _pin_ )) : (_state_ ?  PORTB |= 1 << (_pin_ -8) : PORTB &= ~(1 << (_pin_ -8)  )))

// Constructor
Nixie::Nixie(int clockPin, int resetPin)
{
 // save our member data
 _clockPin = clockPin;
 _resetPin = resetPin;
 _currentNum = -1;

 // set the pins to output mode
 pinMode(_clockPin, OUTPUT);
 pinMode(_resetPin, OUTPUT);

 // set the pins low
 fWriteA(_clockPin, 0);
 fWriteA(_resetPin, 0);
 
 // reset the counter
 clear();
}

   
void Nixie::clear()
{
 writeNum(_BLANK_NUM);
}

// Write a number
void Nixie::writeNum(int number)
{
 if (_currentNum != number) {  
   // reset the counter
   fWriteA(_resetPin, 1);
   fWriteA(_resetPin, 0);
 
   // Send x signals
   for(int i = 0; i < number; i++)
   {
     fWriteA(_clockPin, 1);
     fWriteA(_clockPin, 0);
   }
   _currentNum = number;
 }
}


Usage (the clock pin and the reset pin of the 4017 are wired to arduino pins):
Code: [Select]

#include "Nixie.h"

Nixie n1(9,8); // 9 = 4017 clockpin, 8 = 4017 resetpin
Nixie n2(7,6);
Nixie n3(5,4);

void setup ()
{
}

void loop() {
 for (int i=0; i < 10; i++) {
   n1.writeNum(i);
   delay(200);
   n2.writeNum(i);
   delay(200);
   n3.writeNum(i);
   delay(200);
 }
}


Federico

As I am a bit confused, would it be the same to use 74hc595 instead of the 4017?
Federico - Sideralis
Arduino &C: http://www.sideralis.org
Foto: http://blackman.amicofigo.com

frustro

I don't see why not (at least off the top of my head)

A single 595 should be able to run 2 74141's (or equivalent)

Since the tubes that I am using have left and right decimal points, and the 4017 is 10bits, after I have all 4 tubes and drivers going  I can use the remaining 2 pins on each 4017 to create an animation or mode select indicator using a transistor.


Federico

Ah, I get it now. It's because the 595 are just enaugh to drive the 74141, wich is right for driving ciphers from 0 to 9. But if you use the 4017 you have two spare pins for driving the point with a transistor.

I hope not to be wrong but if you have two points on each tube and if you drive two 74141 with one 4017 you can light up just one point for each tube, or not?
Federico - Sideralis
Arduino &C: http://www.sideralis.org
Foto: http://blackman.amicofigo.com

wyager

Glad to see this. I'm working on a nixie clock as well, starting slowly. I'm building my power supply first- It's a continuous boost driver controlled by an ATTiny45, with regulated output via the ADC. Instead of those dedicated driver ICs, I'm using a bunch of individual HV transistors. Downside is that it takes 13 pins from the master control IC (ATMega328).

Go Up