Show Posts
Pages: 1 [2] 3 4 ... 6
16  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 08:34:05 am
1/ I don't remember which image you're talking about, but hey, it's working now

2/ I like the cartoon style (I'm a designer, sorry) but I see what you're saying, it's not very helpful. (the 74hc595 as 16pins and the TPIC6B595 as 20pins, and the Numitron as 9 legs not 8, so I don't think that would have helped).

3/ Well, the Yun is getting stuff from Twitter, and if yun find what it's looking for it will start up some mechanism. We wanted a Victorian style to our installation and those numitrons do have that pretty well. I can't really say more about the project, but I will definitely post it in the gallery once done.

17  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 07:50:54 am
Updated sketch smiley

(still not sure about the details but it works and it's beautiful)

Code:
//Pin to clear the register
const int clearPin = 7;
//Pin connected to latch pin (ST_CP) of 74HC595
const int latchPin = 8;
//Pin connected to clock pin (SH_CP) of 74HC595
const int clockPin = 12;
////Pin connected to Data in (DS) of 74HC595
const int dataPin = 11;

byte leds = 0;

/*
  Russian Datasheet
  0: 3,4,5,6,8,9
  1: 3,4
  2: 3,5,7,8,9
  3: 3,4,5,7,8
  4: 3,4,6,7
  5: 4,5,6,7,8
  6: 4,5,6,7,8,9
  7: 3,4,5
  8: 3,4,5,6,7,8,9
  9: 3,4,5,6,7,8
  <: 2

   ShiftRegister
  0: 2,3,4,5,7,8
  1: 2,3
  2: 2,4,6,7,8
  3: 2,3,4,6,7
  4: 2,3,5,6
  5: 3,4,5,6,7
  6: 3,4,5,6,7,8
  7: 2,3,4
  8: 2,3,4,5,6,7,8
  9: 2,3,4,5,6,7
  <: 1
  */

//Numbers
const byte numbers[11][8] = {
  {0, 1, 1, 1, 1, 0, 1, 1},
  {0, 1, 1, 0, 0, 0, 0, 0},
  {0, 1, 0, 1, 0, 1, 1, 1},
  {0, 1, 1, 1, 0, 1, 1, 0},
  {0, 1, 1, 0, 1, 1, 0, 0},
  {0, 0, 1, 1, 1, 1, 1, 0},
  {0, 0, 1, 1, 1, 1, 1, 1},
  {0, 1, 1, 1, 0, 0, 0, 0},
  {0, 1, 1, 1, 1, 1, 1, 1},
  {0, 1, 1, 1, 1, 1, 1, 0},
  {1, 0, 0, 0, 0, 0, 0, 0},
};

void setup() {
  //set pins to output because they are addressed in the main loop
  pinMode(clearPin, OUTPUT);
  pinMode(latchPin, OUTPUT);
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);

  Serial.begin(9600);
  // delay a little and then set
  delay(100);
  // Always start by sentting SRCLR high
  digitalWrite( clearPin, HIGH);

}

void loop() {
  for (int n = 0; n < 11; n++) {
    leds = 0;
    updateShiftRegister();
    delay(200);//little pause to breath
    for (int i = 0; i < 8; i++) {
      if (numbers[n][i] == 1) {
        bitSet(leds, i);
        updateShiftRegister();
        delay(10);//light up one by one at 10ms
      }
    }
    delay(1000);//stay on for an exta 1s
  }
}

void updateShiftRegister() {
  digitalWrite(latchPin, LOW);
  shiftOut(dataPin, clockPin, LSBFIRST, leds);
  digitalWrite(latchPin, HIGH);
}
18  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 07:39:53 am
That's from the Tutorial, I figured that it was were the issue was but I don't understand the logic yet. As soon as I do I will create repost the whole thing.

Also, the first code was messing up the logic of which leg to turn on in reference to the datasheet, as now it does match.
19  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 06:54:40 am
Haaaaaa! It's the code!

this example works perfectly: https://learn.adafruit.com/adafruit-arduino-lesson-4-eight-leds/arduino-code

