VFD multiplexing. - Page 1
Forum section: electronics / projects

author: neo
author_rank: Super Contributor
timestamp: August 07, 2017, 07:10:08 pm
content: I have an idea, it probably sucks but hear me out, I have lots (a dozen or so) of old muxed VFDs that i want to use but have yet to really think of a reasonable way yet since i am awful at programming.So i got an idea, just for learning or one offs not practical on a mass scale, the max 7219 readily available with 8*8 LED matrix modules and it is common cathode soin theorythe only thing i would have to do is add the circuit(pictured below)and at most make a few tweaks to the program.If i can make if work and interface the LED, which i should be able to since there are videos on that, then i can add the transistors and interface a VFD up to 8 digits with 7 segments and a dp to each digit. Also yes i know it is common cathode so it uses negative to activate each led digit but that is a problem easily solved with a logic inverter and then transistors.http://www.ebay.com/itm/MAX7219-8-Digital-Segment-Digital-LED-Display-Tube-Arduino-51-AVR-STM32-/272678447709?hash=item3f7ce6ea5d:g:oFMAAOSwurZZHqvWSo my idea, in summary, is to take an led module like that, which is available cheap, learn to use it as is and then take that knowledge and begin learning to interface it to a VFD. VFD multiplexing is after all the same concept as LED multiplexing, only with a higher voltage level needed and my transistor circuit, pictured below, does work. I also happen to have a few hundred high voltage transistors, both PNP and NPN, laying around.Any obvious problems i missed?

author: floobydust
author_rank: Super Contributor
timestamp: August 08, 2017, 02:56:49 am
content: There are different types of VFD - direct drive and muxed which has control grids. Using one-digit VFD's I don't see a control grid on them.Which are you thinking about driving?TheIce Tube Clockused MAX6921 to drive 8-digit VFD.I think it's an alright idea to add HV buffers to LED driver IC's.The 5k output resistor is too small, it can be much larger 100k it only has to deal with leakage current.https://www.noritake-elec.com/technology/general-technical-information/vfd-operation

author: neo
author_rank: Super Contributor
timestamp: August 08, 2017, 03:15:13 am
content: Quote from: floobydust on August 08, 2017, 02:56:49 amI am talking about the types of VFDs like what you would see in microwaves, stereos, dvd palyers and a lot of other stuff.Just to sum up what i have on hand, i have everything from simple 4 digit up to a 12 digit display from a calculator and even some fancy ones from a stereo.Yes the russian tubes also are on that list, pretty much any VFD with more than a digit is multiplexed and those are the types for which i need a way to drive them.What i find the most appealing aspect of my idea is that the driver itself is as common as it is WITH information readily available.EDIT:My only problem with the 6921 is the lack of videos directly about it, between that, the lack of a library for it and the cost of it it just doesn't seem like a good place to start learning SPI. As i implied i am about as good at writing my own code as a frog, i even have trouble making libraries work sometimes.Alot of my problems with making things work might not even be problems if not for my love of obsolete/weird technology.

author: Ian.M
author_rank: Super Contributor
timestamp: August 08, 2017, 05:57:21 pm
content: Reasons to use a SPI display chip that does its own multiplexing:My controller is running an OS that does not guarantee realtime SPI transfers so the display will flicker if I do the multiplexing on the controller.My SPI peripheral is tied up for longer than 1/(frame_rate*N_digits_per_display) doing bulk transfers I cannot interrupt.My controller is too slow to be capable of updating all digits in the time 1/(frame_rate*N_digits_per_display).I need extra features like individual character or digit brightness control.The display must freeze with the last data still displayed if the controller is reset.(1) applies to driving it from something like a Raspberry PI or bitbanged from a PC printer port.(2) may apply if you are doing data-logging to a SD card on Arduino.(3) would be VERY rare - its possible when driving a large number of cheap LED displays, but the prohibitive cost of VFDs and their support circuits make it vanishingly unlikely that you'd have enough to run into the limit even if your controller is a PIC at 1MHz.(4) is a valid reason but will push you towards expensive high end display chips, and (5) is a show-stopper that forces you to use a multiplexing display chip.A simple SPI shift register + level translating driver chip is almost always cheaper so when none of the above apply using a fancy display multiplexed display chip only because you cant be arsed to learn to code your own multiplexing is just intellectual lazyness . . . . (or pure desperation with only a couple of days left to the project deadline!)

author: neo
author_rank: Super Contributor
timestamp: August 08, 2017, 07:14:57 pm
content: Following my understanding, it can multiplex 8 digits with 8 characters per digit and all i have to do is tell it what to light up in the program. For the program i have libraries, the chip is cheap and i tried using an spi shift register before i couldn't make it do anything. At all.

author: Ian.M
author_rank: Super Contributor
timestamp: August 08, 2017, 07:34:11 pm
content: Quote from: neo on August 08, 2017, 07:14:57 pmIf you couldn't at least toggle the outputs of a SPI shift register, your chances of doing anything other than curse at a MAX7219 are minimal. Its got five control registeres that have to be configured to get it to do what you want which is a lot more complex than sending N bits for the required number of pins to a SPI shift register then pulsing its Load pin high.

author: neo
author_rank: Super Contributor
timestamp: August 08, 2017, 07:36:18 pm
content: Quote from: Ian.M on August 08, 2017, 07:34:11 pmBut there are libraries for the MAX7219. What am i meant to do? Give up and smash the displays just because i am near useless with micro-controllers?

