# Getting a Constant Signal from a Demultiplexer

#### azxsmorris

Joined Mar 18, 2023
11
So I have a circuit whereby a PWM signal is being sent to a demultiplexer, and the demultiplexer sends the signal to a MOSFET which takes it and allows a current to flow through the nixie tube. The higher voltage value in the original PWM signal, the more the nixie tube will light up. My issue is that the demultiplexer sends the PWM signal to seven different lines (proportional to each seven sine waves in the PWM), and it cycles through them. This makes it so only one nixie tube light at a time can be lit up, and it cycles so fast they all appear as “flashing” instead of a steady signal to each at all times (so they are all constantly lit but constantly changing respective to the PWM signal). I’ve tried researching elements and ways to help me with this but to no avail. The PWM wave ranges from values of 0V to 5V. Hoping somebody can help me think of a circuit idea or element to solve my problem.

#### crutschow

Joined Mar 14, 2008
34,408
Please post a schematic of what you have
Also the frequency of the PWM signal and the mux switching rate.

#### azxsmorris

Joined Mar 18, 2023
11

Using an Arduino to produce the PWM. Thus I believe the frequency is 490Hz since that’s standard. I can adjust the switching rate of the demultiplexer to any speed that the arduino can output. The line of output is determined by a combination of on/off signals from three arduino outputs (this is not shown in my drawing). Whenever the PWM outputs a different band, the Arduino Switches the demultiplexer output. The demultiplexer I am using is the CD4051 and the MOSFET I’m using the IRL-610A.

#### azxsmorris

Joined Mar 18, 2023
11
There’s some elements that aren’t shown like resistors and stuff but it works like described in original post.

#### crutschow

Joined Mar 14, 2008
34,408
Using an Arduino to produce the PWM. Thus I believe the frequency is 490Hz
Which such a low PWM frequency I don't see how it can be multiplexed fast enough to work for the seven lines.
I would expect you need a much higher PWM frequency and mux switching rate to get proper results.

For example if each output is sampled at a 100Hz rate, that gives 10ms / 7 = 1.5ms per mux sample.
For that I would think you would want at least 10 PWM cycles per sample, giving a PWM frequency of ≥7kHz.

#### KeithWalker

Joined Jul 10, 2017
3,090
The 1N13 nixie tube is designed to monitor a DC input voltage, not a strobed or PWM signal. To get your setup to work, you must somehow smooth out the PWM into a DC level and Store it (in a capacitor?) between the strobes.
I would tackle this problem in a very different way but I would need more information on your physical setup.
Are the displays remote from the signal source? If so, how far?
What exactly are the signals that are being monitored? How quickly do these signals change?

#### azxsmorris

Joined Mar 18, 2023
11
My setup works. It is taking in DC voltage. If I could submit videos on here I would show you it working, but for now you will have to take my word for it. I can adjust how much current the MOSFET allows through which in turn adjusts the light. The issue isn’t the nixie tube or powering it. It’s the demultiplexer. There are 7 different signals in the PWM wave and each one is a sine wave of varying values. Each one of the 7 signals is supposed to represented on a different nixie tube, for which 7 of them are connected. Hence the signal that is sent to each nixie tube after the demultiplexer is a sine wave. However, because it is switching in the demultiplexer alongside the values of the PWM, it flashes. Does that make more sense? I’ve tried using a capacitor and it didn’t work. I have a filter to help smooth out the wave already, I didn’t show it in my circuit elements because I’ve been tinkering and I just wanted to show you all the bones of how it works. I had the idea to use a capacitor to store energy so that energy could continue being conducted through the MOSFET (hence the light). However after calculations and trial, I realized the time elapsed between signal vs time allowed for charging the capacitor would not be enough to provide power continuously so to stop the flashing.

#### azxsmorris

Joined Mar 18, 2023
11
You’re probably right about the PWM frequency. Will look into it. I might be incorrect about the PWM frequency. Wish I could post a video of this easily on here to show you, but you’ll just have to take my word for it in that the nixie tubes light up to the corresponding value in the initial PWM wave. The issue isn’t them not recieving the signal. The issue isn’t even the demultiplexer being able to distribute the different signals across it’s seven outputs. I can demonstrate this easily on simple LEDS which can flash on and off cycling through when connecting them to the output of the demultiplexer instead of the MOSFET. The issue is that they flash. In terms of what speed this is done at? The speed can be adjusted to whatever speed ranges an Arduino can output and support for switching, which I don’t know what it is but it appears to be sufficiently high enough for what I need.

#### crutschow

