Pages: [1] 2 3 ... 10
 1 
 on: February 25, 2017, 01:25:28 pm 
Started by maximevince - Last post by nonentity
Thank you for sharing Maxime!

 2 
 on: February 25, 2017, 02:54:29 am 
Started by maximevince - Last post by maximevince
Hey all,

Since I wanted a minimalist build with no buttons on my clock, I decided to throw in a GPS to get the time sync from!

Short list of features:
* Time sync from GPS (Ublox NeoM6 module, but can be any)
* Timer interrupt to refresh/multiplex the tubes in a stable way.
* Fully non-blocking tube multiplexing (no delay()-functions)
* Uses the Time class, rather than millis() to keep track of time

Overall I think the code is cleaner and easier to read, compared to the original example code.

You can find the code on GitHub:
https://github.com/maximevince/arduinix_gps_timer_isr

Let me know if you like it, use it, ... or send me a pull request on GitHub if you improved the code!

 3 
 on: November 19, 2016, 11:45:56 am 
Started by nonentity - Last post by nonentity
Sorry guys, we had some broken links on the assembly section and the code section.  Those should be fixed now.  Please let me know if you find anything else that is broken on the website.

Thanks!

Brad

 4 
 on: June 09, 2016, 02:53:59 pm 
Started by RJTPMP - Last post by nonentity
Has anyone tried using the IN-16 tubes? I'm working on mine now, but my first setup doesn't seem to work.  I think I just have the voltage set too low. I plan on getting back to it at some point this week if all goes well.

What voltage do you have it set to? What power supply are you using?  Make sure it's at least 650 milliamps or greater, one amp would be good. 

 5 
 on: June 09, 2016, 02:53:10 pm 
Started by Dr.Wizard - Last post by nonentity
digitalWrite is very slow and inefficient because it does error checking to make sure the user isn't trying something stupid, and because it has to decode which port and bit the requested pin is on.  And it makes your code much easier to read and understand.  Not necessarily bad, but in a multiplex routine, especially one called from an interrupt, speed counts.  The code gets executed hundreds of times a second.  If it's slow and inefficient, it leaves less processing power for other things.

A faster and more efficient way to control pins is the write directly to the control registers.  The disadvantages to this are the opposites of what I mentioned above.  You need to know what port and bit the pin is on.  You better get it right, because if you do it wrong, god only knows what could happen.  And it involves binary math and bit manipulation which can be rather confusing.

So here it is, a routine for controlling the output pins that writes directly to the ports.  It is literally 100 times faster (I benchmarked it!).

Code:
void setOutputs(byte bank, byte digit1, byte digit2) {

byte val1 = digit1 << 2; // Store number 1 in value 1, shift bits 2 places left (Move BCD value on last 4 bits to middle 4 bits)
byte val2 = digit2 << 6; // Put least 2 bits of Number 2 into upper 2 bits of Value 1
byte val3 = digit2 >> 2; // put highest 2 bits of Number 2 into lowest 2 bits of Value 2
byte val4 = (1 << (bank + 2));  // Choose which bit is needed to control the bank pins 10-13
// The bank selection is middle 4 bits, so the number needs to be shifted over by 2 bits

PORTD &= B00000011; // Turn pins 2-7 off
PORTB &= B11000000; // Turn pins 8-13 off
PORTD |= val1; // Set pins 2-5 to match BCD number held in middle 4 bits of Value 1
PORTD |= val2; // Set pins 6 & 7 to match highest 2 bits of value 1 which is lowest 2 bits of num2
PORTB |= val3; // Set pins 8 and 9 to lowest 2 bits of value 2 which is highest 2 bits of num2

PORTB |= val4; // Turn the appropriate pin (10-13) for the bank
}

This code is very specific to Arduino models Uno, Micro, Mini, Nano, and other Arduino clones that use the 328P chip.  To use it on a Mega, or some other type of microcontroller, you will need to change the ports and which bits get manipulated.


Wow, that's pretty awesome. 

It'd be nice to get a fresh codebase for the ArduiNIX one day, I've been looking into it, but I am not a coder, I am more on the art side and hardware side.

Very neat work!

 6 
 on: June 03, 2016, 01:37:41 pm 