author: Ian.M
author_rank: Super Contributor
timestamp: August 08, 2017, 08:06:25 pm
content: IIRC we've discussed driving multiplexed VFDs off pure logic before now. No SPI involved at all, just a job lot of latches with tristate outputs, a sequencer to step through them enabling one to provide the data for one digit at a time, a decoder for the character or digit patterns and a job lot of HV drivers.. I've also posted Arduino code that multiplexes up to 8 seven segment digits via two 74HC595 SPI-compatible shift registers.You probably bit off more than you can chew. Simply trying to flash a single LED connected to one of the shift register output pins would be a good start. Yes you could try jumping straight to the MAX7219 using libraries to drive it, but if (more likely 'when') it doesn't work, you will be absolutely stuck. That's the problem of using other people's packaged libraries you don't understand. Your code is then all 'monkey see monkey do' with the worst elements of 'cargo cult' programming, and doesn't actually teach you anything.Its remotely possible you are one of the small proportion of the population that has a negative aptitude for casual logic and thus for procedural programming, but most people with that sort of problem don't do too well with the complexities of using the internet so are unlikely to be asking for help here. Everyone else (not suffering from a diagnosed cognitive deficit) can learn to code, and whether or not they become adequate depends on the effort they put in building their way up from the absolute basics. OTOH its generally reckoned that less than 1% have the aptitude to become a great programmer - of the level that founds a technology company or launches a game-changing open source project so don't beat yourself up because you are not the world's next Linus Torvalds

author: neo
author_rank: Super Contributor
timestamp: August 08, 2017, 08:14:04 pm
content: Quote from: Ian.M on August 08, 2017, 08:06:25 pmThe thing is, i don't care about programming. All i want is to make a display work, programming comes along as a side effect of that.Basic logic i am OK at, never could make 7400 series work the inputs being floating high and all. 4000 series i am pretty good at as evidenced by my VFD clock.Also for what it is worth i do have a couple mental deficits, not worth elaborating on.

author: Ian.M
author_rank: Super Contributor
timestamp: August 08, 2017, 08:46:46 pm
content: Fair enough. Its probably not worth pushing ahead with *ANYTHING* SPI based that requires a MCU to control it if programming is, to you, at best a detested chore and at worst a snakepit that impacts your quality of life till you get out of it. The extra costs of building everything in pure hardware may be acceptable.Alternatively there is no shame in commissioning someone else to write the code for you, (we cant all play 1st violin in the orchestra) but its essential to agree a firm specification, agree on deliverables and deadline, and the price and payment schedule for the project as specified, rates for any specification changes or further work and discount or penalties for late completion before work starts.Also, if you've got someone local who can (and is willing to) help you hands on with an Arduino + MAX7219, that's a good third alternative, but you'll owe them major favour points up to and including a full cook-out with all beverages included for them and their family, and its advisable to look at some of their own projects to check their skills before committing to too much time or more than a beer or two.If I haven't totally put you off the idea, I *ASSUME* you are still thinking of going down the Arduino based road with this - If so you'd do well to buy an off the shelf MAX7219 board with seven segment LED displays on it from a reputable supplier, and get demo code from the same supplier so you have got known working hardware to test your code on and known good code to start from for the 'bare chip' MAX7219 =>VFD board you are proposing to build.I always found 7400 series easier than CMOS as its not generally fussy about ESD when prototyping and unless you were doing high speed stuff you could get away with letting unused gate inputs float high for the first proof of concept then add a proper pullup tied to all the unused inputs on that package before moving to the next stage. OTOH CMOS requires you to tie *EVERY* gate input to a valid logic level *EVERY* time . . . .

author: neo
author_rank: Super Contributor
timestamp: August 08, 2017, 09:28:23 pm
content: Call me stubborn, but i am going to get a VFD working even if i have to use 4000 series logic to do it.

author: neo
author_rank: Super Contributor
timestamp: August 08, 2017, 09:46:16 pm
content: Quote from: Ian.M on August 08, 2017, 08:46:46 pmWhen it comes to cmos having to tie them high doesn't both me in my clock i actually used every single gate in all the chips.Also you may want to beat me with a stick but i used a library and got the 74HC95 working on arduino.

author: Ian.M
author_rank: Super Contributor
timestamp: August 08, 2017, 09:51:13 pm
content: GOOD!I'll save thebeatdown for anyone that is pushing you too far outside your comfort zone on the coding side of things, though stretching your skills a little bit each time is a *GOOD* *THING*Assuming you want parallel data input in BCD or HEX for a seven segment display, you'll need a 4 bit latch for each digit, (or 8 bit for an ASCII 14 or 16 segment display) with tristateable outputs, a clocked counter with N decoded outputs (where N is the number of digits) to select one digit and one latch chip's outputs at a time, a segment pattern generator - either a BCD to 7 segment decoder, or a 4 to 16 line decoder driving a diode matrix for HEX, (or a PROM for ASCII - you'll need to get help with that) and parallel in parallel out HV drivers, one for each digit and each segment (unless you group segments in parallel to run a 14 or 16 segment display as a 7 segment one). We've already discussed the HV drivers - Microchip still make them or you can improvise with a >30V rated open drain or open collector buffer + a pullup resistor, a NPN transistor and a diode to boost the high state current capability.I suggest you put together a block diagram and a proposed list of ICs and post it for comment. Just ignore anyone who suggests 'SPI' or 'Arduino' etc. for the core of the project*.* You can always use the 74HC595 and Arduino as an easy way of generating the test data for the inputs of the logic board. You can get help here putting together a sketch that accepts 8 digit input from the Arduino terminal window and outputs 32 digital lines from 4 74HC595 chips.accordingly. Heck, for test purposes only, someone will probably even write it for you!