Joined Mar 14, 2008
34,408
I do think you need a large resistor in series with the MOSFET gate with possibly a small capacitor from gate to source, to filter the PWM signal, and retain the average signal level between mux samples.
The correct RC value depends upon the PWM frequency.
The lack of that may be the cause of the flashing.

#### djsfantasi

Joined Apr 11, 2010
9,160
Here is a tutorial on using the Arduino PWM. It shows how you can change the PWM frequency to something that is different than the standard 490Hz. Theoretically you can generate any frequency up to 500kHz. I say theoretically because personally, I haven’t used this technique. It is accomplished by directly modifying the PWM registers. This can be done in an Arduino sketch.

seven different lines (proportional to each seven sine waves in the PWM), and it cycles through them.
I’m not sure what you mean here. An Arduino outputs a square wave on its PWM pins. The article suggests a triangle or sawtooth wave is possible also. Nowhere do I see anything about outputting a sine wave.

#### azxsmorris

Joined Mar 18, 2023
11
You’re correct. Pardon my lapse in terminology. A square wave!

#### azxsmorris

Joined Mar 18, 2023
11
How do you determine the correct RC value for a PWM frequency?

#### azxsmorris

Joined Mar 18, 2023
11

So here is a more detailed circuit of what’s actually happening. Tried a few different filters and capacitors where you see the scribble below the 1k resistor on the right.

But lets forget about all of that. This photo shows the focus of my issue. The PWM wave has 7 different square waves in it yeah? As each square wave goes through it [the demultiplexer], it changes output. Each output is the same. Imagine just a resistor and led series circuit on the other end. The LED will flash as it cycles through the various outputs. I want to eliminate the flashing. Does this help?

#### crutschow

Joined Mar 14, 2008
34,408
the correct RC value for a PWM frequency?
Note that resistor is in series with the capacitor between the MOSFET gate and source terminals.
It looks like you had the capacitor in series, which won't work.

#### azxsmorris

Joined Mar 18, 2023
11
So what I’m assuming is you’re suggesting this, which is what I’ve actually been trying (albiet not with these exact values). And yes, this filters the PWM. Again though, my issue is NOT the PWM. The PWM is not causing the flashing.

So imagine this as the PWM wave going into the Demultiplexer. The first square wave is sent to the first branch of the circuit. The second square wave to the second branch. And so on up through all seven output branches. Then it repeats and goes back to the first square wave. Whenever the first square wave is being transmitted, the light on the first branch is lit up according to that value. Whenever the second square wave is being transmitted, the light on the second branch of the circuit is lit up. However, look at all that time in-between. Every time the first square wave and first light is active, once it ends, it has to wait until all other 6 square waves have been transmitted before going again. During that entire length of time, the light is not active. Hence, it flashes. And it flashes every seventh square wave on the PWM. I wanted some ideas on how to eliminate the flashing. A circuit element or seperate circuit entirely I could implement to achieve such. Where it would hold the signal in that branch until a new signal comes and takes its place. It can deviate slightly, just so long as it is a constant.

#### KeithWalker

Joined Jul 10, 2017
3,090
What you are trying to do will not work, as you have seen. A different approach is necessary.
I will repeat my question from post #6
Are the displays remote from the signal source? If so, how far?

#### azxsmorris

Joined Mar 18, 2023
11
And yet I’ve seen somebody make it work.

This was their circuit. The only difference being they used an NPN transistor. I elected to use a MOSFET since my arduino cannot control current output but can control voltage output.

I am not sure what you mean by “remote”. I am using one wire and one 16 inch jumper cable to connect to each terminal of the nixie tubes.

#### crutschow

Joined Mar 14, 2008
34,408
The RC should hold the signal level from one pulse, until the next pulse arrives.
Don't know why it doesn't.
Isn't the mux output open-circuit when the pulse is not connected?

#### KeithWalker

Joined Jul 10, 2017
3,090
And yet I’ve seen somebody make it work.

View attachment 290119
This was their circuit. The only difference being they used an NPN transistor. I elected to use a MOSFET since my arduino cannot control current output but can control voltage output.

I am not sure what you mean by “remote”. I am using one wire and one 16 inch jumper cable to connect to each terminal of the nixie tubes.
The difference between the circuits is that in this one, the bases of the NPN transistors receive a DC voltage from the diode pumps which is proportional to the pulse width coming from the processor. This is amplified by the transistors and sets the bias voltage for the tube.
In you circuit, You are switching a MOSFET on and off with the pulses and that is putting pulses on the tube bias input which will just flash the tube on for the length of the pulse.
The Arduino outputs do not need to control current. They just need to supply PWM pulses to the diode pumps..