Started by RJTPMP - Last post by Dr.Wizard
I'm using IN-16 tubes for my seconds, and IN-8-2 tubes for hours and minutes.  I didn't have any trouble with the IN-16's other than their weird pinout with the 7 and 2 reversed.  My voltage is set to 170, and I used a 6.8K resistor for the anodes.

 7 
 on: June 03, 2016, 01:27:21 pm 
Started by Dr.Wizard - Last post by Dr.Wizard
digitalWrite is very slow and inefficient because it does error checking to make sure the user isn't trying something stupid, and because it has to decode which port and bit the requested pin is on.  And it makes your code much easier to read and understand.  Not necessarily bad, but in a multiplex routine, especially one called from an interrupt, speed counts.  The code gets executed hundreds of times a second.  If it's slow and inefficient, it leaves less processing power for other things.

A faster and more efficient way to control pins is the write directly to the control registers.  The disadvantages to this are the opposites of what I mentioned above.  You need to know what port and bit the pin is on.  You better get it right, because if you do it wrong, god only knows what could happen.  And it involves binary math and bit manipulation which can be rather confusing.

So here it is, a routine for controlling the output pins that writes directly to the ports.  It is literally 100 times faster (I benchmarked it!).

Code:
void setOutputs(byte bank, byte digit1, byte digit2) {

byte val1 = digit1 << 2; // Store number 1 in value 1, shift bits 2 places left (Move BCD value on last 4 bits to middle 4 bits)
byte val2 = digit2 << 6; // Put least 2 bits of Number 2 into upper 2 bits of Value 1
byte val3 = digit2 >> 2; // put highest 2 bits of Number 2 into lowest 2 bits of Value 2
byte val4 = (1 << (bank + 2));  // Choose which bit is needed to control the bank pins 10-13
// The bank selection is middle 4 bits, so the number needs to be shifted over by 2 bits

PORTD &= B00000011; // Turn pins 2-7 off
PORTB &= B11000000; // Turn pins 8-13 off
PORTD |= val1; // Set pins 2-5 to match BCD number held in middle 4 bits of Value 1
PORTD |= val2; // Set pins 6 & 7 to match highest 2 bits of value 1 which is lowest 2 bits of num2
PORTB |= val3; // Set pins 8 and 9 to lowest 2 bits of value 2 which is highest 2 bits of num2

PORTB |= val4; // Turn the appropriate pin (10-13) for the bank
}

This code is very specific to Arduino models Uno, Micro, Mini, Nano, and other Arduino clones that use the 328P chip.  To use it on a Mega, or some other type of microcontroller, you will need to change the ports and which bits get manipulated.

 8 
 on: October 31, 2015, 09:37:28 am 
Started by willystyle - Last post by nonentity
So I've put everything together, no visible cold solder joints, I plug everything in and do the voltage test - disconnected I can get to about 183v on the low end of the pot. Once the tubes are in, it reads about 149 or so, but only the middle two tubes light up and it seems as though multiple cathodes are lit. If it is displaying a number, it's indistinguishable to me. I also tested each of the tubes from anode to every cathode to verify there are no shorts in the tubes. I'm using the basic code off the site.

Looking for the next logical test steps...

Thanks in advance!

Can you tell us if your driver chips may have been fried? Pictures would help, but that's my first thought.

 9 
 on: October 31, 2015, 09:36:18 am 
Started by catdotgif - Last post by nonentity
Hey All,
      The nixie clock I built based on the Arduinix circuit is still going strong after three years.  Recently, the #3 digit on one of the IN-4 tubes stopped displaying as a number, and now there's just a blobby glow on one side of the tube.  I've had that happen once before on a tube that doesn't display the full 0-9 digits, and swapping it with another tube eventually cleared it up.  But this one appears to be sticking around.

I'm assuming what has happened is that some kind of filament bridge has formed between the number and the adjacent anode mesh.  I was thinking maybe I could run low voltage current through it to burn out the bridge, but I thought I'd post the issue first to see if anyone has had a similar problem and found a solution for it.  

thxthx!

Do you think it could be cathode poisoning?  If so, to reverse it, swap the anode and cathode for the digit in question and run it in "reverse" for a bit.

 10 
 on: August 06, 2015, 12:14:45 pm 
