Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

Easiest way to use QS30-1 Nixie Tube Module?


Best Answer remotewizard, 08 September 2013 - 07:20 PM

I put this aside until I got caught up on other projects, and finally took another look.  Turns out that using SPI to send data to the Nixie tubes was trivial, and using PWM to control the brightness was even more so!

 

 

Thanks again!

Go to the full post


  • Please log in to reply
9 replies to this topic

#1 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 26 December 2012 - 08:24 PM

I was lucky enough to have Santa bring me four QS30-1 Nixie tube modules (http://www.dfrobot.c...&product_id=738) for Christmas.  Given my (admittedly sketchy) understanding of the design, it appears that each module is can be trated like a virtual 74HC595 (actually, each module contains two 74HC595s, but I digress), with the ability to easily daisy chain multiple QS30-1s.  The provided Arduino library can be found at http://www.dfrobot.c...ieTube v1.2.zip, while the schematic is at http://www.dfrobot.c...atic_Prints.pdf.

 

Could I simply attach the modules using SPI (e.g. Nixie OE to Netduino D10, Nixie Din to Netduino D11, Nixie SHCP to Netduino D13, and ground to ground) and use something like the Ic74HC165 module in the netmftoolbox?  If so, could I use PWM on D10 to control brightness (they recommend not running the tubes at full brightness to prolong their lives) while simultaneously using the Ic74HC165 module?

 

Or have I completely misunderstood the way the QS30-1 works?

 

 

 

 



#2 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 27 December 2012 - 04:58 AM

Make sure any of the boards (Netduino and the nixie's) are powered off.

 

Refer to the schematic and consider only the D-IN connector.

First of all, ensure a very good ground: the Netduino's and the board should be wired together, possibly with a short yet good connection.

Tie the OE (5) input to the ground: that is the main enabling for any segment and led on the board.

Connect D_IN (6) to the Netduino MOSI pin, SHCP (2) to the Netduino SCLK, and the STCP (4) to any Netduino output port.

Check all the wiring once again, then try to power the boards.

 

NOTE: the nixie requires about 160V for lighting up, thus you should *avoid* putting fingers on the circuit when it's powered. Also a wrong wiring could damage permanently the Netduino.

 

You can use any 74HC595 oriented code/library: the board uses those chips, not the 74HC165.

Cheers


Biggest fault of Netduino? It runs by electricity.

#3 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 27 December 2012 - 01:18 PM

Exactly what I was hoping to find.  Thank you.

 

So I shouldn't try to use PWM on OE to set the duty cycle (and thus the brightness)?



#4 Mario Vernari

Mario Vernari

    Advanced Member

  • Members
  • PipPipPip
  • 1768 posts
  • LocationVenezia, Italia

Posted 27 December 2012 - 01:40 PM

Exactly what I was hoping to find.  Thank you.

 

So I shouldn't try to use PWM on OE to set the duty cycle (and thus the brightness)?

 

Sorry, I totally missed your question on that!

Well, it's a good point: it's correct that you may enable/disable the whole board by using the OE signal, but I'm not sure you could use the PWM for a nixie. I never tried it...you might try!

Just in case, try with a very low frequency: let's say 100Hz or so.

Cheers


Biggest fault of Netduino? It runs by electricity.

#5 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 27 December 2012 - 02:26 PM

I'll do that and post my results.  Thanks again!



#6 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 08 September 2013 - 07:20 PM   Best Answer

I put this aside until I got caught up on other projects, and finally took another look.  Turns out that using SPI to send data to the Nixie tubes was trivial, and using PWM to control the brightness was even more so!

 

Attached File  7654-small.JPG   116.39KB   1 downloads

 

Thanks again!



#7 n0rb

n0rb

    New Member

  • Members
  • Pip
  • 2 posts

Posted 09 September 2013 - 03:45 PM

hey remotewizard!

would you be so kind and post your schematics and code :D ?

 

I got the same nixie tubes and ported the arduino library to c#.

almost everything is working ... except I cannot display 0 (zero) and cannot control the brightness :/

 

I would really appreciate it for my nixie kitchen clock project :D



#8 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 24 October 2013 - 08:26 PM

Sorry - I only just saw this now.  I'll try to dig out the info over the weekend and post it ASAP.



#9 remotewizard

remotewizard

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 26 October 2013 - 07:36 PM

Back again!  Please note that my connection information is from handwritten notes; you'll want to double-check the DFRobot documentation before actually trying this out.

 

I daisy-chained all four Nixie modules together, then connected an external 12V supply to pins 7 and 9.  I then connected:

 

Pin 1 (DIN) => Netduino pin D11

Pin 2 (ST)   => D8

Pin 3 (SH)   => D13

Pin 4 (OE)   => D5

Pin 5 (GND) => ground

Pin 6 (+5)   => +5

 

I haven't got as far as writing a proper class just yet; this is more of a proof-of-concept.

namespace NixieTest2{    public class Program    {        public enum Color        {            White,            Yellow,            Cyan,            Green,            Magenta,            Red,            Blue,            Black        };        public enum Colon        {            None,            Upper,            Lower,            Both        };        public static void Main()        {             OutputPort ChipSelect = new OutputPort(Pins.GPIO_PIN_D8, false);             PWM BrightnessControl = new PWM(PWMChannels.PWM_PIN_D5, 1000, .5, true);             BrightnessControl.DutyCycle = .5;             BrightnessControl.Frequency = 1000;             BrightnessControl.Start();            var spiConfig = new SPI.Configuration(                SPI_mod:  SPI.SPI_module.SPI1,                             ChipSelect_Port: Cpu.Pin.GPIO_NONE,                ChipSelect_ActiveState: false,                ChipSelect_SetupTime: 0,                ChipSelect_HoldTime: 0,                                Clock_IdleState: true,                Clock_Edge: true,                Clock_RateKHz: 1000                );           SPI Spi = new SPI(spiConfig);           ushort[] bufOne = new ushort[1];           ushort[] bufTwo = new ushort[1];           ushort[] bufThree = new ushort[1];           ushort[] bufFour = new ushort[1];           bufOne[0] = 0;           bufTwo[0] = 0;           bufThree[0] = 0;           bufFour[0] = 0;            ChipSelect.Write(false);            Thread.Sleep(20);                         Spi.Write(bufOne);            Spi.Write(bufTwo);            Spi.Write(bufThree);            Spi.Write(bufFour);            ChipSelect.Write(true);                        Thread.Sleep(20);            ChipSelect.Write(false);            Thread.Sleep(20);            //common color and colon stuff            int ColorAndColon1 = ((int)Color.Red << 4) + ((int)Colon.Upper << 2);            int ColorAndColon2 = ((int)Color.Cyan << 4) + ((int)Colon.Lower << 2);            int ColorAndColon3 = ((int)Color.Yellow << 4) + ((int)Colon.Both << 2);            int ColorAndColon4 = ((int)Color.Magenta << 4) + ((int)Colon.None << 2);            //write '7654'            bufOne[0] = (ushort)ColorAndColon1;            bufOne[0] <<= 8;            bufOne[0] |= 64;            bufTwo[0] = (ushort)ColorAndColon2;            bufTwo[0] <<= 8;            bufTwo[0] |= 32;            bufThree[0] = (ushort)ColorAndColon3;            bufThree[0] <<= 8;            bufThree[0] |= 16;            bufFour[0] = (ushort)ColorAndColon4;            bufFour[0] <<= 8;            bufFour[0] |= 8;            Spi.Write(bufOne);            Spi.Write(bufTwo);            Spi.Write(bufThree);            Spi.Write(bufFour);            ChipSelect.Write(true);            Thread.Sleep(Timeout.Infinite);        }     }   }


#10 n0rb

n0rb

    New Member

  • Members
  • Pip
  • 2 posts

Posted 28 December 2013 - 06:39 PM

hey remotewizard,

 

sorry for my delayed response as well ;)

 

thanks alot for your instructions.

tested it quickly at work on an older netduino1 but couldn't get it to work (at all) unfortunately.

 

so I got a few more questions if you don't mind:

 

what netmf version are you using ?

the PWM constructor on netmf 4.1 and 4.2 seems to only accept one argument (PIN).

 

and are you using a netduino or netduino 2 ?






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.