HV control chips

1,338 views
Skip to first unread message

Paul Andrews

unread,
Feb 21, 2017, 6:51:23 AM2/21/17
to neonixie-l
Hi,

I was following up on a discussion elsewhere which mention the HV5530 as a control chip for Nixie tubes. This has 32 outputs and 12V digital control, so it has some drawbacks. There are many other similar chips, in particular the HV3418, which has 64 outputs at 180V and 5mA, with 5V digital inputs. So, at least from that perspective, it looks like a very good match for driving 6 nixies.

I don't know enough to understand the rest of the data sheets for these devices, so I don't know how to determine their suitability for driving nixies. Can anyone help?

Thanks

gregebert

unread,
Feb 21, 2017, 11:57:12 AM2/21/17
to neonixie-l
Are you driving segmented tubes (like the 7971) ? If so, I would advise against the HV-series drivers because you will need several different segment-currents.

If it's a traditional 10-cathode nixie, where each numeral uses the same current, the HV devices work great. There's a variety of opinions about using drivers rated below the anode supply voltage. The legacy 74141, which is rated around 45V, has been used for nixies for years and it's suitability relies on the voltage-drop across a nixie.  While it's probably OK for bipolar (NPN) output drivers as long as the current is limited, it *definitely* is not OK to exceed ratings for MOS devices because it will cause destructive breakdown.

I looked at the HV3418 datasheet, and I dont think it will suffice for nixies because the spec value of the low output voltage at 5mA  load is 25V. If you are running from a +180V supply, the tube will 'see' less than 155V because of the voltage-drop on the anode resistor. The ability to run at +5V on the logic side may sound desirable, but the other specs in my opinion make this device unsuitable.

I cant say enough good things about the HV5530. I have a 14-tube clock w/ IN-18's that has been running for over a year now with zero issues. I used a level-shifter to drive the HV5530 inputs to 12V from my FPGA, which has 3.3V I/O's.  Instead of an anode resistor to set the segment current, I use a PMOS device to generate constant current.




Paul Andrews

unread,
Feb 21, 2017, 5:30:58 PM2/21/17
to neonixie-l
I am looking to drive regular Nixies. I am trying to figure out how to read those datasheets! There are a lot of variations on a theme with this family of chips. I had to think for a bit, but I get what you are saying re. low voltage - I have to keep reminding myself that low voltage == ON  (and I have to hit strike, not maintain) and high voltage == OFF! and that the current limiting resistor will drop the comparative voltage further.

I will go back and peruse the data sheets some more, though everyone seems to like the 5530. I looked at the HV5523, which also has 5V Vdd but a max of 220V output. However it also has a max low of 15V. I could use a current limiting resistor for this, but there is no specification of the min low, and I wonder if the comparative voltage could therefore vary between 220V and 205V? Just exploring possibilities at this point.

gregebert

unread,
Feb 21, 2017, 7:03:22 PM2/21/17
to neonixie-l
I took a quick look at the HV5532 datasheet, and the 15V output-low voltage is at 100mA, which is far more current than you will need for a nixie. The outputs will tolerate an anode supply of +220V, so that gives plenty of margin.

So, if you have an anode supply of +200V, you can calculate a rough value for your anode resistor from R = (Vcc-Vnixie)/Inixie  . Assuming Vcc=200, Vnixie=145, Inixie=4ma you get about 13K for the anode resistor. These are approximate values to get stated; you definitely need to bench-test the design and pick the appropriate resistor to maximize tube life. Tweak the anode resistor until you get the recommended anode current.  Be sure to use a large-enough power-rating for the resistor. In this example, the power is 220mW so I would use a 1/2W resistor, not a 1/4W.

Be careful driving in HV5532 from 3.3V logic levels. Per the datasheet, Vih (min) is 0.8*Vcc, or 4.0V. Technically, a logic signal from a 3.3V device will not meet spec. It might work in certain conditions, but I question it's reliability. I personally would not implement any design that violates spec, as it's an invitation for trouble even though it might 'work' under certain conditions.

Paul Andrews