author: neo
author_rank: Super Contributor
timestamp: August 08, 2017, 10:08:50 pm
content: Quote from: Ian.M on August 08, 2017, 09:51:13 pmI won't lie, that confuses me.(1) CD4508(2) CD4017(3) CD4056I have no clue how to make a block diagram for this but this is the list of ICs you asked for i do believe.As for HV driver that answer is simple i figured out how to make my own 5V to(up to)300v.The only part of that i am definitely sure i understand is,Quote from: Ian.M on August 08, 2017, 09:51:13 pmand the 4017 is a perfect chip for that.EDIT: If you were to give me part numbers for 7400 series equivelants i may have them, i have a huge lot of 7400 chips. But as i said before, i think in 4000 series. I just don't happen to have a massive surplus on 4000 series like i do 7400 series.

author: Ian.M
author_rank: Super Contributor
timestamp: August 08, 2017, 10:45:43 pm
content: The CD4508 contains two 4 bit latches with separate output disable pins. When they are high the latch outputs are tristate.For each input digit use 1/2 4508. Wire the outputs of all the 4508s together, all Q0 in parallel, then separately all Q1 in parallel etc. to form the BCD data bus. Its crucially important (to avoid smoke!) that you only turn on ONE half 4508's outputs at a time so you need a sequential 1 of N active low signal to drive each the OUTPUT DISABLE pins. If you use a 4017 its outputs are active high so you'd need an inverter for each 1/2 4508.The combined Q0 - Q3 signals then go to the BCD to 7 segment decoder chip which in turn drives your HV segment anode drivers. A CD4055 would be a better choice here because you don't have to drive a latch pin. Its Disp. Freq pin can be tied high or low for inverted or non-inverted output respectievly which may make you HV driver interfacing easier.Each HV digit grid driver needs to be turned on one at a time by the active 4017 (or other decoded counter) output so the digit is lit at (almost) the same time its segment data is put on the bus and decoded by the 4055.Ideally, to avoid ghosting, you'll have a master blanking signal to the HV drivers for either the grids or the segments (or use a BCD to 7 segment chip that supports blanking) so your clock logic can turn the current digit off fractionally before it increments the 4017 count and turn it back on for the next digit after the 4055's outputs have had time to settle. That means you need two monostables, one for the blanking pulse and the other to delay the 4017 clock input so it occurs in the middle of the blanking pulse. A CMOS 555 is plenty good enough for the display scan clock source.Seehttps://www.noritake-elec.com/technology/general-technical-information/vfd-operation, section 4 for timing details.Put that all together, and to the rest of your project, the input side of all the 4508 latches is just like driving individual BCD to 7 segment decoders each wired to a single LED digit. Its worth noting that the 4508 doesn't need a strobe, just tie it high and the current input data goes straight to its tri-state output buffers under the control of the DISABLE signal.Hopefully that gives you enough of an idea to sketch a block diagram - don't worry about the individual data or segment lines yet, just get the control signals right for two digits and their grids and annotate it that you have N-2 more digits the same (assuming your display has 10 or less digits. If its got more, *DON'T* use a 4017 because they are total absolute pigs to cascade for sequential outputs without glitching).

author: neo
author_rank: Super Contributor
timestamp: August 08, 2017, 11:05:46 pm
content: Quote from: Ian.M on August 08, 2017, 10:45:43 pmwhat would you recommend instead in that case?

author: Ian.M
author_rank: Super Contributor
timestamp: August 08, 2017, 11:10:37 pm
content: Binary output counter and separate 4 to 16 line decoder/demultipexer (which can be built from two 3 to 8 line decoders with opposite polarity enable inputs. Connect one /EN and one EN pin from the two decoders to the MSB from the counter)

author: neo
author_rank: Super Contributor
timestamp: August 08, 2017, 11:37:57 pm
content: Quote from: Ian.M on August 08, 2017, 11:10:37 pmi'll try to avoid it then.Below is my attempt at what you described in schematic form for eagle.Question, do the latches serve any other function other than just a digital switch?

author: floobydust
author_rank: Super Contributor
timestamp: August 09, 2017, 12:15:12 am
content: A common trick is to bias the VFD's filaments (cathode) -ve at say -6V.This allows a single supply and if you are using 4000 (15V) CMOS, you get the extra 6V so 21V drive for lots of brightness.The RussianIV-11tubes need -3V for cutoff on the grid.

author: Ian.M
author_rank: Super Contributor
timestamp: August 09, 2017, 12:20:14 am
content: Can you post that as a lossless image file (PNG, GIF or compressed TIFF) or a PDF as a lot of us don't have Eagle 8 installed?The latches serve three purposes :-Capturing data all at the same time if you wire their STROBE pins in parallel and apply a brief low going pulse or digit by digit, possibly off a shared input bus if you wire their STROBE lines individually..Freezing rapidly changing input data - you could build a stopwatch by simply adding a crystal controlled counter chain and use the STROBE line to freeze the display to take laps..gating one digit at a time onto the shared 4 wire BCD data bus to the BCD to 7 segment decoder. could be handled by just about any other buffer or latch with tristate outputs, but as you are working in BCD, there are very few 4000 series to choose from that handle 4 bits at a time and even fewer that give you two such units in the same chip. Also you probably want to avoid clocked (D type) latches in favour of strobed (transparent) latches as otherwise you'll always have to generate a clock pulse to load input data.One thing that would be fun to build would be data input from an old mechanical phone dial. Your circuit would need to zero a counter when the dial left its home position, and debounce and count pulses to present a BCD number to all the 4508 inputs paralleled. There would be another decoded counter with output enable (not tristate) that would pulse the current digit position's 1/2 4508 LATCH input high to capture the dialed digit. This digit select counter would be clocked by the dial leaving home so it advances for the next digit. Either preload it all 1 or don't use its decoded output for 0 or you wont get anything in the first digit. You'd also need a clear button that jams '1111' on the 4058 inputs (for blank from the 7 segment decoder), pulses all their LATCH pins to clear the display and resets the digit select counter.Doing something similar with a 3x4 phone keypad without using a MCU would be a *lot* harder . . . .On the subject of tricks to drive a VFD on the cheap, another common one was to run the VFD with grid on or segment anode on at +5V, and around -25V dc bias on the cathode. Each grid or anode would be driven by a PNP transistor with its emitter to the 5V rail and a base resistor driven by the 5V logic (active low), and would also need a high value pulldown resistor down to -30V to turn it off properly. Because the grid or anode only sink current (ignoring secondary emission, current only flows when they are being hit by negatively charged electrons), the pulldown resistors can be very high resistance - hundreds of K is fine. Many old VCRs had this arrangement with the output transistors integrated in the same chip as the clock/timer logic.

author: neo
author_rank: Super Contributor
timestamp: August 09, 2017, 01:52:40 am
content: Sorry for my lack of foresight in only uploading eagle file.

author: Ian.M
author_rank: Super Contributor
timestamp: August 09, 2017, 02:21:51 am
content: Everything below the 4508s looks good, but you only want/need ONE 4055 with *ALL* the 4508 D0 pins connected to its I0 pin and so on for the rest of the BCD bus up to all the 4058 D3 pins connected to its I3 pin The BCD bus on the output of the 4508s is where all the digits values must appear in sequence one at a time for the multiplexing. You cant (easily) combine the outputs of multiple 4055 chips as they aren't open drain, dont have blanking, and cant be tri-stated.Edit: corrected typo of 4053 for 4055

author: neo
author_rank: Super Contributor
timestamp: August 09, 2017, 02:40:59 am
content: Quote from: Ian.M on August 09, 2017, 02:21:51 amI should of thought of that, thank you. Now the only problem is that 4508s and 4055s are not the most common chips, but at least they are available.EDIT:I know i have HD74HC125P laying around could i use it as a prototype or would that cause problems interfacing with CMOS?

author: Ian.M
author_rank: Super Contributor
timestamp: August 09, 2017, 03:03:46 am
content: Keep the supply voltage at 5V and you can mix 4000 series and 74HC (not HCT) with no problems. However 74HC125 only gives you four tristate buffers, so you'd need as many of them as you have display digits + the input data has to be stable because they don't latch.If you just want to play around with combining 4 individual data lines into a single one, a single 74HC125 will do nicely - just remember that only ONE /EN pin should ever be low at a time. To protect it against mistakes while experimenting put a 150R resistor in series with each Y pin to limit the current if you cause a bus conflict.

author: neo
author_rank: Super Contributor
timestamp: August 09, 2017, 03:11:50 am
content: Well monkeying around with the shift register code i was able to create an animation, but i don't fully understand how it works and to paraphrase Eintstein. "Understanding is everything."

author: Ian.M
author_rank: Super Contributor
timestamp: August 09, 2017, 03:13:19 am
content: Post the code + any questions you've got + maybe a video of the animation, or just keep hacking on it till you understand it better.

author: neo
author_rank: Super Contributor
timestamp: August 09, 2017, 03:17:47 am
content: Code:/*Adafruit Arduino - Lesson 4. 8 LEDs and a Shift Register*/int latchPin = 5;int clockPin = 6;int dataPin = 4;byte leds = 0;void setup(){pinMode(latchPin, OUTPUT);pinMode(dataPin, OUTPUT);pinMode(clockPin, OUTPUT);}void loop(){leds = 129;updateShiftRegister();delay (500);leds = 66;updateShiftRegister();delay (500);leds = 36;updateShiftRegister();delay (500);leds = 24;updateShiftRegister();delay (500);leds = 36;updateShiftRegister();delay (500);leds = 66;updateShiftRegister();delay (500);leds = 129;updateShiftRegister();delay (500);}void updateShiftRegister(){digitalWrite(latchPin, LOW);shiftOut(dataPin, clockPin, LSBFIRST, leds);digitalWrite(latchPin, HIGH);}The animation itself is dead simple, outer edges to center, both lines meet continue and repeat. It looks like top and bottom are switching places over and over.Only thing i don't get in that is the byte command.

author: Ian.M
author_rank: Super Contributor
timestamp: August 09, 2017, 03:33:55 am
content: byteis an Arduinoism. In more standard dialects of ANSI C or C++ (or at least ones with less cruft on top of the standard stuff) it would beunsigned charor on C99 upwardsuint8_t, both of which are accepted by the GCC compiler that the Arduino IDE uses.It (along with its equivalents) is the name of a data type - a single unsigned eight bit number aka a byte.Code:byte leds=0;declares a byte sized variable called leds. As its a single unsigned byte it can only hold numbers in the range 0 to 255. It also gives it an initial value of 0. C will zero any variable that isn't explicitly initialised, but its good practice to put the=0there if your code relies on it starting from zero later on.Seehttps://learn.sparkfun.com/tutorials/data-types-in-arduinofor a more thorough explanation of Arduino data types.N.B. as no Arduino has more than 255 I/O pins, the system code uses 8 bit values for the pin number in all I/O functions that need one. You can save a few bytes of program and data memory by using thebytetype for those pin number variables. Also as the pin numbers are fixed by the hardware connections and cant change while the program is running, they should be constants:Code:const byte latchPin = 5;const byte clockPin = 6;const byte dataPin = 4;

author: neo
author_rank: Super Contributor
timestamp: August 09, 2017, 04:40:22 am
content: Since i can't order the parts until after hamfest i expect there to be a long delay then i will tell you if it works or not.Thank you Ian you have been very helpful.

author: Ian.M
author_rank: Super Contributor
timestamp: August 09, 2017, 05:14:37 am
content: No worries. When you get the parts build it up one stage at a time and check it does what you expect. e.g. start with the 4017 and a debounced switch to clock it manually. then add ONE 4508 but don't parallel its Qn outputs with the other half's corresponding Qn pin yet.Set the counter to reset at 3 so it counts 0 1 2 and connect the 0 and 1 outputs to inverters and them to the 4508 output disable pins. Tie the 4508 resets high for testing to force '0' into all the latches. check that as you click the counter first one then the other half of the 4508 gets its outputs activated - you can use a resistor + LED between Vcc and one of the outputs - then finally both halves go tri-state as the counter goes to 2. Once you've confirmed that you are good to go to start parralling corresponding numbered Q pins and hook them up to the 4053. For initial testing, hook up the 4053 outputs to a single LED digit. Tie the 4508 reset pins low so you can load data into them and check you can display one digit you loaded at a time on the display. Then add more 4508 chips up to N_digits/2, and set up the reset for the 4017 accordingly. Check each is selected in turn then hook their outputs to the BCD bus.That will give you the core of the logic working without burning any chips. Add a CMOS 555 clock of approximately 100*N_digits Hz and it will be ready to drive a logic level multiplexed display. Slow the clock down by patching in a *100 timing cap if you want to see it scan through all the digits slowly enough to check them. Then you can concentrate on the HV drivers and the filament supply and bias. A good DC level for the cathode (filament) for many planar VFDs is +5V with a +30V supply to the HV drivers. For the filament itself you ideally want AC drive, and the easiest is straight 50Hz or 60Hz from a dedicated secondary on your PSU's mains transformer, with a series resistor to drop the voltage to get the filament suply correct. Across the filament put two equal resistors to form an artificial center tap While you *can* use DC, the voltage drop across the filament will cause uneven brightness from one end o a longer display to the other. Whatever you do, remember the hot resistance is many times the cold resistance, so the voltage to and thus the dissipation of a filament driven via a series resistor tends to increase as it warms up so, to avoid overdriving it you need to sneak up on the correct filament voltage gradually, decreasing the resistor a little at a time. If the filament is glowing noticeably you are overdriving it. You should only just be able to see the faintest of dull glows from the filament in a totally dark room with all the segments off.Take it slow and check each step and you should be able to keep all the magic smoke inside the chips . . .IMPORTANT: THE BCD BUS TO THE 7 SEG DECODER COMES FROM THE PARALLELLED 4508 Q0 THROUGH Q3 OUTPUTS. I mistakenly wrote D0 - D3 earlier - Dn are inputs not outputs.

author: neo
author_rank: Super Contributor
timestamp: August 09, 2017, 06:04:30 am
content: Quote from: Ian.M on August 09, 2017, 05:14:37 amI certainly hope to keep the magic smoke inside given the initial cost of the prototype.

author: Ian.M
author_rank: Super Contributor
timestamp: August 09, 2017, 10:17:55 am
content: While you are waiting for parts, why not reread your old topic:https://www.eevblog.com/forum/projects/vacuum-fluorescent-display-multiplexing-problem/as it covered a lot of the details of driving a VFD off logic circuits in *MUCH* detail, and ask about anything that you didn't understand (apart from the SPI stuff which you can skim over if your mission is to build a discrete logic multiplexed VFD driver).

author: neo
author_rank: Super Contributor
timestamp: August 09, 2017, 10:40:12 pm
content: I bought a VFD module and when i got it i tried to remove the shrouded header and broke a couple contact points, i know i know save thei am doing worse to myself, and using tiny wire i was able to route connections all except for one.Reset, i assumed to the on board micro controller but when powered up with reset ground it is meant to make the entire display light up, and instead does nothing.http://www.ebay.com/itm/New-20X2-alphanumeric-VFD-Display-5VDC-Parallel-Arduino-library-file-pinouts/272260289885?ssPageName=STRK%3AMEBIDX%3AIT&_trksid=p2057872.m2749.l2649Did i break this thing or can i still make it work? As i said i have every other connection right.Also of interest is that thing this thing uses a very similar set up to what we were talking about.http://ecee.colorado.edu/~mcclurel/dm74ls373.pdfhttp://pdf1.alldatasheet.com/datasheet-pdf/view/11020/OKI/MSC1162.html2 of thesehttp://www.nxp.com/docs/en/data-sheet/8XC51_8XC52.pdf

author: Ian.M
author_rank: Super Contributor
timestamp: August 09, 2017, 10:44:58 pm
content: So what pins did you break? closeup photos would be good . . .Is Reset the only one you couldn't reconnect?

author: neo
author_rank: Super Contributor
timestamp: August 09, 2017, 10:48:14 pm
content: Quote from: Ian.M on August 09, 2017, 10:44:58 pmReset, the rest i know are right and my camera does not do closeups well.

author: Ian.M
author_rank: Super Contributor
timestamp: August 09, 2017, 10:52:42 pm
content: Well, the EBAY ad implies that if you do nothing else apart from apply 5V you should see a flashing cursor. If not, and your PSU is adequate, its probably faulty. and odds are something else cracked when you FUBARed the header.