Now I need to figure out why as I really want to know.
20  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 06:17:11 am
Ok here's the image of the wiring. Couldn't find a TPIC6B595 in Fritzing so I used something with 20legs. Also no Numitron but I think it's clear. Also I'm testing on a old Deicimila before moving on to a Yun, just so I don't fry up the £60 Yun. But I don't that makes a difference.
21  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 05:35:50 am
Hand drawn will be fine, but having seen your earlier pic, I don't think a photo taken at any angle is going to help.

Haha, if you're referring to some old posts of mine on the forum I understand smiley I'm doing it Fritzing now.
22  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 05:25:04 am
Here's my sketch in case someone wants to look at it.

I did a check with my multimeter and the more pins at set HIGH on the shift register, the less voltage I get. Is there something I need to add to my setup to tackle that. For the moment, it's the numitrons legs straight to the shift register. I going to try to illustrate it.  

Code:
//Pin to clear the register
const int clearPin = 7;
//Pin connected to latch pin (ST_CP) of 74HC595
const int latchPin = 8;
//Pin connected to clock pin (SH_CP) of 74HC595
const int clockPin = 12;
////Pin connected to Data in (DS) of 74HC595
const int dataPin = 11;

/*
  Russian Datasheet
  0: 3,4,5,6,8,9
  1: 3,4
  2: 3,5,7,8,9
  3: 3,4,5,7,8
  4: 3,4,6,7
  5: 4,5,6,7,8
  6: 4,5,6,7,8,9
  7: 3,4,5
  8: 3,4,5,6,7,8,9
  9: 3,4,5,6,7,8
  <: 2
  */

//Numbers
const byte numbers[11][8] = {
  {1, 1, 0, 1, 1, 1, 1, 0},
  {0, 0, 0, 0, 0, 1, 1, 0},
  {1, 1, 1, 0, 1, 0, 1, 0},
  {0, 1, 1, 0, 1, 1, 1, 0},
  {0, 0, 1, 1, 0, 1, 1, 0},
  {0, 1, 1, 1, 1, 1, 0, 0},
  {1, 1, 1, 1, 1, 1, 0, 0},
  {0, 0, 0, 0, 1, 1, 1, 0},
  {1, 1, 1, 1, 1, 1, 1, 0},
  {0, 1, 1, 1, 1, 1, 1, 0},
  {0, 0, 0, 0, 0, 0, 0, 1},
};

void setup() {
  //set pins to output because they are addressed in the main loop
  pinMode(clearPin, OUTPUT);

  pinMode(latchPin, OUTPUT);
  digitalWrite(latchPin, LOW);
  pinMode(dataPin, OUTPUT);
  pinMode(clockPin, OUTPUT);

  registerOff();

  Serial.begin(9600);

  // delay a little and then set
  delay(100);
  // Always start by sentting SRCLR high
  digitalWrite( clearPin, HIGH);



}

void loop() {

  /*
    //Counting (ignore the last one)
    for (int n = 0; n < 10; n++) {
      while (!wait(1000, false, " ")) {
        for (int i = 0; i < 8; i++) {
          if (numbers[n][i] == 1) registerWrite(i, HIGH);
          else registerWrite(i, LOW);
        }
      }
      //delay(100);
      wait(100, true, "Reset");//reset Wait timer.
    }

  */

  //Manual Test
  registerWrite(0, HIGH);
  registerWrite(1, HIGH);
  registerWrite(2, HIGH);



  /*
  //Goes through all filaments one by one);
  for (int i = 0; i < 8; i++) {
    registerWrite(i, HIGH);
    delay(1000);
    registerWrite(i, LOW);
  }
  */
}


// This method sends bits to the shift register:
void registerOff() {
  for (int i = 0; i < 8; i++) {
    registerWrite(i, LOW);
    delay(100);
  }
}

/*Not mine, from tutorial*/
void registerWrite(int whichPin, int whichState) {
  // the bits you want to send
  byte bitsToSend0 = 0;
  // write number as bits
  bitWrite(bitsToSend0, whichPin, whichState);

  // turn off the output so the pins don't light up
  // while you're shifting bits:
  digitalWrite(latchPin, LOW);

  // shift the bits out
  shiftOut(dataPin, clockPin, MSBFIRST, bitsToSend0);

  // turn on the output so the LEDs can light up:
  digitalWrite(latchPin, HIGH);
}
23  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 04:25:39 am
Ok, the multiplexing thing was silly of me, I got confused because of an old project I did using shiftregiters for a small led matrix, where I light up each rows in a quick sequence. Looking at my code and shiftregisters tutorial made me realised it  smiley-roll-blue  smiley-sweat

24  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 11, 2014, 04:03:34 am
Hi Paul,

I thought shifregisters were multiplexing but they obviously don't if you say so. I tried to read about the difference but I'm not 100% sure of the difference. Does that mean that shiftregister have some kind of memory, you can set up each pin like actual independent pins and leave it? As multiplexing you have to keep setting pins, one by one in a quick sequence as only one at the time will be working (that I though was the behaviour of shift registers too)

Well if what I though was the "why" of my problem isn't anymore. Maybe it's a software issue, maybe I'm treating it like multiplexing. My sketch is based on the arduino tutorial for shift registers. I'm going to post the code when I'm back at my computer.

Thanks
25  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 10, 2014, 04:19:45 pm
I think I understood the why. The filaments are heated one after the other in a very quick sequence to give the illusion that they are all on at the same time. Because of that 3.5V or 4.5V takes to long to heat the filament in such a short amount of time, so it needs higher voltage to heat the filament quickly.  I think that's it?
26  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 10, 2014, 12:10:00 pm
I've done a test with one of those Regulated AC/DC Adaptor where you set the voltage, and it's does get brighter with higher voltage.

I've done that because at first I though that I was demanding to many mA from the Arduino as I was using the 5V from it. So I tried the Adaptor, as much as that was probably an issue that didn't change my problem.

One filament light up using 4.5V is still brighter than all filaments light up using 6V. I'm not really sure I understand what's going on there....
27  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 10, 2014, 11:50:05 am
Hi Paul,

I've received some TPIC6B595, as far as I can see they seems to work in the same way as the 74HC595 (I'm probably wrong). I've got one Numitron-IV9 plugged in. Everything is working but I've got a voltage issue I think.

The numitron needs between 3.5V and 4.5V. the problem seems to be that when there's more than one filament on it needs more.

I've got a countdown sketch going, and once it's started counting it seems stable, "1" is as bright as "8". So I'm not really sure what's happening as when the arduino reboot, the shiftregister will light a filament at random and that one is very bright as I'm putting 5V in, but once it's running it's pretty dim. (that's just when the arduino is stopped to upload the sketch at a moment when a filament is on)

So I don't really know how to deal with that, seems to need more voltage but I don't want to burn the filament at start. I also want to use more than one Numitron and feel like this could escalade pretty quickly.  Any ideas?

(some source that seems to confirm the voltage change: http://www.instructables.com/id/Numitron-clock-thermometer/step4/The-numitrons/ )
28  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: May 04, 2014, 01:35:10 pm
Thanks Paul for taking the time to answer.  I'm going to buy some TPIC6B595s then. I will try to remember to post my results so we finally have an example or thread about how to actually drive those numitron.

29  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: April 30, 2014, 04:18:51 pm
Ok I see that they actually recommend 6ma and that 20ma is the absolute max. But is it working for a few people because in the end it's taking less than 5V?

Is that what Grumpy_mike is saying here: http://forum.arduino.cc/index.php/topic,15620.0.html
Quote
With a 220R resistor you will be pulling about 18mA from each pin. That is somewhat overstress things. However, these outputs sag a bit when you start taking current from them so if you measured it you would probably find you are not outputting 5V but more like 3.3V to them. This cuts down the current and makes it a lot safer.
30  Using Arduino / Project Guidance / Re: The easiest/best way to drive a Numitron (IV-9) with an Arduino Uno on: April 30, 2014, 04:04:52 pm
Not cool.

The  74HC595 are being massively overloaded beyond their specifications.

Should be using TPIC6B595s.


What about what you said here: http://forum.arduino.cc/index.php?topic=222825.msg1687256#msg1687256

I thought you meant that the 74HC595 could handle it. I think the 74HC595 can deliver a maximum of 20ma at up to 15V and the numitrons IV-9 needs between 17 and 20ma at 3.5V. (http://tubes-store.com/product_info.php?cPath=&products_id=494).

So should that not work?
Pages: 1 [2] 3 4 ... 6