unread,
Feb 22, 2017, 9:07:02 AM2/22/17
to neonixie-l
I'm slowly beginning to understand more, but on reflection I am clearly not understanding something. The HV5530 specs say output voltage is 0 - 300V. What sets that voltage? That might also be the wrong question, I am in the dark about how tying these 'outputs' to the cathodes actually works.

At some point I will buy a couple of different chips to play around with, which raises a whole other set of questions about how I would breadboard something with these chips.

gregebert

unread,
Feb 22, 2017, 11:40:51 AM2/22/17
to neonixie-l
The HV5530 is an open-drain (aka, open-collector) device, meaning that it can only pull it's output low. The voltage rating of 300V means that you can apply up to 300V at the output pin, and when that pin is off/disabled, the maximum current that goes into the pin is the spec'd leakage current, which is 10uA.

The way you would use it is to tie the anode lead thru a suitable resistor to the anode supply, which should be > 180V. The higher the anode voltage, the less-variation in tube-current due to aging and tube-to-tube variation effects. The downside is that at higher voltages you will waste more energy, as heat of course. Alternatively, you can design a simple PMOS-based current-regulator which allows you to run at a lower anode voltage (saves energy), and maintain constant current. I use this approach wherever possible on my designs. Each cathode is tied to an individual output pin of the HV5530; if you tie the POL & BL pins high, a cathode will be energized when the corresponding shift-register bit is a '1'.

If you are making a PCB board, I recommend layout out the board to eliminate signal crossovers, and use software to re-arrange the bits. There's no reason why bit0 needs to drive a '0' cathode, etc.

The HV5530 will not 'send out' 300V; there are other devices that have totem-pole (push-pull) outputs and they will drive high as well as low.

Lastly, be careful with timing on this device. Make sure you fully understand setup & hold requirements, and the control pins. There have been a few postings in this forum with problems that were encountered, and I'm certain they were the result of misinterpreting the datasheet.

Luka C

unread,
Feb 22, 2017, 2:28:20 PM2/22/17
to neonixie-l
If I may ask, what's the reason HV chips would not be suitable for driving segmented tubes like the B7971? Is there some device specific "glitch" when multiple cathodes are enabled and current flowing trough each one is different? Of course, suppose we put the appropriate resistor between the each output pin of the HV chip and the pin of the segment of the B7971 tube.

gregebert

unread,
Feb 22, 2017, 3:08:04 PM2/22/17
to neonixie-l
Given the high cost + rarity of b7971 tubes, I would only recommend a current-regulated driver for each segment. Using individual cathode resistors will limit the current, but it's not well-regulated and will vary tube-to-tube and with age. Yes, the HV5530 will work, but I would be concerned about reduced tube life.

Also, I would not multiplex these tubes because the brightness will be reduced. Boosting the current to compensate for this will likely exceed the datasheet limits and shorten tube life. In fact, driving all segments of a b7971 tube at their rated current at the same time will exceed the spec limit for maximum anode current. So, along with limiting the current on each segment, you should also have a current-limit for each anode.

I spent a lot of time gathering & analyzing data on my 7971 tubes to get a tradeoff between segment-current, max-current, and brightness.

I know it sounds like overkill, but a few extra $ for components to protect a $100 tube is well worth it. Besides, I had a lot of fun designing and simulating the driver circuitry.

The HV series drivers aren't necessary for current-regulators; you can use TTL or LVTTL shift-registers (74HC595) to control the driver transistors (PMBTA42DS).

I haven't had the time to fab the PCB for my 7971 tubes yet; once I get the board running I'll post schematics. Just too doggone busy with my day job.....

Luka C

unread,
Feb 22, 2017, 5:00:50 PM2/22/17
to neonixie-l
Thanks for the response.

I wasn't thinking of multiplexing anyway exactly for the reason of excess currents, I only implement direct drive in my designs :)