author: neo
author_rank: Super Contributor
timestamp: August 09, 2017, 10:55:15 pm
content: Quote from: Ian.M on August 09, 2017, 10:52:42 pmIt don't flash, but there is a cursor.

author: Ian.M
author_rank: Super Contributor
timestamp: August 09, 2017, 10:59:02 pm
content: Ok signs of life then. Its still got vacuum, filament drive, HT and multiplexing.How are you testing it? Are you 100% sure you've got the 8 data lines, and strobe hooked up correctly?

author: neo
author_rank: Super Contributor
timestamp: August 09, 2017, 11:02:04 pm
content: I attached power, - to - and +5 to +5 it lit a cursor. Removed 5V, grounded reset, reapplied 5V and it did not light up.The exact opposite of lighting up actually, the cursor went off.

author: Ian.M
author_rank: Super Contributor
timestamp: August 09, 2017, 11:13:37 pm
content: So the test mode isn't working. Have you tried hooking it up to an Arduino and running any demo that came with their library?

author: neo
author_rank: Super Contributor
timestamp: August 09, 2017, 11:15:13 pm
content: I never got a library, i assumed the test mode wasn't working because i didn't have the right reset.

author: Ian.M
author_rank: Super Contributor
timestamp: August 10, 2017, 12:00:29 am
content: Google is your friend.This looks possible:http://www.torretje.nl/Projects/Futaba

author: neo
author_rank: Super Contributor
timestamp: August 10, 2017, 12:15:36 am
content: Quote from: Ian.M on August 10, 2017, 12:00:29 amCode:/* NA202SD08FA VFD DisplayKarel Reinhard 04/13/2016Basic code for NA202SD08FA 20x2 VFDWith 13 pin connector see http://torretje.nl/futaba for pin-out and data-sheet*///NA202SD08FA 14 pin connector 2 pins for power-supply and pin 1 and 13 NC :const int RST = 11; //J1-14const int WR = 10; //J1-2const int DB0 = 2; //J1-10const int DB1 = 3; //J1-9const int DB2 = 4; //J1-8const int DB3 = 5; //J1-7const int DB4 = 6; //J1-6const int DB5 = 7; //J1-5const int DB6 = 8; //J1-4const int DB7 = 9; //J1-3//Add all data ports to an Arrayint outData={DB0,DB1,DB2,DB3,DB4,DB5,DB6,DB7};void setup() {// set the digital pin as output:pinMode(RST, OUTPUT);pinMode(WR, OUTPUT);pinMode(DB0, OUTPUT);pinMode(DB1, OUTPUT);pinMode(DB2, OUTPUT);pinMode(DB3, OUTPUT);pinMode(DB4, OUTPUT);pinMode(DB5, OUTPUT);pinMode(DB6, OUTPUT);pinMode(DB7, OUTPUT);//RESETdigitalWrite(RST, 1);delay(500);digitalWrite(RST, 0);}void loop(){setData(0x1F);for(int y=0x20;y<0x7F;y++){setData(0x16);//Soft RESETfor(int i=0;i<40;i++){setData(y);}delay(100);}for(int y=0xA0;y<0xFF;y++){setData(0x16);//Soft RESETfor(int i=0;i<40;i++){setData(y);}delay(100);}}void setData(byte data){int i=0;for (byte mask = B00000001; mask>0; mask <<= 1) {if (data & mask){ // if bitwise AND resolves to truedigitalWrite(outData,HIGH);}else{ //if bitwise and resolves to falsedigitalWrite(outData,LOW);}i++;}digitalWrite(WR, 1);delayMicroseconds(2500);digitalWrite(WR, 0);}Thank you it seems to be working the cursor now flashes.What do i do know? i don't understand all of the code, the entire void loop portion for example.

author: Ian.M
author_rank: Super Contributor
timestamp: August 10, 2017, 12:21:53 am
content: If I'm reading that code correctly, in loop() it loops through the whole character set, sending each character 40 times so the whole display fills with it, then waits 1/10 second, soft resets the display and moves on to the next character. Eachfor(int y...)loop handles half the character set, skipping control codes. Thefor(int i...)loops send the current character y 40 times usingsetData(y);If that's not what you are getting you still have a problem . . .

author: neo
author_rank: Super Contributor
timestamp: August 10, 2017, 12:23:28 am
content: Quote from: Ian.M on August 10, 2017, 12:21:53 amAll i get is a flashing cursor, so i have no clue what to do next.EDIT:I had the wires one pin too far over, i put them where they should be now not even the cursor flashes.

author: Ian.M
author_rank: Super Contributor
timestamp: August 10, 2017, 12:31:10 am
content: Sounds like your connections are still scrambled. Jumper the Arduino Reset pin to Gnd to hold the Arduino in Reset so it does absolutely nothing, and power it up again to see if you get a cursor like you did originally. If its totally blank either something really bad has happened or it has memory backup for its modes and your screwup sent a 'Display Off' command'

author: neo
author_rank: Super Contributor
timestamp: August 10, 2017, 12:33:21 am
content: The cursor IS there it is just stationary, solid non flashing line.EDIT:If reset is pulsed the cursor flashes.

author: Ian.M
author_rank: Super Contributor
timestamp: August 10, 2017, 12:43:11 am
content: OK: double check your wiring. When you FUBARed and then patched the header connections, did you get two wires mixed up or shorted together?

author: neo
author_rank: Super Contributor
timestamp: August 10, 2017, 12:47:30 am
content: Quote from: Ian.M on August 10, 2017, 12:43:11 amI am at least 97% sure it is correct.