Started by eplambec - Last post by eplambec
Hello everyone,
   I'm using an arduinix and 6 IN-18's to display a stock ticker price that is being sent to the arduino via a raspberry pi. I currently have a code that uses four bulbs and the readout and am looking for help to turn that code into six. The code was developed to omit the cents of the stock price. I am attempting to include the full price. For example, the pi is scraping a price of 1789.43. The four bulbs would readout 1789. I would like it to display the full 1789.43. I have include my current arduino code. Thanks for any help.

E

#this is based on the Arduinix 6-digit clock code. It includes code to drive
#the Adafruit I2C 128x32 OLED display for debug purposes.

#include <SPI.h>
#include <Wire.h>
#include <Adafruit_GFX.h>
#include <Adafruit_SSD1306.h>
#define OLED_RESET 14

Adafruit_SSD1306 display(OLED_RESET);

// SN74141 (1)
int ledPin_0_a = 2;                
int ledPin_0_b = 3;
int ledPin_0_c = 4;
int ledPin_0_d = 5;
// SN74141 (2)
int ledPin_1_a = 6;                
int ledPin_1_b = 7;
int ledPin_1_c = 8;
int ledPin_1_d = 9;

// anode pins
int ledPin_a_1 = 10;
int ledPin_a_2 = 11;
int ledPin_a_3 = 12;

void setup()
{
  pinMode(ledPin_0_a, OUTPUT);      
  pinMode(ledPin_0_b, OUTPUT);      
  pinMode(ledPin_0_c, OUTPUT);      
  pinMode(ledPin_0_d, OUTPUT);    

  pinMode(ledPin_1_a, OUTPUT);      
  pinMode(ledPin_1_b, OUTPUT);      
  pinMode(ledPin_1_c, OUTPUT);      
  pinMode(ledPin_1_d, OUTPUT);      

  pinMode(ledPin_a_1, OUTPUT);      
  pinMode(ledPin_a_2, OUTPUT);      
  pinMode(ledPin_a_3, OUTPUT);    

  Serial.begin(19200);
  display.begin(SSD1306_SWITCHCAPVCC, 0x3C);  // initialize with the I2C addr 0x3C...
                                              // ...for the 128x32 OLED display
  display.clearDisplay();                     // set up I2C display
  display.setTextSize(2);
  display.setTextColor(WHITE);  
}