But what I wanted to ask is, I only saw these constant current regulators operating as for example, LM317 (http://diyaudioprojects.com/Technical/Current-Regulator/Precision-Current-Limiter-Schematic-Circuit-LM317-LM338-LM350.png)..so would this have to be implemented in series of each cathode?

gregebert

unread,
Feb 22, 2017, 5:34:26 PM2/22/17
to neonixie-l
Current-regulators are very simple to implement: NPN transistor with emitter resistor. Though you can use NMOS devices, they have a Vgs(on) of several volts, so they need to be driven from a higher voltage, around +10V, otherwise minor variations in Vgs (it's temperature-dependent, and varies device-to-device) will cause unacceptable variations in current.

The current causes a voltage-drop across the emitter resistor, which gives the required negative feedback.

The current is set by  (Vsupply-0.7)/Isegment   . This assumes the beta of the transistor is "large", say > 40 and Vbe is 0.7V .
For example, if you have +3.3V driving logic, and you want 4mA segment current, the resistor would be about 650 ohms. I use a spreadsheet and factor-in resistor-tolerance, voltage-supply variation, and normalize to a standard resistor value to fine-tune the current.

In this example, if the supply were to increase 3% from 3.3V to 3.4V, the current would increase 4% to 4.15mA. The current is independent of the tube's voltage drop (unless your anode-supply voltage is very close to the tube's voltage-drop).

Now, compare this to an unregulated driver that runs at +180V. If your tube-voltage-drop is nominally 140V, a 10K resistor will give you 4mA. But if the tube ages, or you replace it with another one, and the voltage drop increases 4% to 145V, your current will drop 13% to 3.5mA which may be an undesirable reduction in brightness.

SWISSNIXIE - Jonathan F.

unread,
Feb 23, 2017, 7:12:43 AM2/23/17
to neonixie-l
The HV5530 works well with normal nixie tubes (not B7971). You also could use HV5122/5222 (cheaper), they are 200V rated, but thats enough for nixies. Yes these chips need 12V supply and logic, but people have reported that they work with 5V logic signals. I have used a level-shifter.

I use HV5122 in my current project:

See here... "Level Shifting" is translating 5V to 12V logic level.
The ST66 chip can producte 12V 30mA from 5V, if there is no 12V available.

Luka C

unread,
Feb 23, 2017, 11:24:55 AM2/23/17
to neonixie-l
So you're thinking of something like the picture I attached?

Just two more questions I'd like to ask,

1) Wouldn't this still need some way of limiting the total current flowing trough the anode in specific cases when it exceeds the maximum defined by the tube's datasheet? I believe you referred to it in some earlier post already.
2) What do you think about the overshooting current that spikes once the cathode is activated? Looking trough the constant current sink schematics on the internet, I saw quite a few graphs indicating this problem when the current sometimes overshoots quite a lot before it stabilizes. Of course, the stabilization period is not necessarily long but could it still cause life reduction of the tube since over the lifetime of the clock, you will still switch cathodes a number of times (I'm referring to direct drive here)?
Cathode.png

Paul Andrews

unread,
Feb 23, 2017, 12:24:08 PM2/23/17
to neonixie-l
My PV electronics IN-8-2 and my GRA&AFCH IN-14 clocks both use the HV5812. This specifies 80V 'output'. I assume this works because the off tube cathodes drift up to 80V, which is enough to turn them off?

gregebert

unread,
Feb 23, 2017, 1:21:36 PM2/23/17
to neonixie-l
That's the driver topology I use, except I omit the zener diode (good idea, though, for NMOS) and the base resistor because I dont see a hazard without them. If there is a power-on transient that occurs when the HV supply is energized (very unlikely, because the HV DC filter cap would need to be missing/open) , it would be a positive voltage-spike and the worst it could do is cause the driver NPN to turn-on briefly. More-likely, any leakage from collector-to-base would bleed-away thru the ESD network on the driving logic; the charge would be very small, perhaps negligible, because it would be whatever leaked from the collector of the driver NPN to the base (this is a reverse-biased junction). Regardless, there still is current-limiting because of the emitter resistor.

I'm not aware of any mechanism that would cause a current-spike thru the tube at turn-on. When the logic goes to '1', the transistor will turn on rapidly, and it may actually saturate because the tube itself requires several microseconds to ionize. During this time the base-current will be at it's maximum (the target tube current). As the tube ionizes, it's current will go thru the transistor and the negative feedback at the emitter will gradually reduce the base-current from the logic. There's definitely a current-spike from the driving logic as the tube stabilizes, but it's only a few mA. You could add a series base-resistor to reduce the peak base-current, but if you check the datasheet for the transistor it's very likely the max base-current spec is much higher, making the resistor unnecessary. Unless I'm really missing something, I dont see where current thru the tube will spike at turnon or turnoff.

As far as a current-spike at tube turnon/turnoff, yes there will be some Ldi/dt and 1/2LI^2 effects, but they will be small because we're dealing with milliamps. For example, if you are switching 5mA off in 10nsec, and there is 1uH of wiring inductance, the voltage spike (Ldi/dt) is 0.5 volts. [ Imagine if this was a motor controller with a 50 amp load.....ouch!... but there are circuit techniques to deal with that ].

gregebert

unread,
Feb 23, 2017, 2:45:01 PM2/23/17
to neonixie-l
I quick-glanced the HV5812 datasheet, and it's a push-pull driver, meaning that it drives-out approx 0 volts to turn the tube on, and 80V to turn the tube off. Even though the anode supply is significantly higher than the 80V rating of the HV5812 device, it's OK to do this because any leakage thru the nixie tube is clamped to around 80V by the ESD circuitry in the HV5812. As long as the tube's extinguishing voltage is greater  than (Anode_supply_voltage - Driver_high_voltage), this clever driver trick will work nicely.

This is not the same situation with open-drain (aka open-collector) outputs, which have no clamps for positive voltage. Theoretically a tube could 'leak' a small current and drive the pin above it's rated limit. Not usually a problem for bipolar devices, but it will destroy a MOS device, which is why I dont recommend exceeding the datasheet parameters.

SWISSNIXIE - Jonathan F.

unread,
Feb 24, 2017, 3:20:55 AM2/24/17
to neonixie-l
The PV electronics driver IC is clamped via a Zener

http://www.pvelectronics.co.uk/kits/qtc/qtc_v10a.pdf  page 58 and 59

Paul Andrews

unread,
Feb 24, 2017, 8:32:22 AM2/24/17
to neonixie-l
Well there's a lot to think about there. I'm looking to build an IN-18 clock and a battery powered Z5900 6 tube clock, and I have some IN-8-2s I just want to mess around with, and I want to light up the decimal points too. Obviously they all have different needs - especially the Z5900 and IN-18 clocks!

I have some K155ID1s I want to play with, and I feel like I need to build a breadboard adaptor for a HV5530/HV5522/HV5812 (but which to start with!?). The purist in me wants to have a constant current source too, but I may delay that until I think I know what I am doing with a simpler setup. For the Z5900 clock, efficiency will obviously be a primary concern.

BTW I read back over some of the other postings on this topic too.

SWISSNIXIE - Jonathan F.

unread,
Feb 24, 2017, 10:51:17 AM2/24/17
to neonixie-l
No need to build an breadboard adapter - just look up on ebay for " plcc44 adapter" or "plcc44 to dip"

most of the microchip/supertext hv-series work the same

1 line for clock
1 line for data
1 line for "set data to outputs" / latch
and some have a "blanking" or "all on" pin

but basically these are all just shift registers similar to a 595 register. they are pretty easy to programm.
I can supply an arduino example how to drive them.


For the 5900 tubes i maybe would consider multiplex

gregebert

unread,
Feb 24, 2017, 11:42:44 AM2/24/17
to neonixie-l
For the battery-powered clock, I'd suggest 2 separate batteries. A coin-cell for the timekeeping chip, such as DS3231, and another battery that handles everything else. There are some DC-DC converters on Ebay that might work for the nixies; no idea about quality or efficiency but for $7 US  you can afford to experiment. 3.7 V Li-ion might be a good starting point for your main battery; lots of choices (size, capacity) at low-cost thanks to smartphones.

FYI, my nixiewatch debug board has been running for 2 years now on the same battery (a worn-out cellphone Li-ion), with it's initial charge, and it still has the correct time. Those RTC chips are very stingy on power, and very accurate.

I'm doing a different twist on the battery-powered clock. It will have a 12V sealed lead-acid battery, and a dynamotor I salvaged in the 1970's. Noisy, big, heavy, inefficient, and spectacular show-off item.

Paul Andrews

unread,
Feb 24, 2017, 1:48:42 PM2/24/17
to neonixie-l
Wow! Too much choice! I have bought one (and an extraction tool). Just need to buy the chips and level converter now!

Luka C

unread,
Feb 26, 2017, 3:14:48 PM2/26/17
to neonixie-l
I have spent a day or two looking for a final solution and found something I honestly didn't know existed. Although they seem rare, there are so called current limiting diodes (CLD) which you can pretty much put in series with a load and they'll limit the current trough it and keep is stable as voltage changes across them. 


https://www.centralsemi.com/PDFs/selection/leaded/CLD_Standard.pdf

I wonder if choosing an appropriately rated one (current limit) for each cathode and placing it between the cathode and the HV chip would provide a nice constant current sinking scheme with a reduced component count? They also seem to specify peak operating voltage @ 100V (I guess this is the maximum voltage that can be put across the device? Should be more than enough since it would typically see cca 30-40V?), and maximum limiting voltage (so, this should be the maximum voltage drop that the diode will take onto itself while conducting current?)

gregebert

unread,
Feb 26, 2017, 5:15:25 PM2/26/17
to neonixie-l
Nice find!!!  I've never heard of these devices before.  Should work exactly as you mentioned. I dont see them at DigiKey, but I do see a nice selection at Mouser.

Terry S

unread,
Feb 26, 2017, 7:38:01 PM2/26/17
to neonixie-l
These are interesting devices. I've used that exact circuit dozens of times for constant current sources... never knew it existed as a discrete 2 terminal component.

Terry

David Forbes

unread,
Feb 26, 2017, 7:39:35 PM2/26/17
to neoni...@googlegroups.com
Luka,

This part works by increasing the voltage drop across itself until the
current is as low as its design current. Therefore, it needs the ability
to do this, which means that the device that it controls needs to be
able to respond appropriately.

A Nixie tube is a constant-voltage device, so it will have the same
voltage across it, independent of the current flowing. This means that
the Nixie tube is a very poor load for such a two-terminal
constant-current device.

I would recommend using a voltage-dropping resistor instead. It is known
to work properly.

On 2/26/2017 1:14 PM, Luka C wrote:
> I have spent a day or two looking for a final solution and found
> something I honestly didn't know existed. Although they seem rare, there
> are so called current limiting diodes (CLD) which you can pretty much
> put in series with a load and they'll limit the current trough it and
> keep is stable as voltage changes across them.
>
> https://sub.allaboutcircuits.com/images/05269.png
>
> https://www.centralsemi.com/PDFs/selection/leaded/CLD_Standard.pdf


--
David Forbes, Tucson AZ

Luka C

unread,
Feb 27, 2017, 10:12:13 AM2/27/17
to neonixie-l
Thank you for the suggestion.

But shouldn't this device, after the initial "setup" of the voltage across itself and the current flowing trough remains mostly on the same voltage drop? And since the maximum voltage drop that's specified in the datasheet is cca 4.5V, shouldn't (anode voltage - nixie tube voltage drop = 30V) this leave enough margin for the "diode" to absorb changes while allowing the tube to maintain constant voltage drop across itself?

gregebert

unread,
Feb 27, 2017, 12:32:10 PM2/27/17
to neonixie-l
I see no reason why it wouldn't work; the voltage-drop across the diode will vary as needed to limit the current. This is the typical behavior of a current source; even a resistor behaves somewhat in this manner.  The datasheet states the device can handle 600mW, so if you are running at 6mA or below, you wont have a thermal problem as long as the POV spec (100V) is followed. 

Regarding constant voltage across the nixie tube, it's a consequence of how it operates. You want to limit the current to the datasheet spec; this can be done with a resistor or a current-source. Whichever approach you take is a matter of choice; I prefer current-limiting because it gives tighter control and can be more energy-efficient.

Glow tubes have a nonlinear I-V curve that becomes steep after ionization, which means that a small change in voltage will cause a large change in current. Even LED's behave this way. That's why you can't just drive them from a constant voltage, like an incandescent bulb; there needs to be something to limit the current.

If you still feel nervous, test it out with a spare or expendable nixie tube (IN-1's are cheap...). Just make sure the diode is installed correctly; if it's backwards...bye bye nixie.....Unfortunately the datasheet doesn't show the test-circuit, which is unusual.

Luka C

unread,
Mar 23, 2017, 12:26:48 PM3/23/17
to neonixie-l

Small update:

After some further research, I've decided that those current limiting diodes are a bit too expensive for the clock (6 x 15  = 90 diodes). I've implemented a current source using a depletion type MOSFET along with a resistor like in the attachment, I'll test it out and see how it works. Since these types of MOSFET have some margin in the Vgs between batches (apparently the Vgs is written on each reel), I'll adjust the resistor size after purchasing a lot of them first.
CathodeCurrentControl.png

gregebert

unread,
Mar 23, 2017, 3:20:16 PM3/23/17
to neonixie-l
Should work, but be careful about Vgs(on) variations, because they will directly impact the current.

I use a similar approach, but it's a PMOS, and I put a bias on the gate with an isolated 12V DCDC converter --> pot (so I can adjust current). The bias reduces the effect of Vgs(on) variation.  BTW, the DCDC converter and the pot gives me an adjustable 0 to -12V (relative to the anode supply), that is tied in-common to all of the anode-current regulators.

Paul Andrews

unread,
May 15, 2017, 1:19:23 PM5/15/17
to neonixie-l
Hi,

I know its been a while since I opened this thread, but I finally have had a chance to play with one of the supertex chips - the HV5522. Naturally, it isn't working out too well at the moment! I am trying to drive it with an Arduino Uno. Firstly, I tried just using the 5V levels directly (yes, I know), just to get some life out of it. It didn't really work in that the results weren't what I was expecting - I am using some LEDs as test objects. They light up but, not when I expect them to. Could be my software. Could be the levels. I guess it could be both. So I tried to use a level shifter I had (a MC14504B), and I am seeing some weird outputs from it. Essentially the LE signal is being shifted as I would expect, 0 in goes to 0 out, 5 in goes to 11 (because my Vdd is around 11V) out. However the clock and data are not being shifted the same way. They are: 0 in is shifted to 6 out, 5 in is shifted to 11 out. I have tried swapping the pairs of LE with, for example the pair of CLK, but I still see the same behavior. I tried adding 100K pull-down resistors to the CLK and DATA outputs, but that had no effect. Is the HV5522 pulling the 0V up to 6V somehow?

Here is a screenshot of my old Tektronix oscilloscope - literally I took a photograph of it, I cleaned the screen up a bit for its photographic debut! It shows DATA and LE. I set the bases at different levels, DATA is channel 1, LE is channel 2:



On Tuesday, February 21, 2017 at 6:51:23 AM UTC-5, Paul Andrews wrote:
Hi,

I was following up on a discussion elsewhere which mention the HV5530 as a control chip for Nixie tubes. This has 32 outputs and 12V digital control, so it has some drawbacks. There are many other similar chips, in particular the HV3418, which has 64 outputs at 180V and 5mA, with 5V digital inputs. So, at least from that perspective, it looks like a very good match for driving 6 nixies.

I don't know enough to understand the rest of the data sheets for these devices, so I don't know how to determine their suitability for driving nixies. Can anyone help?

Thanks

John Rehwinkel

unread,
May 15, 2017, 4:41:23 PM5/15/17
to 'Grahame' via neonixie-l
I'm not sure what's going on there, looks like maybe a shared ground isn't connected right?  I hope your HV5522 isn't messed up somehow.

That's a digital scope, you should be able to get a screen dump out of it.  I do that with mine:


- John

Terry S

unread,
May 15, 2017, 4:58:22 PM5/15/17
to neonixie-l
Some of the early scopes only wrote to floppy....

SWISSNIXIE - Jonathan F.

unread,
May 15, 2017, 5:43:10 PM5/15/17
to neonixie-l
Could you test "All on/All off" which does not need any data or clock? See 3rd page of the datasheet. This should always work, otherwhise the chip might be defective.

If you want, i can provide an arduino code that should work with this chip. I use the hv5122 and 52222 which operate quite the same. You would only have to take care with the POL pin. But that should be easy.

Paul Andrews

unread,
May 15, 2017, 6:27:16 PM5/15/17
to neoni...@googlegroups.com
I'll check all the connections again. It is very weird.

I'll check the all on thing too, though I have another chip I can put in. Some known working Arduino code would be great Jonathan.

And yes. This scope writes to 3.5" floppies. It was a bargain though - it was free - and is much better than my teeny digital scope. Way easier to operate!

> On May 15, 2017, at 5:43 PM, SWISSNIXIE - Jonathan F. <jfre...@gmail.com> wrote:
>
> Could you test "All on/All off" which does not need any data or clock? See 3rd page of the datasheet. This should always work, otherwhise the chip might be defective.
>
> If you want, i can provide an arduino code that should work with this chip. I use the hv5122 and 52222 which operate quite the same. You would only have to take care with the POL pin. But that should be easy.
>
> --
> You received this message because you are subscribed to a topic in the Google Groups "neonixie-l" group.
> To unsubscribe from this topic, visit https://groups.google.com/d/topic/neonixie-l/S1oX30hLrmw/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to neonixie-l+...@googlegroups.com.
> To post to this group, send an email to neoni...@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/neonixie-l/fec68464-522f-44a9-bca1-a7d897935a4f%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

gregebert

unread,
May 15, 2017, 8:26:57 PM5/15/17
to neonixie-l
Based on the time-delays, the scope trace is showing 2 different signals at the level-shifter, not input & output of the same bit.
Double-check the control bits; it's very easy to make a mistake with POL, BL, and LE.

Paul Andrews

unread,
May 15, 2017, 8:56:56 PM5/15/17
to neonixie-l
This is, of course, embarassing. I had wired blanking high. When I pull it low the signals are what they should be. Of course, it still isn't behaving as I want it to, but at least I have made some progress...

Paul Andrews

unread,
May 15, 2017, 9:35:50 PM5/15/17
to neonixie-l
And, of course, way worse than that. I bought a 44PLCC breadboard adapter off ebay. It only has 40 pins. I assumed that it had dropped the last 4. However, it had actually dropped the middle pin of each side, which is to say pins 1, 12, 23 and 34. Pin 23 is right in the middle of all of the control pins. It is actually clock. So, lesson learned.

Its a good job I don't mind embarassing myself in public.

Paul Andrews

unread,
May 15, 2017, 10:53:55 PM5/15/17
to neonixie-l
Finally success! After wiring the right connections to the right signals I finally got it working as I wanted. A 0 bit is off, a 1 bit is on. POL is pulled high and BL is pulled high. I can blank the tubes (leds ATM) by pulling BL low, or dim them by using PWM.

Here is some code for the Arduino (uno). CLK is connected to pin 13 (SCK), DATA IN is connected to pin 11 (MOSI) and LE is connected to some output pin. Pin numbering in the comments is for the PLCC package:

void display() {
SPI.beginTransaction(SPISettings(SPI_CLOCK_DIV2, MSBFIRST, SPI_MODE1));

        // Output alternating on and off. Highest output is transfered in first
SPI.transfer(0xAA); // HVout 32 through 25 = pins 17 through 10
SPI.transfer(0xAA); // HVout 24 through 17 = pins 9 through 2
SPI.transfer(0xAA); // HVout 16 through 9 = pins 1 and 44 through 38
SPI.transfer(0xAA); // HVout 8 through 1 = pins 37 through 30

digitalWrite(LEpin, HIGH);    // Transfer data from shift register to latches.
digitalWrite(LEpin, LOW);     // Latch data

SPI.endTransaction();

SWISSNIXIE - Jonathan F.

unread,
May 16, 2017, 8:06:35 AM5/16/17
to neonixie-l
Glad you made it work! :)

Here is my version for the HV5122/HV5222 - note this has no "POL", but since POL is static as BL, it is not a problem of code.

My code takes care of 2 chips, and uses standart hardware pins, i had to get rid of "digitalWrite()" since its to slow.


//*********************************************
#define thePort PORTD //define Hardware port where Shift-Registers are connected
#define DATA PD5 //define Dataline
#define OE 6 //define latch pin
#define CLK PD7 //define clockline

void setOutputs(unsigned long val_one, unsigned long val_two) { //Function to shift out 2 x 32bit fast enough to prevent flicker!

// ------------WARNING!--------------------
// This functions operates directly on ports, not via digitalWrite()
// because digitalWrite() would be to slow, and display would flicker
// if different pins are used, you maybe hav to change the variable "thePort"
// to the matching I/O port letter of the controller!

digitalWrite(OE, LOW); //Disable Outputs to prevent flicker

//Send first 32-bit variable value

for (int i = 0; i < 32; i++) {
thePort &= ~_BV(DATA); //Data LOW
if ( bitRead(val_one, i) == 1) {
thePort |= _BV(DATA); //Data HIGH
}
thePort |= _BV(CLK); //CLK HIGH
thePort &= ~_BV(CLK); //CLK LOW
}

//Send second 32-bit variable value
for (int i = 0; i < 32; i++) {
thePort &= ~_BV(DATA); //Data LOW
if ( bitRead(val_two, i) == 1) {
thePort |= _BV(DATA); //Data HIGH
}
thePort |= _BV(CLK); //CLK HIGH
thePort &= ~_BV(CLK); //CLK LOW
}
digitalWrite(OE, HIGH); //Enable Outputs

}

Paul Andrews

unread,
May 16, 2017, 12:14:14 PM5/16/17
to neoni...@googlegroups.com
Shouldn't you take OE low immediately after taking it high? The data sheet states that it is a pulse rather than it existing as a state for a long period of time. Taking it high copies the state from the shift registers to the latch. Taking it low latches the data. 
--
You received this message because you are subscribed to a topic in the Google Groups "neonixie-l" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neonixie-l/S1oX30hLrmw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neonixie-l+...@googlegroups.com.

gregebert

unread,
May 16, 2017, 12:22:29 PM5/16/17
to neonixie-l
LE does the data-transfer

Paul Andrews

unread,
May 16, 2017, 12:40:55 PM5/16/17
to neoni...@googlegroups.com
Just read the datasheet for the HV5122/HV5222. They are quite different than the HV5522, at least in terms of how the data is latched, hence my confusion. In the HV5122/HV5222 you have to disable the display while you update it, which is what Jonathan is doing. With the HV5522 you can update the shift register with the display active. It won't display it until you latch it. 

On May 16, 2017, at 12:22 PM, gregebert <greg...@hotmail.com> wrote:

LE does the data-transfer

--
You received this message because you are subscribed to a topic in the Google Groups "neonixie-l" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neonixie-l/S1oX30hLrmw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neonixie-l+...@googlegroups.com.
To post to this group, send email to neoni...@googlegroups.com.

SWISSNIXIE - Jonathan F.

unread,
May 16, 2017, 2:15:27 PM5/16/17
to neonixie-l
Oh, sorry for my fault! I didn't see that.

But since the HV5522 says "low-to-high" transition, i would say its irrelevant when you put the pin low again, since the change is relevant, but it would be easy to change the code, just move the line where OE gets low down there...

Paul Andrews

unread,
May 16, 2017, 2:59:06 PM5/16/17
to neoni...@googlegroups.com
The datasheet says:

Transfer of data from the shift register to the latch occurs when the LE (latch enable) input is high. The data in the latch is stored when LE is low. 


On May 16, 2017, at 2:15 PM, SWISSNIXIE - Jonathan F. <jfre...@gmail.com> wrote:

Oh, sorry for my fault! I didn't see that.

But since the HV5522 says "low-to-high" transition, i would say its irrelevant when you put the pin low again, since the change is relevant, but it would be easy to change the code, just move the line where OE gets low down there...

--
You received this message because you are subscribed to a topic in the Google Groups "neonixie-l" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/neonixie-l/S1oX30hLrmw/unsubscribe.
To unsubscribe from this group and all its topics, send an email to neonixie-l+...@googlegroups.com.
To post to this group, send email to neoni...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages