top of page

Part 5 - The Logic Circuitry

​

Possible Ways To Achieve A Flickering Effect

As hinted at in earlier sections, I wanted to create a flickering effect with the Nixie tube in order to enhance the visual appeal of it in operation. There are a few different ways in which this could be achieved:

​

  • One (or more) fast running square wave oscillators all combined together with some discrete logic gates to create a more random pattern for the flickering - a good candidate IC for this purpose would be a standard CMOS '4000 Series' 40106 which contains six separate Schmitt inverter gates, each of which can form an oscillator running at a unique frequency using only one additional resistor and capacitor as shown in the schematic in Figure 1.

Schmitt Oscillator.JPG

​

  • A second implementation involves using a Linear-Feedback Shift Register (LFSR). Whilst this may sound scary, it essentially involves taking a combination of bits and XOR-ing them together in order to seed the Most Significant bit (MSb) for the next rotation (clock pulse) of the shift register. A variation on this involves taking the Least Significant bit (LSb) and using that to XOR with various bits inside the shift register, these individual XORs are then fed directly into the next bit 'down the line' inside the shift register. The schematics of both of these setups are shown below in Figures 2 & 3 respectively. The beauty of this solution is that it can be done in both hardware and software to generate a pseudo-random digital signal/stream of data.

LFSR Type A.jpg
LFSR Type B.jpg

​

  • A final potential implementation, although not one that I have tested, would be to use a single-colour, self-flickering LED - the type that can be found in LED candles and similar - and use one of these in series with the Nixie tube (possibly on the emitter/source of the transistor), or perhaps to control the signal to the base/gate of the transistor. Again, I have not tested this; however, if and when I do, I shall share my results.

​

The Chosen Solution

For the final solution, I chose to go with an LFSR implementation to generate the flickering effect, the main reason being that it could very easily be implemented in software (more on that in a future part).

​

Software inside a microcontroller was a good idea with this project since randomness was also required for the selection of the Nixie cathodes, plus it allowed for adding additional features like being able to use a simple tactile switch as a power button, and adding a timeout feature to prevent unnecessary wear on the Nixie should the room be vacated, or if the user falls asleep. Other visual effects such as a simple Pulse-Width Modulated (PWM) fade-up/fade-down could also be added later down the line should it be desired. Software control also makes the project much more customisable for different applications whilst still using the same PCB.

​

Selecting A Microcontroller

Since this is a relatively low-demand application in terms of processing power, and since power consumption was to be kept to a minimum so as to facilitate running from a USB power bank or a low-output laptop USB port, the microcontroller was kept small, simple, and compact. A PIC 16F15313 was used in this project since I already have the MPLAB X IDE set up on my laptop and have access to a cheap knockoff PICkit 3 (these can be had off of eBay or AliExpress for under £10 delivered and include the mini-USB cable, plus a programming cable with male and female Dupont connectors for easy connection to pin headers and breadboards). For this project, I used my shiny new (and official) PICkit 4 (which can also program ATMEL chips and stuff as well).

 

As a result, I was already confident with the capabilities of this chip, plus I had played around with it for long enough that the code development was relatively quick - granted not quite as quick as with an Arduino setup, but then again, any Arduino system would have been VERY overkill for this application.

​

The only downside with this microcontroller was its lack of General Purpose Input/Output (GPIO) pins since it only comes in an 8-pin package. 2 of these pins are reserved for power and ground connections, and an additional pin is an input-only pin; clearly, this would not be enough to drive all the cathodes individually. I could have opted to go for the 14-pin (but otherwise identical) 16F15323; however, this provides only 7 pins on each output port (instead of 8) which means, I would not be able to represent all 8 cathodes with sequential bits of a single byte (and going with any more than 14 pins is starting to get a bit overkill)

​

Supporting Hardware

This predicament leads beautifully into the final part of my solution: using a shift register to effectively expand the GPIO capabilities of the 16F15313. I went with the 'jellybean' 74HC595 shift register since it has the incredibly useful ability to not only shift data in but also latch it to the output pins indefinitely. On top of this, it features an 'Output Enable' pin which would allow for easy control over the flickering effect.

​

This meant I now had the following connections to the microcontroller:

​

  • An output feeding serial data to the shift register;

  • An output to clock data into the shift register;

  • An output to latch data into the output storage register;

  • An output to control the 'Output Enable' pin of the shift register;

  • An output to control the 'Enable' pin on the PSU module;

  • An input to detect the button being pushed (ON/OFF).

​

This neatly uses up every pin on 16F15313 and is probably the bare minimum in order to maintain proper control over all aspects of the circuit.

​

The next part will briefly go over the final schematic of the project although, to be fair, there is not a great deal to comment on, it mainly involves clipping together various ICs like jigsaw pieces (the eagle-eyed readers will have noticed a distinct lack of calculations throughout this project).

​

​

​

bottom of page