void DisplayNumberSet( int anod, int num1, int num2 )
{
  int anodPin;
  int a,b,c,d;

  // set defaults to blank display
  a=1;
  b=1;
  c=1;
  d=1;
  anodPin =  ledPin_a_1;     // default on first anode.

  // Select what anod to fire.
  switch( anod )
  {
  case 0:    
    anodPin =  ledPin_a_1;    
    break;
  case 1:    
    anodPin =  ledPin_a_2;    
    break;
  case 2:    
    anodPin =  ledPin_a_3;    
    break;
  }  

  // Load the a,b,c,d.. to send to the SN74141 IC (1)
  switch( num1 )
  {
  case 0:
    a=0;
    b=0;
    c=0;
    d=0;
    break;
  case 1:
    a=1;
    b=0;
    c=0;
    d=0;
    break;
  case 2:
    a=0;
    b=1;
    c=0;
    d=0;
    break;
  case 3:
    a=1;
    b=1;
    c=0;
    d=0;
    break;
  case 4:
    a=0;
    b=0;
    c=1;
    d=0;
    break;
  case 5:
    a=1;
    b=0;
    c=1;
    d=0;
    break;
  case 6:
    a=0;
    b=1;
    c=1;
    d=0;
    break;
  case 7:
    a=1;
    b=1;
    c=1;
    d=0;
    break;
  case 8:
    a=0;
    b=0;
    c=0;
    d=1;
    break;
  case 9:
    a=1;
    b=0;
    c=0;
    d=1;
    break;
  case 10:
    a=1;
    b=1;
    c=1;
    d=1;
  }  

  // Write to output pins.
  digitalWrite(ledPin_0_d, d);
  digitalWrite(ledPin_0_c, c);
  digitalWrite(ledPin_0_b, b);
  digitalWrite(ledPin_0_a, a);

  // Load the a,b,c,d.. to send to the SN74141 IC (2)
  switch( num2 )
  {
  case 0:
    a=0;
    b=0;
    c=0;
    d=0;
    break;
  case 1:
    a=1;
    b=0;
    c=0;
    d=0;
    break;
  case 2:
    a=0;
    b=1;
    c=0;
    d=0;
    break;
  case 3:
    a=1;
    b=1;
    c=0;
    d=0;
    break;
  case 4:
    a=0;
    b=0;
    c=1;
    d=0;
    break;
  case 5:
    a=1;
    b=0;
    c=1;
    d=0;
    break;
  case 6:
    a=0;
    b=1;
    c=1;
    d=0;
    break;
  case 7:
    a=1;
    b=1;
    c=1;
    d=0;
    break;
  case 8:
    a=0;
    b=0;
    c=0;
    d=1;
    break;
  case 9:
    a=1;
    b=0;
    c=0;
    d=1;
    break;
  case 10:
    a=1;
    b=1;
    c=1;
    d=1;
  }

  // Write to output pins
  digitalWrite(ledPin_1_d, d);
  digitalWrite(ledPin_1_c, c);
  digitalWrite(ledPin_1_b, b);
  digitalWrite(ledPin_1_a, a);

  // Turn on this anode.
  digitalWrite(anodPin, HIGH);  

  // Delay
  // NOTE: With the difference in Nixie bulbs you may have to change
  //       this delay to set the update speed of the bulbs. If you
  //       dont wait long enough the bulb will be dim or not light at all
  //       you want to set this delay just right so that you have
  //       nice bright output yet quick enough so that you can multiplex with
  //       more bulbs.
  delay(2);

  // Shut off this anode.
  digitalWrite(anodPin, LOW);
}

////////////////////////////////////////////////////////////////////////
//
// DisplayNumberString
// Use: passing an array that is 8 elements long will display numbers
//      on a 6 nixie bulb setup.
//
////////////////////////////////////////////////////////////////////////
void DisplayNumberString( int* array )
{
  // bank 1 (bulb 0,3)
  DisplayNumberSet(0,array[0],array[3]);  
  // bank 2 (bulb 1,4)
  DisplayNumberSet(1,array[1],array[4]);  
  // bank 3 (bulb 2,5)
  DisplayNumberSet(2,array[2],array[5]);  
}

int NumberArray[6]={10,10,10,10,10,10};
const int MaxChars = 4;
char strValue[MaxChars+1];
int index = 0;
int stock_price = 0;
int d3, d2, d1, d0 = 0;

void loop()    
{
  if (Serial.available())
  {
    display.clearDisplay();               //clear I2C display
    char ch = Serial.read();              //read char data from RPi via USB serial cable
    if (ch > '9')
    {
      Serial.println("'A' received");     // received command to blank display
      NumberArray[6]=(10,10,10,10,10,10); // '10' blanks a digit
      DisplayNumberString(NumberArray);
      delay(1000);
    }
    if (index < MaxChars && ch >= '0' && ch <= '9')
    {
      strValue[index++] = ch;            //build 4-digit string
    }
    else
    {
      strValue[index] = 0;      
      stock_price=atoi(strValue);            //convert ascii to integer
      index = 0;                             //reset index for next time
//      Serial.print("the stock price is "); //print to debug console
//      Serial.println(stock_price);
      d3 = stock_price % 10;                 // use modulo math to separate integer into indiv. digits
      d2 = (stock_price / 10) % 10;
      d1 = ((stock_price / 10) / 10) % 10;
      d0 = (((stock_price / 10) / 10) / 10) % 10;
      display.setCursor(0,18);     // print stuff to OLED display (was used for debug)
      display.println(stock_price);
      display.display();           // this actually prints what was just set up to OLED
    }
  }
  NumberArray[2] = d0;             // print each digit to a tube (ordering depends on tube board)
  NumberArray[3] = d1;
  NumberArray[1] = d2;
  NumberArray[5] = d3;             // MSB
  DisplayNumberString(NumberArray);
}

Pages: [1] 2 3 ... 10