author: neo
author_rank: Super Contributor
timestamp: August 10, 2017, 01:00:52 am
content: I uploadedCode:/* NA202SD08FA VFD DisplayKarel Reinhard 04/13/2016Basic code for NA202SD08FA 20x2 VFDWith 13 pin connector see http://torretje.nl/futaba for pin-out and data-sheet*///NA202SD08FA 14 pin connector 2 pins for power-supply and pin 1 and 13 NC :const int RST = 11; //J1-14const int WR = 10; //J1-2const int DB0 = 2; //J1-10const int DB1 = 3; //J1-9const int DB2 = 4; //J1-8const int DB3 = 5; //J1-7const int DB4 = 6; //J1-6const int DB5 = 7; //J1-5const int DB6 = 8; //J1-4const int DB7 = 9; //J1-3//Add all data ports to an Arrayint outData={DB0,DB1,DB2,DB3,DB4,DB5,DB6,DB7};void setup() {// set the digital pin as output:pinMode(RST, OUTPUT);pinMode(WR, OUTPUT);pinMode(DB0, OUTPUT);pinMode(DB1, OUTPUT);pinMode(DB2, OUTPUT);pinMode(DB3, OUTPUT);pinMode(DB4, OUTPUT);pinMode(DB5, OUTPUT);pinMode(DB6, OUTPUT);pinMode(DB7, OUTPUT);//RESETdigitalWrite(RST, 1);delay(500);digitalWrite(RST, 0);}void loop(){digitalWrite (DB0, LOW);digitalWrite (DB1, LOW);digitalWrite (DB2, LOW);digitalWrite (DB3, LOW);digitalWrite (DB4, LOW);digitalWrite (DB5, HIGH);digitalWrite (DB6, LOW);digitalWrite (DB7, HIGH);digitalWrite(WR, 1);delayMicroseconds(250);digitalWrite(WR, 0);}expecting an A but instead got nothing, what does write strobe do?

author: Ian.M
author_rank: Super Contributor
timestamp: August 10, 2017, 01:15:01 am
content: Your attempt looks possible but the code for 'A' is wrong - you've got 0xA0 (0b1010000) which is outside the standard ASCII character set so %DEITY% only knows what the display is doing with it. You need 0x41 (0b01000001) for 'A'. Try:Code:digitalWrite (DB0, HIGH);digitalWrite (DB1, LOW);digitalWrite (DB2, LOW);digitalWrite (DB3, LOW);digitalWrite (DB4, LOW);digitalWrite (DB5, LOW);digitalWrite (DB6, HIGH);digitalWrite (DB7, LOW);The EBAY ad lists the following control codes:Hex ASCII Code Notes--- ---------- -----00 NULL01 SOH02 STX03 ETX04 EOT n Set display brightness level (DIM = 0x20, MED1 = 0x40, MED2 = 0x60, FULL = 0xFF).05 ENQ06 ACK07 BEL Turn on blinking underline cursor.08 BS Backspace and erase. Spans both lines.09 HT Moves cursor one position right. Wraps to Line 01. Does not scroll at end of Line 01.0A LF If on Line 00: moves cursor down one line, same column.If on Line 01: scrolls line up, moves cursor to column one.0B VT Turn on blinking characters. ---- |---- Use in pairs.0C + FF Turn off blinking characters. ---0D CR Moves cursor to start of line. Does not clear line.0E + SO Turn off cursor.0F SI Turn on solid underline cursor.10 DLE11 DC1 Turns on wrap around. When Line 01, Col 19 is reached, continue at Line 00, Col 00.12 + DC2 Turns off wrap around. When Line 01, Col 19 is reached, characters overprint that position.13 DC3 When Line 01, Col 19 is reached, scroll characters on Line 01 left. No effect on Line 00.14 DC4 Clear screen. Home cursor. Turns cursor on. INITIALIZE SCREEN.15 NAK Clear screen. Home cursor. Leaves cursor off if off.16 SYN Home cursor. Does not clear screen.17 ETB n Turns underlines on/off (underline on = 0x44, blinking underline on = 0x46, underline off = 0x45).18 CAN19 EOM Adds 80H to following character. Allows printing of high-bit characters if sending 7-bit data.1A SUB1B ESC n Moves cursor to position 0-39. Both lines contiguous.1C FS1D GS1E RS Multi-byte command. Possible user defined characters.1F USThey don't match the control codes in Reinhard's sketch. It sends 0x1F at startup then 0x16 before each screenful of characters. Reinhard thinks 0x16 is soft reset, your supplier thinks its Home Cursor without clearing the screen.Maybe the model number in the EBAY ad is wrong, maybe Reinhardmade a typo and is actually using a different display, or maybe, as it has a MCU on board, its got custom firmware with different control codes. I strongly recommend contacting the EBAY seller for the Arduino library and instructions,

author: neo
author_rank: Super Contributor
timestamp: August 10, 2017, 01:29:36 am
content: Quote from: Ian.M on August 10, 2017, 01:15:01 amThe code has no effect and i am beginning to regret buying this thing. I just wish i knew why i thought desoldering the connect was a good idea, i could of just cut the shroud off to breadboard it.Well off topic, but it makes me feel less stupid, i had a DS3231 RTC laying around and was able able to monkey with the code to where it serials prints the time, date and temperature.

author: neo
author_rank: Super Contributor
timestamp: August 10, 2017, 11:26:05 pm
content: Rereading the original thread about this is giving me a headache.But aside from that i finally figured out how to use the 7407 to raise voltage. You meant to pull up the output through a 40k resistor and so when it is off the output is high, right?I am a bit slow on the upkeep. Once i get something, that is to say once it clicks in my head, it becomes much simpler.Also i have come up with a genius idea that would make things simpler but it calls for a 7446, so unfortunately it is out given that they are 2 bucks a piece minimum.

author: Ian.M
author_rank: Super Contributor
timestamp: August 10, 2017, 11:54:19 pm
content: Yes, when the output transistor of a gate from a 7407 is off, the output can be pulled up to a high voltage (Max. 30V) via anexternalresistor. You'd want a little safety margin so a 27V or 28V HT rail would be good As its non-inverting, TTL logic '1' in will turn off the output transistor and let the output be pulled high, and logic '0' in, will turn the transistor on pulling the output down to near 0V. Also as I no doubt pointed out in the other topic, it *MUST* be real bipolar TTL (7407 or 74LS07) as all the CMOS ones have a diode clamp to VCC on the output so aren't high voltage capable.I think I can see where you are going with the 7446, as its 30V capable OC outputs would let you use a simple base resistor up to a PNP transistor, emitter to 27V, collector to the VFD segment, which would give you a reduced component count BCD decode and VFD anode drive solution. Its also got a useful blanking input. You'd probably still need a 220K or so pulldown resistor on each PNP collector to prevent ghosting. $2 isn't a bad price as you only need ONE 7446 as long as you do the multiplexing before it.The alternative of wiring N of them with their outputs in parallel then activating them one at a time via their blanking pins would be rather more expensive, but might be worth it for the simplicity. It looks likeFuturelechas them for $1.60. There's also an EBAY buy it now for5x N.O.S. D146D, which is an East German clone of the 7446, for $5 + $1 P&P, which would work out at $1.20 each.

author: neo
author_rank: Super Contributor
timestamp: August 11, 2017, 12:04:25 am
content: Quote from: Ian.M on August 10, 2017, 11:54:19 pmI have plenty "real" 7407s and the good news is they are jelly bean parts.I got an idea to eliminate a stage but it would require a 7446, 2 bucks a pop, versus a 7407 and 4055, combo is 1.42 from digikey.What does futerlec charge for shipping?

author: neo
author_rank: Super Contributor
timestamp: August 11, 2017, 12:27:55 am
content: Quote from: Ian.M on August 10, 2017, 11:54:19 pmPersonally i would rather keep the current method, that is using a latch or buffer with tristate as a pre-stage.It makes sense to me and is cheap enough, certainly more so that 1.6 bucks a digit.Current idea, CD4508 latch, 1.21 each; 7446 from futerlec if shipping is reasonable, 1.6 each; a 4069 inverter which i have; a 4017 which i have, for the grids 7407 which i have.As for putting information in i am trying to figure out how to use two 74HC595s to print a bcd value from arduino.Total cost for a whole circuit: ~$5 with a scrap bin VFD and a few parts on hand.Per set of digits: 2.8 and only 1.2 more for every additional pair of 7 segment digits.

author: neo
author_rank: Super Contributor
timestamp: August 11, 2017, 10:59:24 pm
content: Quote from: Ian.M on August 10, 2017, 11:54:19 pmCan't i do a 7446 same as a 7407? With a pull-up resistor.

author: Ian.M
author_rank: Super Contributor
timestamp: August 12, 2017, 03:36:05 am
content: No. the 7446 output is active low: i.e. low when the segment is on - the exact opposite of what's needed for a VFD segment anode so you *MUST* have an inverting high side transistor for each segment if you want to use it as a single chip decoder and level shifter. Unfortunately you cant substitute an active high chip in the same family as the only active high output parts in the 7446..49 family - (74xx48,49) only have logic level outputs, so would need 7407 buffers after them to get an active high 30V HV output. Of course you could also drive 7406 inverting HV buffers from an active low decoder like a 7446 to get an active high output.However as VFD segment anodes sink current, you need a sourcing driver for them and a plain resistive pullup makes a really crappy sourcing driver - the tradeoff between the voltage drop due to load current in the high state and power dissipation in the pullup when pulled low is not in your favour. Its easier to bite the bullet and add a high side transistor - either PNP common emitter (as discussed above) if you don't mind (or actually want) inversion or for non-inverted output a NPN emitter follower with a base-emitter diode so you don't have to use a resistive pulldown. The NPN still needs a pullup for its base, but depending on its current gain that 's typically two orders of magnitude less of a problem.

author: neo
author_rank: Super Contributor
timestamp: August 12, 2017, 05:54:07 pm
content: Multiplexing achieved. Admittedly very basic and useless data but it is multiplexing with what i had laying around, 8098 buffers with 7407 pulling up the voltage to 26V and a shift register feeding the data.https://youtu.be/PVYEjEDDZ9kI recommend .25 speed. I apologize for the quality and length the main video of it was thirty seconds but was deleted by a camera mishap.It is almost useless but is a half decent proof of concept i think.Also, in the final version i will just use the 7407s as the level shifter and accept the extra stage as it is unavoidable.

author: neo
author_rank: Super Contributor
timestamp: August 12, 2017, 11:52:34 pm
content: Would the 4511 work to covert BCD to 7 segments? It is almost the only reasonable BCD to 7 segment driver on ebay, and it is the only reasonable chip in America for the task.

author: Ian.M
author_rank: Super Contributor
timestamp: August 13, 2017, 12:32:44 am
content: Sure, as long as your driver circuit is expecting an active high signal. Its got a blanking input and if you tie its latch enable pin low its transparent.

author: neo
author_rank: Super Contributor
timestamp: August 13, 2017, 02:21:18 am
content: Quote from: Ian.M on August 13, 2017, 12:32:44 amGreat, i just found two in my collection and a 7447, prototyping continues. I also found 8 7446 chips.