EEVblog Electronics Community Forum

Electronics => Projects, Designs, and Technical Stuff => Topic started by: neo on September 19, 2016, 03:41:53 am

Title: Vacuum fluorescent display to clock display
Post by: neo on September 19, 2016, 03:41:53 am
 I have a vfd that has 8, 14 segments and 11 indicators with only 25 pins. i know its multiplexed or whatever but how can i use individual segments on it without a micro controller. I already have the circuitry for the clock designed but the circuit outputs to individual segments not a multiplexed display
Title: Re: Vacuum fluorescent display to clock display
Post by: jaycee on September 19, 2016, 04:59:44 am
You would need to make a circuit that briefly enables each grid, lighting the segments for the digits in that grid. I guess you could do it with a counter and shift register, and some multiplexers.... but a microcontroller would be much simpler.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 19, 2016, 05:13:07 am
but a microcontroller would be much simpler.

except their programmers are too expensive and even if i had one i would'nt know how to program
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 19, 2016, 06:12:26 am
Not being able to program in C is a valid reason, but cost of programmers is not.  e.g. an Arduino is just an Atmel MCU mounted on a board with a USB interface and a bootloader, so are you telling us you cant afford an Arduino Nano off Ebay?

You'll need a whole board full of logic to use it without a MCU.  Unless you can parallel some of its segment anodes to map to a 7 segment display pattern, you'll need to build a diode matrix ROM to store the segment pattern for each digit.  Assuming BCD input data, you'll also need six 4 bit latches with tristate outputs and an oscillator and decoded decade counter wired to reset at 6 to step through enabling one latch output and the corresponding digit grid to multiplex it.  Then you get to have fun with DIY high voltage drivers as most of the chips for that sort of interface are either obsolete and difficult to obtain or if current, highly integrated, with a MCU required to control them.

Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 19, 2016, 07:10:44 am
i have an arduino BUT it never did work it just says generic usb (paraphrase) in the menu and the arduino software looks a for a com1 port and can never find it because the arduino i got doesn't say "Here i am!". i kinda got made and gave up on it
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 19, 2016, 07:14:01 am
i should note at this point to trying to learn how to program and do microcontrollers but only if i can actually do it and not stare at a screen for 3 hours trying to tell my computer that there is an arduino attached and failing. so as more eloquently put im open to it so long as i can do it without hitting a brick wall just trying to set it up.
Title: Re: Vacuum fluorescent display to clock display
Post by: FreddyVictor on September 19, 2016, 07:32:54 am
You need to get over to https://www.arduino.cc/en/Guide/HomePage (https://www.arduino.cc/en/Guide/HomePage)
and https://www.arduino.cc/en/Guide/Troubleshooting (https://www.arduino.cc/en/Guide/Troubleshooting)

as for COM ports, they are relatively basic communication ports - not like full-blown USB - so you need to tell the Arduino IDE which com port your Arduino is located on
https://www.arduino.cc/en/Guide/Troubleshooting#toc16 (https://www.arduino.cc/en/Guide/Troubleshooting#toc16) is relevant

Also, why 2 threads on same subject ?
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 19, 2016, 07:40:34 am
Also, why 2 threads on same subject ?

quite an astute observation the answer is i have a very bad internet speed and it glitched so i made them not so the same seeing as how it wouldnt let me delete one, this one is specifically about ways to make it work as a clock display while the other is just in general. Back to the arduino i have no clue how to set a com port and none of those links tell me directly how to turn standard usb to com
Title: Re: Vacuum fluorescent display to clock display
Post by: FreddyVictor on September 19, 2016, 10:45:03 am
Also, why 2 threads on same subject ?

quite an astute observation the answer is i have a very bad internet speed and it glitched so i made them not so the same seeing as how it wouldnt let me delete one, this one is specifically about ways to make it work as a clock display while the other is just in general. Back to the arduino i have no clue how to set a com port and none of those links tell me directly how to turn standard usb to com

hey, no problem !

In Arduino IDE, on Menu, go: Tools/port
and choose correct one (must have arduino plugged in!)

Good luck with the project :)
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 19, 2016, 05:37:15 pm
Freddyvictor, you are a genius it actually worked now we can get past the arduino not working and get on the fact i dont know how to program for a multiplexed vfd
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 19, 2016, 07:02:48 pm
There's no real difference between programming for multiplexed LEDs and for multiplexed VFDs.   All the difference is in the display interface hardware, + possibly whether or not to invert the segmet and digit drive outputs, so grab 4x 7 segment LEDs, a proto-shield and 8 1K resistors and get coding.  The segments wont be very bright with 1K resistors and 25% duty cycle, but for experimenting wit the code, its desirable to simplify it as much as possible by omitting external digit driver transistors, and it isn't a good idea to go much over 20mA per pin on the Arduino, which will happen when displaying an 8 with the d.p. lit as well.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 20, 2016, 03:27:44 am
is the proto shield necessary? can the 7 segment displays be common anode? also in pursuit of experiment i got two regular leds to switch between one another so fast i cant see it, 5 ms, so that has to be progress especially given that i begun my work of learning programming this morning
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 20, 2016, 03:37:16 am
You can do it without the protoshield - you can even patch across to a solderless breadboard.   It doesn't matter whether the dispays are common anode or common cathode as long as all the digits are the same type and you know which you have and their pinout.   The only difference between the two is the connections, and whether or not the segment patterns and the digit drive signal are inverted.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 20, 2016, 04:36:57 am
i think i got it figured out but by my conclusion it is an impossibility to use this with a simple logic clock because it would take too many inputs from the clock circuitry
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 20, 2016, 06:02:54 am
in further news i have figured out next to nothing and i cant figure which pins are which on my vfd display
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 20, 2016, 06:34:22 am
Pictures of youur VFD would be good, well lit, closeup and in focus.  Please take one from the front and another from the back.  If we cant come up with a datasheet, its fairly easy to identify VFD electrodes experimentally.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 20, 2016, 07:14:35 am
i just had a breakthrough and mapped out all the pins as it turns out i was making it wayyy too complex and with what i assumed it was doing i didnt have a chance of figuring it out might as well have been  :horse: haha   
to those who can't read my writing (just about everyone except me) 8 and 9 are the special pins 1 has no know connection, perhaps a ground?
    the 14 segments i code named them and no i didnt miss the i, its used to to mark the special in my head but i didnt write it, but their the same across all grids
 17=d 16=0 15=k 14=n 13=e 12=c 11=g 10= 8=i 9=i 7=f 6=b 5=m 4=j 3=l 2=a 1=nc

all for the samsung hna-08ms16 of which i have two because of some guy taking apart a stereo that broke and giving to me for the price of shipping.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 20, 2016, 07:23:58 am
Also as i understand it i have to cycle the grid but how do i use my clock (schematic included) output to display on this, changing as little as possible preferably. i know ill have to move the transistors to after the microcontroller, well maybe no have to but theyd do me more good there im sure. I have a vague thought of multiplexing ics but thats just a thought i would kinda like to avoid the programming nightmare of a chip big enough to do a one to one. that would be somewhere near 100 io pins. and i know im asking alot of questions but this IS my first microcontroller project, i may as well be in the desert on a horse with no name.
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 20, 2016, 09:00:03 am
14 segment 'starburst' displays,  + 8 digits = 22 pins.  There are at least 9 symbols + d.p. and colon, so they cant be done as an extra segment in each digit.  They must be connected as 'segments' in an extra 'digit' so one more pin.  + two for the filament = 25 pins. 

Segment lines are phosphor cored anodes, all in parallel for the same segment position and digit pins go to the grids for each character. 

As many hobbyist friendly MCUs don't have enough pins, assuming you aren't going to use a dedicated VFD driver chip, the easy option would be to use a chain of 74HC595 octal SIPO shift registers as an I/O expander  to provide the 23 segment and digit signals,  It has a SPI compatible interface with a latch enable pin so all outputs can be updated simultaneously.   You then need a high voltage driver, but you don't know how high until you either characterise your display or find a datasheet.  It needs to be able to sink and source as floating grids can cause problems.  There are various options here depending on the voltages involved.

As you're used 4026 combined decade counters and 7 segment decoders in your clock, there is NO easy way to interface it to this display.  Just about the only option short of a full ground-up redesign of your clock, would be a 42 input PISO shift register (built from six individual octal ones) to read all the segment patterns under MCU control, but that's frankly crazy and a far better choice would be to feed the MCU a precision clock signal and have it keep time in code, replacing all the logic in your clock.
Title: Re: Vacuum fluorescent display to clock display
Post by: helius on September 20, 2016, 09:05:28 am
It's a lot easier (and more likely to work) to use VFD driver chips like MAX6932 instead of rolling your own drivers.
Controlling them with a microcontroller (or using programmable logic) is very easy since they use a pretty normal 4-wire interface.
Identifying the pins on the VFD goes like:
1. identify the filament pins. usually there are a group on each side of the display that have a pretty low resistance between them. Use continuity mode on your DMM
2. from those remaining, identify the grids and anodes. You can tell them apart because when multiple grids are powered together with one anode pin, the same segment will be lit in more than one character. And vice-versa when you power multiple anodes and one grid pin.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 20, 2016, 09:10:08 am
It's a lot easier (and more likely to work) to use VFD driver chips like MAX6932 instead of rolling your own drivers.
Controlling them with a microcontroller (or using programmable logic) is very easy since they use a pretty normal 4-wire interface.
Identifying the pins on the VFD goes like:
1. identify the filament pins. usually there are a group on each side of the display that have a pretty low resistance between them. Use continuity mode on your DMM
2. from those remaining, identify the grids and anodes. You can tell them apart because when multiple grids are powered together with one anode pin, the same segment will be lit in more than one character. And vice-versa when you power multiple anodes and one grid pin.

ill consider a driver chip because that sounds very sane only problem is it doesn't turn up on ebay so if you could be kind enough to point me in the direction of an obtainable chip it could work
for everything else ive already plotted the pins
Title: Re: Vacuum fluorescent display to clock display
Post by: FreddyVictor on September 21, 2016, 10:24:34 am
MAX6932 isn't the easiest part to get hold of AFAICT
however, you can daisy-chain other more-readily available chips together to achieve the number of outputs
MAX6921 (http://www.digikey.co.uk/product-search/en?keywords=max6921) has 20 outputs, so putting 2 of these together would give 40 outputs

If this insufficient pins, then you could decide to either not use some of the pins or, join some up so 2 or more elements are on at the same time
eg the ':' elements may be 2 separate pins but you could connect them together

note these are MAXIM chips so not overly cheap !
Title: Re: Vacuum fluorescent display to clock display
Post by: Buriedcode on September 21, 2016, 12:57:09 pm
I see Ian M is the only one so far to mention voltage.  VFD's are not LED's, they require grid voltages 50-70V taht require HV buffers to cope.  They are a bitch to drive without a dedicated chip (and hard to find transformers) to do the job for you.  I managed to get one running from a car stereo display, it took far too long and even then I re-used the onboard power supply.

Do yourself a favour and start off with an LED display, it'll be a good excuse to start using microcontrollers.  One you have that, then you can work on the power supply for the VFD
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 22, 2016, 03:13:59 am
 i think i have the power supply figured out, nothing stops me from using multiple transformers of which i have plenty, i also made my own chip out of transistors (schematic/explanation below)
 the arduino code that makes my plan work for those into that kinda thing (tested, not on the vfd yet but ive yet to find any faults in my design or plan)
 
int IO1 = 4;
int IO2 = 5;
int IO3 = 6;
int IO4 = 7;
int IO5 = 8;
int IO6 = 9;
int IO7 = 10;
int IO8 = 11;


void setup() {
  pinMode (IO1, OUTPUT);
  pinMode (IO2, OUTPUT);
  pinMode (IO3, OUTPUT);
  pinMode (IO4, OUTPUT);
  pinMode (IO5, OUTPUT);
  pinMode (IO6, OUTPUT);
  pinMode (IO7, OUTPUT);
  pinMode (IO8, OUTPUT);
}

void loop()
 {
 digitalWrite (IO1, HIGH);
 delay (1);
 digitalWrite (IO1, LOW);
 digitalWrite (IO2,HIGH);
 delay (1);
 digitalWrite (IO2, LOW);
 digitalWrite (IO3,HIGH);
 delay (1);
 digitalWrite (IO3, LOW);
 digitalWrite (IO4, HIGH);
 delay (1);
 digitalWrite (IO4, LOW);
 digitalWrite (IO5, HIGH);
 delay (1);
 digitalWrite (IO5, LOW);
 digitalWrite (IO6, HIGH);
 delay (1);
 digitalWrite (IO6, LOW);
 digitalWrite (IO7,HIGH);
 delay (1);
 digitalWrite (IO7, LOW);
 digitalWrite (IO8,HIGH);
 delay (1);
 digitalWrite (IO8, LOW);
 delay (1);
 
}

thank you freddy for that part number, but overall what do you think of my solution?
Title: Re: Vacuum fluorescent display to clock display
Post by: FreddyVictor on September 22, 2016, 08:34:07 am
i think i have the power supply figured out, nothing stops me from using multiple transformers of which i have plenty, i also made my own chip out of transistors (schematic/explanation below)
 the arduino code that makes my plan work for those into that kinda thing (tested, not on the vfd yet but ive yet to find any faults in my design or plan)
 <snip>
thank you freddy for that part number, but overall what do you think of my solution?
If you're going for discrete transistor solution, then you'll need help from others on this forum as I'm not an EE, more programmer !

my experience of VFD's is from this project (http://www.johngineer.com/blog/?p=1595) which I reproduced

I can't see a schematic so it's not really possible to put the code you posted into context
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 22, 2016, 10:11:50 am
@neo,
So does your code drive multiplexed 7 segment LEDs O.K.?  If not, don't bother building a VFD driver circuit!   (Although you've got a 14 segment 'starburst' display it can be wired as 7 segment for initial experimentation by paralleling the two center horizontal segments and grounding the rest of the radial segments, reducing the number of HV pin drivers you need to build by a third.)

@BuriedCode:  12V DC to 100V boost circuits capable of providing up to 100mA at up to 100V  (figure on 14 segments + a grid @6ma each) without a tapped inductor or transformer are possible.  A simple boost converter with a beefy external chopper transistor* feeding a Cockcroft–Walton voltage multiplier in place of the normal rectifier will do it - use a doubler for 32 to 66V and a tripler for 66 to 100V.  Efficiency wont be great, but as long as it doesn't overheat, who cares for a hobby project?  Unfortunately that means you'll need a separate AC supply for the filament, but you can use a H-bridge + PWM for that, alternating the 'direction' on each PWM cycle to maintain a net DC balance while letting you vary the filament current under software control.   The whole lot can be done in the same MCU as the display control if it has two PWM modules (one full-bridge), a comparator that can trip off the PWM output for cycle-by-cycle current limiting, and an ADC.

* Beefy & external,  because it has to withstand the charging current spike of the caps in the multiplier every time it turns on.

Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 22, 2016, 01:50:40 pm
i think i have the power supply figured out, nothing stops me from using multiple transformers of which i have plenty, i also made my own chip out of transistors (schematic/explanation below)
 the arduino code that makes my plan work for those into that kinda thing (tested, not on the vfd yet but ive yet to find any faults in my design or plan)
 <snip>
thank you freddy for that part number, but overall what do you think of my solution?
If you're going for discrete transistor solution, then you'll need help from others on this forum as I'm not an EE, more programmer !

my experience of VFD's is from this project (http://www.johngineer.com/blog/?p=1595) which I reproduced

I can't see a schematic so it's not really possible to put the code you posted into context

it isnt just you i forgot to put it there somehow also as for the code all it does is switch individual transistors (or in the case of my schematic layers of transistors) on and off very fast
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 22, 2016, 07:56:03 pm
schematic revision
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 22, 2016, 09:02:08 pm
Your level shifting and digit and segment drive circuits don't make any sense.

Draw ONE segment and ONE digit's circuit in full with all transistor symbols, all resistors, all component values and part no.s, and named input and outputs e.g, from the same segment in other digits, from the 4026 chip for the segment signal and from the multiplexing pulse generator for the digit select signal and to one each of the VFD's digit grid and segment anode pins. 

My best guess is, depending on the transistor arrray types, your current schematic will either do nothing or blow the 4026 chips and multiplexing pulse generator immediately on switch-on!  |O
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 22, 2016, 10:20:26 pm
You'll need something like this to actually drive the grids and segment anodes effectively without frying your logic:
(https://www.eevblog.com/forum/projects/vacuum-fluorescent-display-multiplexing-problem/?action=dlattach;attach=257765;image)
It can do 250ns 10%..90% rise and fall times when swinging 100V into a 10mA 100pF load.  It pulls low to 0.5V of ground, and depending on the load current, high to within 3V of +HT.   For operation up to 100V, R1 should be rated 1/2W.

You also need to maintain a positive bias on the cathode (filament) which is commonly done by putting a Zener between the CT of the filament transformer secondary and ground
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 22, 2016, 11:46:46 pm
Your level shifting and digit and segment drive circuits don't make any sense.

Draw ONE segment and ONE digit's circuit in full with all transistor symbols, all resistors, all component values and part no.s, and named input and outputs e.g, from the same segment in other digits, from the 4026 chip for the segment signal and from the multiplexing pulse generator for the digit select signal and to one each of the VFD's digit grid and segment anode pins. 

My best guess is, depending on the transistor arrray types, your current schematic will either do nothing or blow the 4026 chips and multiplexing pulse generator immediately on switch-on!  |O

All transistors are MPSA42 and i do plan to use current limiting resistors on the transistor bases i just didnt draw them in
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 22, 2016, 11:53:45 pm
why 100 volts? where does the signal enter in that schematic and yes my code was able to drive a multiplexed led
Title: Re: Vacuum fluorescent display to clock display
Post by: helius on September 23, 2016, 12:08:12 am
Vbb, the voltage between the anodes and the filament (cathode), needs to be high enough to accelerate the electrons over a fairly short distance (~5mm). Typically it's between 45 and 90 V. Using 100V to run the driver allows for some losses in the switching transistors.
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 23, 2016, 02:52:32 am
V1 provides a 5V pulse simulating a logic signal.  100V is the maximum voltage you are ever likely to need.  Some VFDs can work with anode to cathode (filament) voltage differences (Va-k) much lower than that, as low as 30V for some types of multiplexed display.  However the off-state grids and anodes need to be pulled far enough negative with respect to the cathode to ensure they are fully cut-off even at the negative going peak of the filament drive waveform.  This means the mean cathode voltage probably needs to be somewhere around +7V to +12V, which adds to the +HT voltage required.  Somewhere in the 40V to 50V range for HT is common for planar VFDs.  Russian tubular VFDs generally run at higher voltages for pulsed (multiplexed) operation - up to 80V Va-k in some cases, hence the design requirement for a 100V capable driver.

You *REALLY* don't want to over-drive the anodes or grids as excess Va-k or Vg-k can cause sputtering and rapid degradation of the phosphor, the high emissivity filament surface treatment and even darkening of the glass window.  Long term under-driving is also bad - it causes cathode poisoning and loss of emission.   Over-running the filament obviously shortens its life and Noritake specifically caution against under-running the filament as a method of brightness control.   

Must read: Noritake's A Guide to Fundamental VFD Operation (https://www.noritake-elec.com/display/vfd_operation.html)

Establishing the correct filament voltage without a datasheet can be difficult - as a rough rule of thumb you shouldn't be able to see it glow in a darkened room.   It would be easier if enthusiasts with VFDs they have datasheets for or OEM displays in equipment in good working order would measure the cold resistance of their VFD filaments, and post that with either the typical filament voltage and current from the datasheet or measured in original application circuit with a true RMS meter that can handle the frequency of the filament drive, so we can calculate the ratio of cold and hot resistances as this should be more or less constant for all tugsten filaments running at the same temperature.

I haven't yet found datasheets for the VFDs I've got on hand, but the cold filament resistances and physical description are as follows:

Make, Model, Dimensions (ex. pins and 'pip'), Digit/Char height, Cold Resistance
Description

NEC, FIP13C8C, 112mm x 26mm x 8mm, 8mm  20 ohms
'Bathtub' cover glass and flat glass back with visible interior metallisation traceable to the filament and each segment and grid.
12 digits + M, minus and left arrow at leftmost position,  10 digit anodes (7 segments, dot/comma on right and apostrophe on left of each digit. The M - and left arrow have separate anodes.), 3 parallel filaments, 28 pins bonded to one edge of the back glass, 0.1" pitch arranged in two groups of 14 with a 5 pin gap centered on the evacuation 'pip' as follows in one line from left end:


1 2  3  4  5  6  7  8  9  10 11 12 13 14
F Am A- A' A< Gs Af Ag Ae G1 G2 G3 G4 G5

5 pin gap (pip)

15 16 17 18 19  20  21  22 23 24 25 26 27 28
G6 G7 G8 G9 G10 G11 G12 A, Ad A. Ac Ab Aa F

All Aa-Af anodes according to usual seven segment notation.

Futaba, 16-SD-01G, 97mm x 20mm x 6mm, 5mm, 56 ohms
Planar with visible multilayer metallisation not traceable to pins.  Pins fused through frit seal. pip on end side, bottom right
16 char 5x7 dot matrix,  presumably 35 dot anodes. 16 grids, 2 parallel filaments, 64 pins, 31 along top edge and 33 along bottom edge.  Filament is end pins of 33 pin edge.  Grids also appear to be on this edge.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 03:17:18 am
i just noticed on the example in the simplified schematic i forgot to connect the segments to the display but it is just the example
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 23, 2016, 04:19:32 am
UUUUGGGHHHHH!!! |O

Iv'e traced ONE segment and digit from your schematic and redrawn it as I asked you to:
(https://www.eevblog.com/forum/projects/vacuum-fluorescent-display-multiplexing-problem/?action=dlattach;attach=257798;image)
Edit: Q1 should be marked Q85-92

It cant work.  Its incapable of delivering more than 3.8V to any VFD electrode, and will do so to the selected grid and *ALL* the anodes! :palm:

You obviously don't 'grok' bipolar transistors!  :horse:

I believe you are using various segment outputs of your 4026 counters/7 seg. display drivers for your clock logic, so you cant simply gate the 4026 chip's display enable pins with your multiplex digit select signals and diode OR their outputs together to feed the segment anode drivers.   Ideally you'd rip out all the 4026 chips and the associated logic and rebuild with 3x 4518 dual BCD counters, feeding 3x 4508 dual 4 bit latches with tristate outputs (with their STROBE and OUTPUT DISABLE pins tied together and driven by an active low 1 of N digit select signal) to multiplex the BCD into a single 4055 7 segment decoder with its DF pin tied high for active low segment outputs.  Get the digit select lines from a 4017 and some 4049 inverters.  The active low segment and digit signals can directly drive an instance of the VFD level shifting driver circuit I posted earlier.

Your best way forward keeping your existing 4026 based clock circuit and using only 4000 series CMOS, would be to collect your separate counter's segment outputs using a 4051 8:1 analog switch for each multiplexed segment, selected  by a 3 bit binary counter (low bits of a 4018), and inverted with 4049s to drive the VFD level shifter for the anodes.  The digit select signals to the grid drivers need a 3 to 8 line decoder with active low outputs - use a 4556 dual 2 to 4 line decoder + one inverter from a 4049 to invert the /E signal to one of them, driving the enables from the MSB of the 3 bit digit select.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 05:06:57 am
so why cant it deliver more than 3.8v?
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 05:13:15 am
forgive me if im a bit dense but i think it should work as transistor 1-42 turns the logic level clock out to a higher voltage and then the transistors after that allows for the micro controller to switch it on and off, such as to say when the clock says 12:00:00 for instance then it would turn on the right transistors and then between those and the vfd are the ones switched by the microcontroller. and on the grid transistors they are linked to their corresponding set that goes to that grid.
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 23, 2016, 05:37:43 am
The base-emitter junction of a bipolar transitor in normal operation is a forward biassed diode.  For a NPN, if the emitter ever rises above the base voltage, the diode becomes reverse biassed and the transistor turns off.  If you ever exceed about 5-7V reverse bias the B-E junction tends to Zener which usually permanently damages the transistor.

Referring to my redrawn version of your schematic, IOn are 5V logic signals so Q93-100 emitters can never be driven above 4.4V (normal emitter follower behaviour).  Therefore the emitters of Q85-92 driving the grids and Q43-84 driving the anodes can never rise above 3.8V (assuming minimum Vbe of 0.6V).  Additionally it doesn't matter if the segment lines to Q1-42 are high or low, or even if Q1-42 are present or shorted out as when they are off, the B-E diode junction of Q43-84 lets their base current pull their emitters up to the same voltage, no matter what's happening at their collectors.  |O :palm:
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 06:24:35 am
so how DO i make it work? i got an idea what if i used relays?  Thank you very much ian by the way i know im slow but to my credit i jumped straight off the shallow end and into the ocean. this is my first circuit anywhere near this complex i guess its a bit of a trial by fire.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 06:52:43 am
relays would work speed wise, and i could be operated at the voltage i need and give me up to 100v out at the amperage id need, so what would be wrong with this idea? besides the cost that is
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 08:07:04 am
my plan to cope with high voltage unless theres a better/ easier way
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 23, 2016, 09:38:31 am
Relays wouldn't work (well maybe mercury wetted reed relays would).   You are in the USA so have 60Hz mains.  You need AC for the filament so for simplicity will be using a low voltage transformer, with a series resistor to adjust the filament current, and a pair of fairly low value resistors across the filament to fake a center tap and keep it balanced about its nominal Vk.   Something like:
(https://www.eevblog.com/forum/projects/vacuum-fluorescent-display-multiplexing-problem/?action=dlattach;attach=257835;image)
Caution: verify the actual filament voltage and current to get its hot resistance using a DC bench supply and check the transformer output voltage before choosing R1.  It may need a series dropper resistor to keep R1 dissipation within the range of presets you can afford, or you my even be able to use a fixed resistor.  Getting it wrong at best will burn up R1 and at worst will blow your VFD filament

If you'd read the Noritake link I gave (section 4) you'd know that with a 60Hz filament supply the recommended scan rate is >100Hz.  You have 8 digits to scan, so each digit must be on for no more than 12.5ms.  You would need relays that can switch sufficiently faster than that to allow for inter-digit blanking to prevent ghosting, so 3ms is a reasonable target.  That's 6ms to open and close again which is equivalent to 167Hz, about two or three times faster than you can push a normal small relay.  If you find any that can handle it, they'll probably only be rated for a life of 50M operations, and at 100Hz scan rate, you'll wear them out in a bit under 6 days!

Back in reply #35 I suggested 4000 series logic chips and  two alternative general strategies to provide appropriately multiplexed signals to control discrete transistor VFD drivers (like I suggested in reply #29), or you could simply start over with an Arduino and a couple of the Maxim VFD driver/controller chips suggested earlier.

Do you have the make and model of the Stereo your HNA-08MS16 displays were salvaged from so we can find a schematic and get the voltages needed to run your VFD?  If not, I found a Samsung service manual for a portable stereo containing a Samsung HNA-08SS23 display which uses 2.3VAC Vf  and +5V and -25V giving a Va-k of 30V, so that would be a good place to start.  You can use an adjustable CC/CV DC bench supply for the filament for initial testing and a stack of PP3 9V batteries on top of the adjustable output of another bench supply to the the anode and grid voltages up where you need them.   Once you have it lighting up a few segments of one digit, build one of the two transistor driver I proposed, and pulse it with a 555 to give a 1:10 duty cycle (10% ON time) and see if the HT supply voltage needs adjusting to get acceptable brightness.   If the final HT voltage is under about 40V there are a *LOT* more options for chips that can drive the anodes and cathodes.   


Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 02:11:50 pm
lets say i just give up on the original clock schematic i dont care at this point how it has a clock so long as it does and it can drive the displays my original 4026 is apparently getting nowhere so what do i do?
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 23, 2016, 03:15:24 pm
Well the *easy* solution for anyone who can code in C is to string together enough MAX6921 20 output VFD drivers to handle your display and use an Arduino and a RTC chip.  Hackaday has featured several projects (https://hackaday.com/tag/max6921/) like that, or use a pair of MAX6920 12 output ones, cascaded to act as one 24 bit register.  That gives you 24 output lines - perfect for your 25 pin display as 2 pins are the filament.   Digikey has stock of MAX6920 (http://www.digikey.com/product-detail/en/maxim-integrated/MAX6920AWP-/MAX6920AWP--ND/1512955) in the USA.

Alternatively, you can build up 23x the discrete driver I posted (or 15x if you parallel anodes to use it as seven segment only) and drive it from anything that can produce the required active low  multiplexed segment patterns and digit pulses.  I'd use a 74HC138 for the digit pulses with a 3 line digit address + a PWM intensity and blanking control feeding one of its enable pins.  That gets it down to 4 digital outputs, which means you need 18 total to run the display.  An Arduino Uno has 20 pins that can be configured for digital I/O, so that's a viable option allowing two spare pins, one for a resistor ladder of buttons and the other to drive an alarm buzzer.  Hint: use digital pins 0 and 1 for  74HC138 address pins as if you use them for a lo-Z load you cant send sketches to it anymore!

The display + my discrete drivers would be signal compatible with an 8 digit multiplexed common anode LED display with high side MOSFET or bipolar digit drivers so build one of those first, either in LSI CMOS logic or as an Arduino shield so you don't have high voltage hassles during development.

If you still want to do a LSI CMOS logic clock, its probably slightly easier in 74HC series as that has the best of 4000 series CMOS + all the standard TTL functions as well.  e.g.its got a nice octal transparent latch with tristate outputs that makes it *MUCH* easier when bussing data around as its inputs and outputs are in order on opposite sides of the chip.   However if you want to stick with the 4000 series logic you are already using, simply download the datasheets and check availability of the chips I mentioned in reply#35 and get stuck in.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 05:00:26 pm
i think im going to try this idea https://hackaday.io/project/7805-vfduino not mine but it would work mine is apparently an aberration of physics to even contemplate
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 23, 2016, 05:59:09 pm
That should work for you.  You need two MAX6920 chips daisy-chained (Arduino SPI SDO to DIN of first, DOUT to DIN of second, SPI SCK to CLK of both, an I/O for /CS to LOAD of both and a PWM output to PWM the BLANK pin of both for brightness control) to fully support your display, but you can get 4 digits wired as a 7 segment display working on your display as if it was his  IVL2-7/5 VFD. 

I don't like the way he's running the filament on DC, It will do for experimenting but not for long-term use on a display with more digits.

If you don't want to use a transformer, you can drive the filament off an Arduino PWM output with an 5V H-bridge capacitively coupled to the filament (at both ends).  Use the same fake center tap resistors and Zener as I showed for the transformer drive, and control the effective filament voltage by selecting the coupling capacitors value and tweaking the PWM frequency.

H-bridges commonly come two to a chip - use the other one to drive a small speaker off another PWM for the alarm.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 06:06:18 pm
i cant get my around around those connections a schematic would be useful
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 23, 2016, 06:16:44 pm
See the second image down in the section 'Multiple Slaves' at https://learn.sparkfun.com/tutorials/serial-peripheral-interface-spi#multiple (https://learn.sparkfun.com/tutorials/serial-peripheral-interface-spi#multiple) then read the rest of the tutorial - you'll need it!

MAX6920 <> SPI
pin naming
CLK == SCK,
DIN == slave MOSI
DOUT == slave MISO
LOAD == inverted /SS

LOAD latches on the falling edge, but most SPI chip's chip select pins are active low and latch on the rising edge, so SS is normally /SS a low going pulse for the duration of the data transfer.  You can either use an inverter to fix it or handle it in software as the Arduino SPI module doesn't handle SS in hardware.

BLANK is just an active high display blanking pin, drive it from a PWM to control the brightness. 
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 06:23:58 pm
what is sdo?
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 06:34:43 pm
i am officially lost i have no clue what any of this does or how its meant to work, but then again my confusion is probably a good sign
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 23, 2016, 06:59:21 pm
what is sdo?
SDO is serial data out, a SPI signal.  The names MOSI for master SDO and MISO for slave SDO are preferred as that way you know the same name signal wires straight through (except when daisychaining).  (MOSI stands for Master Out Slave In, and MISO for Master In Slave Out)

i am officially lost i have no clue what any of this does or how its meant to work, but then again my confusion is probably a good sign

Lost with what?  If its SPI and the Sparkfun tutorial didn't help, maybe Wikepedia's article https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus (https://en.wikipedia.org/wiki/Serial_Peripheral_Interface_Bus) will clarify it for you.

If its hooking a MAX6920 to the VFD, well, open its datasheet, sketch up a schematic then show it to us and ask us how to fix it.  We cant help if we don't know which specific detail you aren't 'getting' and you drawing an incorrect schematic hilights what you don't understand yet.

If you've got a scanner, a sharp 2B pencil, a putty eraser,  steel ruler and a pad of drafting paper (or at least good quality heavy white copier paper) its a lot quicker and often a lot clearer than drawing schematics in a CAD or schematic capture package.  It also helps you avoid the temptation  to draw every single sub-circuit that is repeated N times, and reduces the amount you'll try to cram onto one page.   *PLEASE* do something about those horrible PDF schematics you've been posting - cropped screenshots reduced to 16 colour GIFs or PNGs like I've been posting are better for smaller schematics.  You may have to use PDF for really large complex ones, but anything that big needs a block diagram as an overview, with named dotted boxes round the sections of the main schematic corresponding to the blocks of the overview diagram, and it can often be better to do each block as a separate sheet with a single table for the whole system of all the interconnections, with the signal names, the  block/board they go to and, if off-board, their connector pin designations at all boards and their wire colour codes.

Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 07:09:30 pm
how does the max 6920 do i connect a grid to every other pin or what?
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 07:17:12 pm
is this better? also this is my exact problem my brain cant wrap wround the fact that were are no inputs that there isnt defined grid pins, and then theres the data lines
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 23, 2016, 07:49:52 pm
OK, that does help clarify where you're stuck. You have to decide how to partition the MAX6920 OUTn pins between VFD grids and anodes as they can be used for either in any order as long as your firmware knows what's connected where.  AFAIK your display has 9 grids, digits 1 - 8 + the symbols, and 14 anodes, which is too many for a single MAX6920.

Are you going to wire it as 7 segment with the two middle half bars in parallel and the other radial segment anodes + the symbol grid grounded, or are you going to use two MAX6920 chips?

Whatever data the Arduino SPI peripheral spits out ends up on the OUTn pins.  its sent MSB first so the OUT0 pin of the first MAX6920 in the chain ends up with the LSB of the last byte sent.  The second MAX6920 chip can be treated as part of the same device only with 12 added to all its OUTn pin numbers.  Assuming you have two chips daisychained you'll need to send three bytes with Arduino SPItransfer() to update all the OUTn pins.  The first byte you send ends up in the second chip in the chain on its highest numbered pins, the second byte straddles both chips and the last byte eds on the low numbered pins of the first chip.

It would be convenient to allocate grids in sequence starting from OUT0 and anodes also in the order you want to write the segment pattens in starting from the highest numbered OUTn pin . . . .
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 08:01:21 pm
only 8 grids,
chip 1 out0 grid 1, out 2 grid 2, out 4 grid 3, out 6 grid 4,
chip 2 out0 grid 5, out 2 grid 6, out 4 grid 7, out 6 grid 8
out 11 A, out 10 B, out 9 C, out 8 D, out 7 E, out 5 F, out 3 G

would this work? also i have no clue how it knows WHAT to display but i assume it has to have something to do with serial in. and i have no clue how to even program for this
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 08:03:21 pm
also i plan to use as many chips as i need because with this new system ill get to use both (years months days hours minutes and seconds) but figuring one out for now is complex enough
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 23, 2016, 08:50:10 pm
only 8 grids,
chip 1 out0 grid 1, out 2 grid 2, out 4 grid 3, out 6 grid 4,
chip 2 out0 grid 5, out 2 grid 6, out 4 grid 7, out 6 grid 8
out 11 A, out 10 B, out 9 C, out 8 D, out 7 E, out 5 F, out 3 G

would this work? also i have no clue how it knows WHAT to display but i assume it has to have something to do with serial in. and i have no clue how to even program for this
Sure it would work, if your firmware (sketch) fiddles the bits into the correct order before calling SPItransfer().  However the code will be much easier to write if you put ALL the grids in order on the first chip in the chain starting from OUT0 and going up to OUT7.  That way you simply send the following codes in the last byte to select the grid to activate:

grid1 0x01
grid2 0x02
grid3 0x04
grid4 0x08
grid5 0x10
grid6 0x20
grid7 0x40
grid8 0x80

The 14 segment bit patterns you simply type in in order in binary
e.g. 0b10110101010010 for the segments a b c d e f g1 g2 h i j k l m into a const unsigned integer array that stores the segment patterns for as much of the ASCII character set as you care to support  (probably 0-9, A-Z, * and space).  You then write a function that converts ASCII to a segment pattern from the array, changing character codes that aren't in your array to something like a boxed X.



Title: Re: Vacuum fluorescent display to clock display
Post by: Buriedcode on September 23, 2016, 09:37:46 pm
i am officially lost i have no clue what any of this does or how its meant to work, but then again my confusion is probably a good sign

It seems there is a big gap between your understanding, and what people are discussing.  Google is a wonderful tool and part of the joy/hassle/effort of both building/designing something you don't really know about is breaking it down into smaller 'modules', then breaking them down, perhaps even googling things like 'SDO' when you don't know what it is.

This is why myself and others have suggested starting small.  You've set yourself a task of driving a VFD, which is a cool project, but rather than try your ideas of designing it all straight off and getting shot down, start small, drive a 7 segment LED display, then drive several multiplexed, at each stage google anything you don't understand.  Computing and engineering arguably have the most tutorials, example projects, and online lessons than any other subject.  Also, datasheets, whilst daunting at first, are your friend.  Not only do they provide all the specs for a chip you need (as a reference to look up, not memorise) but also they generally give very good explanations of how a device operates.

If you get stuck with not knowing how a transistor works - again, google it.  Wikipedia is a great resource but in an effort to be precise can often be too 'heavy' which turns people of. But there are many great websites that can explain what you *need* to know using transistors for electronics, rather than talking about electrons, holes, and junctions.

Apologies if this seems patronising, but whilst there are many resources for beginners, rather a lot light an LED, then pick a project like 'HV nixie tubes' or something that suddenly pulls together lots of different areas, then they post, get frustrated with answers, and get put off.  Thres a reason why there are so many example projects about - all at different levels
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 11:05:09 pm
ah i get it now its a computer chip (paraphrase please dont persecute me because that how i see it) so its all binary, im beginning to comprehend it now i think (the hardware not the programming and buriedcode with all due respect i have done enough small things ive build 3 amplifiers out of old electronics im bored of small things i need something like this to engage me and i try google but i dont have much of a talent for finding complex answers
Title: Re: Vacuum fluorescent display to clock display
Post by: Buriedcode on September 23, 2016, 11:26:59 pm
ah i get it now its a computer chip (paraphrase please dont persecute me because that how i see it) so its all binary, im beginning to comprehend it now i think (the hardware not the programming and buriedcode with all due respect i have done enough small things ive build 3 amplifiers out of old electronics im bored of small things i need something like this to engage me and i try google but i dont have much of a talent for finding complex answers

I hate to sound like a pretentious nobbend but .. perhaps you are asking the wrong questions :)  That said one could argue there aren't any wrong questions.. but I'm still surprised at how many either google something incredibly vague ("how to java?") or overly specific ("how to make a clock using xxx and xxx but not in that way").

Firstly, did you google other VFD projects and looked at what they did?  Perhaps they used an off the shelve chip designed for that exact purpose (we are spoiled these days, as often there are dedicated devices that will do pretty much what you want).. or perhaps it was using a micro, Arduino, used to control another circuit.  There is a reason few build clocks out of pure logic (and the associated drivers for whatever display they're using) - it uses a lot of chips, a lot of connections, and gets complicated very quickly.  In fact, I suspect many do it purely for 'fun', because using a micro is considered 'the easy way'.

I googled "VFD clock project".  first result:
http://www.instructables.com/id/Arduino-VFD-Display-Clock-Tutorial-A-Guide-To-VFD-/ (http://www.instructables.com/id/Arduino-VFD-Display-Clock-Tutorial-A-Guide-To-VFD-/)

?
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 23, 2016, 11:53:32 pm
that is a nice find a good read thanks
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 24, 2016, 01:03:30 am
not that i plan to use it on this one necessarily but couldnt i use the transistors and buck boost ics? just a idea
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 24, 2016, 02:36:26 am
Sure you could - you've got all the bits you need, you'd just have to put them together.  If you can drive a multiplexed common anode LED display with high side transistors to switch each digit's anodes from your Arduino, or from your board full of CMOS logic, then the two transistor + diode level shifter I posted will let you drive the equivalent pin on a VFD: grids in place of LED digit anodes, and anodes in place of LED segment cathodes.  Just like the LED, you send logic '0' to the pin's level shifter to turn that digit grid or segment anode on.  The MAX6820 doesn't do anything that couldn't be done equivalently  with a chain of SIPO latching shift registers (e.g. 74HC595) controlling discrete transistor level shifters.

However your original idea of using 'layered' transistor logic was flawed.  Not only did you forget the need for a level shifter but also you wanted to select the output of one of six decoded 7 segment digits using transistors as transmission gates and pass it to the corresponding display anode pin.  Unfortunately transistors don't work that way and the amount of work to make the multiplexing segment selector work would have been much higher than doing it using MSI CMOS logic chips.  If you want to go back and re-invent RTL or DTL (transistor) logic, I'm not going to stand in your way, as its an interesting learning exercise but building more than a small handful of gates using discrete transistors is masochism or obsession and will get you the reaction of guarded mild interest to your face followed by people quietly walking away shaking their heads as soon as your back is turned!

Even if you want to tackle the project as an exercise in 'retro' purism, you need to come up with a realistic set of rules and target era to make the project feasible within your budget.  eg: "I can use any chip that was available before <date> even if its later production." is a good one to have maximum fun while keeping costs down. The earlier you set your design cutoff date, the harder and more expensive it is to source components and its just not worth it for the early stuff unless someone's paying you lots & lots of money e.g for a museum quality working replica  of an Apple I with authentic date codes on the chips.

Rules for surviving social encounters with wierdos
1. Be polite to 'crazy' but don't interact with 'crazy' more than the minimum you can get away with.
2. If possible DONT ask questions, and definitely don't ask questions that may trigger 'crazy' to try to explain their crazy.
3. Answer any of 'crazy's questions as briefly as possible consistent with not encouraging a followup question.  'I don't know' is usually a good choice of answer, or give minimal directions to a place far away from you!


Believe me, you don't want to get tagged as the wierdo  with the all transistor VFD clock - Back in 1970 it would have been mega-cool but now in 2016 it just comes across as obsessive - the cool stuff's already been done better by others (e.g the discrete transistor 6502 (http://monster6502.com/) guy) and even so, you wouldn't want to invite them to a social occasion not hosted at a hackerspace!
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 24, 2016, 02:52:51 am
i had the idea of using transistors in combination with buck boosters as a back up in case i couldn't crack the code and make it work that way, one thing i dont get about the programming is how does the chrono output time and how do i program the maxim6920, well that and i have no clue on how to actually do it
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 24, 2016, 03:14:54 am
as i understand it i need to write a program that takes asciii translates each character to a set out of 14 possible segments so that each letter a-z numbers 0-9 + - = * and space are all represented as products of the 14 segments, if it is how i understand i give the pins of the maxim6920 designations in binary
Title: Re: Vacuum fluorescent display to clock display
Post by: FreddyVictor on September 24, 2016, 06:58:49 am
as i understand it i need to write a program that takes asciii translates each character to a set out of 14 possible segments so that each letter a-z numbers 0-9 + - = * and space are all represented as products of the 14 segments, if it is how i understand i give the pins of the maxim6920 designations in binary
correct, you will effectively need to set up a font definition of sorts
it will convert a character into a seies of segment control intructions (as IanM has said)

for IV2-7/5 which can only really do numbers, this is my 'font'
Code: [Select]
  #define VFD_DIGIT_1 (1<<6)  // Digit 1
  #define VFD_DIGIT_2 (1<<10)
  #define VFD_DIGIT_3 (1<<4)
  #define VFD_DIGIT_4 (1<<0)
  #define VFD_DIGIT_DP (1<<7) // Decimal Point
 
  #define VFD_SEG_A (1<<1) // Segments
  #define VFD_SEG_B (1<<3)
  #define VFD_SEG_C (1<<11)
  #define VFD_SEG_D (1<<5)
  #define VFD_SEG_E (1<<9)
  #define VFD_SEG_F (1<<2)
  #define VFD_SEG_G (1<<8)

// VFD Numbers
#define VFD_NO_0 ((uint16_t) VFD_SEG_A|VFD_SEG_B|VFD_SEG_C|VFD_SEG_D|VFD_SEG_E|VFD_SEG_F)
#define VFD_NO_1 ((uint16_t) VFD_SEG_B|VFD_SEG_C)
#define VFD_NO_2 ((uint16_t) VFD_SEG_A|VFD_SEG_B|VFD_SEG_D|VFD_SEG_E|VFD_SEG_G)
#define VFD_NO_3 ((uint16_t) VFD_SEG_A|VFD_SEG_B|VFD_SEG_C|VFD_SEG_D|VFD_SEG_G)
etc

uint16_t VFD_numbers[] = {
VFD_NO_0, VFD_NO_1, VFD_NO_2, VFD_NO_3, VFD_NO_4, VFD_NO_5, VFD_NO_6, VFD_NO_7, VFD_NO_8, VFD_NO_9
};

then, to send the number 1 to digit 3, I then serialize (VFD_numbers[1] | VFD_DIGIT_3) and send to the VFD SPI
and do this @ 70 times a second for each digit

the exact bits you need to set will obviously depend on your circuit

nb: MAX6920 can only control 12 segments so you will need at leat 3 of these to get close to the number of segments on your VFD
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 24, 2016, 08:02:08 am
as i understand it i need to write a program that takes asciii translates each character to a set out of 14 possible segments so that each letter a-z numbers 0-9 + - = * and space are all represented as products of the 14 segments, if it is how i understand i give the pins of the maxim6920 designations in binary
Yes, that's right.  I know of a couple of Starburst14 'font' tables that have been made public, but I'm not sure about the segment bit order.  They are in Hex, so are a P.I.T.A to check manually compared to one defined in binary.

I'm currently working on an Excel spreadsheet to generate C code for these 'font' tables, that can be used to check existing 'font's, with a GUI to edit characters by clicking the segments.  Here's a preview of the editor dialog:
 (https://www.eevblog.com/forum/projects/vacuum-fluorescent-display-multiplexing-problem/?action=dlattach;attach=258043;image)

@Freddy,
nb: MAX6920 can only control 12 segments so you will need at leat 3 of these to get close to the number of segments on your VFD
I think you've made a mistake there. Neo's VFD only has 25 pins.  Subtract 2 for the filament and you have 23 other electrodes so he only needs TWO MAX6920 chips.
Title: Re: Vacuum fluorescent display to clock display
Post by: FreddyVictor on September 24, 2016, 08:30:48 am
Quote from: Ian.M
@Freddy,
nb: MAX6920 can only control 12 segments so you will need at leat 3 of these to get close to the number of segments on your VFD
I think you've made a mistake there. Neo's VFD only has 25 pins.  Subtract 2 for the filament and you have 23 other electrodes so he only needs TWO MAX6920 chips.
oh OK
thought 40+ was mentioned earlier in the thread, but have been keepin up -  in that case 2 is ideal :)
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 24, 2016, 08:58:45 pm
Quote from: Ian.M
@Freddy,
nb: MAX6920 can only control 12 segments so you will need at leat 3 of these to get close to the number of segments on your VFD
I think you've made a mistake there. Neo's VFD only has 25 pins.  Subtract 2 for the filament and you have 23 other electrodes so he only needs TWO MAX6920 chips.
oh OK
thought 40+ was mentioned earlier in the thread, but have been keepin up -  in that case 2 is ideal :)

my cmos clock has 42 outputs is where you got that number im no longer using that on this vfd also it has 27 pins, 2 of which are filaments and 1 of which is unused neatly coming to exactly 24 pins, 14 segments+the 2 specials=16 and 8 grid pins
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 25, 2016, 07:45:14 pm
Well, I've got my font editor going. Its still a bit unstable and incomplete, but its good enough to generate this:
Code: [Select]
// C source for font
// Generated by Ian.M's
// 14 segment font editor
unsigned int font[]={
   0x2000, // 0x00 NUL
   0x1000, // 0x01 SOH
   0x0800, // 0x02 STX
   0x0400, // 0x03 ETX
   0x0200, // 0x04 EOT
   0x0100, // 0x05 ENQ
   0x0080, // 0x06 ACK
   0x0040, // 0x07 BEL
   0x0020, // 0x08 BS
   0x0010, // 0x09 HT
   0x0008, // 0x0A LF
   0x0004, // 0x0B VT
   0x0002, // 0x0C FF
   0x0001, // 0x0D CR
   0x0000, // 0x0E SO
   0x0000, // 0x0F SI
   0x3FFF, // 0x10 DLE
   0x00FF, // 0x11 DC1
   0x3FFF, // 0x12 DC2
   0x3FFF, // 0x13 DC3
   0x3FFF, // 0x14 DC4
   0x3FFF, // 0x15 NAK
   0x3FFF, // 0x16 SYN
   0x3FFF, // 0x17 ETB
   0x3FFF, // 0x18 CAN
   0x3FFF, // 0x19 EM
   0x3FFF, // 0x1A SUB
   0x3FFF, // 0x1B ESC
   0x3FFF, // 0x1C FS
   0x3FFF, // 0x1D GS
   0x3FFF, // 0x1E RS
   0x3FFF, // 0x1F US
   0x0000, // 0x20 Space
   0x3FFF, // 0x21 '!'
   0x0120, // 0x22 '"'
   0x07AA, // 0x23 '#'
   0x2DAA, // 0x24 '$'
   0x0911, // 0x25 '%'
   0x06CC, // 0x26 '&'
   0x0020, // 0x27 '''
   0x0041, // 0x28 '('
   0x0014, // 0x29 ')'
   0x00DD, // 0x2A '*'
   0x00AA, // 0x2B '+'
   0x0001, // 0x2C ','
   0x0088, // 0x2D '-'
   0x3FFF, // 0x2E '.'
   0x0011, // 0x2F '/'
   0x3F11, // 0x30 '0'
   0x1800, // 0x31 '1'
   0x3688, // 0x32 '2'
   0x3C08, // 0x33 '3'
   0x1988, // 0x34 '4'
   0x2D88, // 0x35 '5'
   0x2F88, // 0x36 '6'
   0x2012, // 0x37 '7'
   0x3F88, // 0x38 '8'
   0x3D88, // 0x39 '9'
   0x3FFF, // 0x3A ':'
   0x3FFF, // 0x3B ';'
   0x000C, // 0x3C '<'
   0x0488, // 0x3D '='
   0x0081, // 0x3E '>'
   0x300A, // 0x3F '?'
   0x3F0A, // 0x40 '@'
   0x3B88, // 0x41 'A'
   0x3C2A, // 0x42 'B'
   0x2700, // 0x43 'C'
   0x3C22, // 0x44 'D'
   0x2780, // 0x45 'E'
   0x2380, // 0x46 'F'
   0x2F08, // 0x47 'G'
   0x1B88, // 0x48 'H'
   0x2422, // 0x49 'I'
   0x1E00, // 0x4A 'J'
   0x0394, // 0x4B 'K'
   0x0700, // 0x4C 'L'
   0x1B50, // 0x4D 'M'
   0x1B44, // 0x4E 'N'
   0x3F00, // 0x4F 'O'
   0x3388, // 0x50 'P'
   0x3F04, // 0x51 'Q'
   0x338C, // 0x52 'R'
   0x2D88, // 0x53 'S'
   0x2022, // 0x54 'T'
   0x1F00, // 0x55 'U'
   0x0311, // 0x56 'V'
   0x1B05, // 0x57 'W'
   0x0055, // 0x58 'X'
   0x0052, // 0x59 'Y'
   0x2411, // 0x5A 'Z'
   0x2441, // 0x5B '['
   0x0044, // 0x5C '\'
   0x2414, // 0x5D ']'
   0x0140, // 0x5E '^'
   0x0400, // 0x5F '_'
   0x0040, // 0x60 '`'
   0x3B88, // 0x61 'a'
   0x3C2A, // 0x62 'b'
   0x2700, // 0x63 'c'
   0x3C22, // 0x64 'd'
   0x2780, // 0x65 'e'
   0x2380, // 0x66 'f'
   0x2F08, // 0x67 'g'
   0x1B88, // 0x68 'h'
   0x2422, // 0x69 'i'
   0x1E00, // 0x6A 'j'
   0x0394, // 0x6B 'k'
   0x0700, // 0x6C 'l'
   0x1B50, // 0x6D 'm'
   0x1B44, // 0x6E 'n'
   0x3F00, // 0x6F 'o'
   0x3388, // 0x70 'p'
   0x3F04, // 0x71 'q'
   0x338C, // 0x72 'r'
   0x2D88, // 0x73 's'
   0x2022, // 0x74 't'
   0x1F00, // 0x75 'u'
   0x0311, // 0x76 'v'
   0x1B05, // 0x77 'w'
   0x0055, // 0x78 'x'
   0x0052, // 0x79 'y'
   0x2411, // 0x7A 'z'
   0x0094, // 0x7B '{'
   0x0322, // 0x7C '|'
   0x0049, // 0x7D '}'
   0x0944, // 0x7E '~'
   0x3FFF // 0x7F DEL
};
That's a usable 7 bit ASCII character set with some lamp test segment patterns down in the control codes. Notable ommissions are . ; : ! and of course the lower case alphabet is in upper case. 

Segment sequence is MSB first clockwise,  outside starting at the top, then all the inside radials starting with the left middle one.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 26, 2016, 10:10:42 pm
 i am having trouble trying to figure out the code for my vfd clock (i dont have the parts yet but i still want to at least have something to try and run when i do build it)
   im running into three notable problems, im not sure what to do with the font ian provided, i dont know how to write the code for the maxim chips, and i have no clue how to use the chronodot to tell time (i have a library for the arduino meant to make it work but i mean i have no clue how to make it communicate or even how it communicates)
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 26, 2016, 11:33:24 pm
First you probably want to make that font array const so it goes into ROM, not RAM.
then inside your digit multiplexing loop, grab the current digit's ASCII character from your display buffer, use it as an index to fetch the segments from the font array, shift that into whatever bit positions you've wired the segments to your MAX6920 chips, OR it with the current digit grid selection bit, and send the result to the MAX6920 daisychain to light up that digit with the segment pattern for the desired ASCII character.

You can play the same game with multiplexed 7 segment LED displays driven by a string of 74HC595 chips if you want to get some practice in reading a (7) segment font table, ORing in a digit select bit and sending it out by SPI to light up a digit.  You probably should do that anyway, as you can get 99% of the bugs out of your code working with 5V logic that wont zap you or your Arduino if you get something wrong.  Swapping it to 14 segment VFD and MAX6920 should just be a matter of changing a few #defines and replacing the 7 segment font array with the 14 segment one, if you code it carefully to be reusable (which is worth doing anyway so you've got it in an easy to reuse form for future projects).
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 27, 2016, 01:06:43 am
 i understand (most of) what you mean but i have no clue how to do it
Title: Re: Vacuum fluorescent display to clock display
Post by: ebclr on September 27, 2016, 01:35:11 am
Take a look on this datasheet

http://file.yizimg.com/937/2007102711080825.pdf (http://file.yizimg.com/937/2007102711080825.pdf)
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 12:09:49 am
ok i know im changing the rules but im going to use MM58342 (http://www.ti.com/lit/ds/symlink/mm58342.pdf (http://www.ti.com/lit/ds/symlink/mm58342.pdf)) due to it being dip and also due to how many segments it can display

grid control

int IO1 = 6;
int IO2 = 7;
int IO3 = 8;
int IO4 = 9;
int IO5 = 10;
int IO6 = 11;
int IO7 = 12;
int IO8 = 13;


void setup() {
  pinMode (IO1, OUTPUT);
  pinMode (IO2, OUTPUT);
  pinMode (IO3, OUTPUT);
  pinMode (IO4, OUTPUT);
  pinMode (IO5, OUTPUT);
  pinMode (IO6, OUTPUT);
  pinMode (IO7, OUTPUT);
  pinMode (IO8, OUTPUT);
}

void loop()
 {
 digitalWrite (IO1, LOW);
 digitalWrite (IO2, LOW);
 digitalWrite (IO3, LOW);
 digitalWrite (IO4, LOW);
 digitalWrite (IO5, LOW);
 digitalWrite (IO6, LOW);
 digitalWrite (IO7, LOW);
 digitalWrite (IO8, LOW);
 delay (1);
 digitalWrite (IO1,HIGH);
 delay (1);
 digitalWrite (IO1,LOW);
 delay (.25);
 digitalWrite (IO2,HIGH);
 delay (1);
 digitalWrite (IO2,LOW);
 delay (.25);
 digitalWrite (IO3,HIGH);
 delay (1);
 digitalWrite (IO3,LOW);
 delay (.25);
 digitalWrite (IO4,HIGH);
 delay (1);
 digitalWrite (IO4,LOW);
 delay (.25);
 digitalWrite (IO5,HIGH);
 delay (1);
 digitalWrite (IO5,LOW);
 delay (.25);
 digitalWrite (IO6,HIGH);
 delay (1);
 digitalWrite (IO6,LOW);
 delay (.25);
 digitalWrite (IO7,HIGH);
 delay (1);
 digitalWrite (IO7,LOW);
 delay (.25);
 digitalWrite (IO8,HIGH);
 delay (.25);
}

and schematic below (simplified one pin only)

so i have the grid part done but i still dont understand the rest of it, also below is my attempt at making the font array const
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 29, 2016, 12:54:51 am
No problem changing chips.  All the SPI HV drivers that don't have a configuration register are very similar, and I, in common with a lot of other engineers try to avoid Maxim!  It probably wont affect the code you'd be writing significantly except for the need to send more bytes to change all its outputs.

The correct definition for the array would be:
Code: [Select]
const unsigned int font[]={unless you arre using the C99 fixed width  types from stdint.h, in which case you'd use:
Code: [Select]
const uint16_t font[]={
That's a horrible thing to do to the grid pins and wont work as the MOSFET body diode will conduct all the time. Its also totally unnecessary.  Normally you drive them just like an anode pin, (maybe with an extra current limiting resistor in series), directly from the same type of driver as the anodes.   If you want to drive the grids direct from the arduno, use the discrete transistor circuit I posted earlier, but its much simpler just to hook them to the SPI VFD driver, adding another daisychained chip if you have to.  To get the negative grid bias required for good cut-off and minimal ghosting, you bias the cathode (filament) positive via the center tap of the filament supply. A simple Zener to ground from there sets the cathode voltage and thus the grid cut-off bias.

If you intend to drive the grids via discrete drivers controlled directly by the Arduino pins, you'd want them all on the same AVR port for efficiency in shifting a single '0' in a byte of seven '1's across them to pulse one high at a time to multiplex them. Port D is the best bet.  Arrange the grids in port D bit order.   Alternatively get a 74HC138  decoder, and drive the grids with its 8 outputs, with three address lines from the Arduino to select one of them and  save 5 Arduino pins.  See https://www.arduino.cc/en/Hacking/PinMapping168 (https://www.arduino.cc/en/Hacking/PinMapping168) 

You need to reserve the SPI pins for the SPI VFD driver. See https://www.arduino.cc/en/Reference/SPI (https://www.arduino.cc/en/Reference/SPI) for how to do SPI on an Arduino.

In other news, I've patched in Starburst16 support in my font editor, and am now slowly working on cleaning up and commenting the VBA code.  It uses Excel 5 dialog sheets so running it on recent Excel versions may be problematic.  Excel 5 dialog event handling really sucks and I've got a lot of kludges working around that and some Excel bugs.  However its less of a PITA than drawing polygons on Excel forms.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 02:51:11 am
the only reason i was toying with the mosfet idea is to save chip pins, but if it wont work i guess i dont have much of a choice also i have no clue on the rest of the code
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 04:44:30 am
i just realized something, won't the grid pins work at ground potential? that is to say when i tested it to map it out they were and it worked, if they can function as ground then it becomes much simpler AND saves io/driver chip pins
Title: Re: Vacuum fluorescent display to clock display
Post by: technotronix on September 29, 2016, 07:08:35 am
i should note at this point to trying to learn how to program and do microcontrollers but only if i can actually do it and not stare at a screen for 3 hours trying to tell my computer that there is an arduino attached and failing. so as more eloquently put im open to it so long as i can do it without hitting a brick wall just trying to set it up.

I am also at the same situation. I don't know much programming and facing some of the serious problems.
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 29, 2016, 08:32:32 am
i just realized something, won't the grid pins work at ground potential? that is to say when i tested it to map it out they were and it worked, if they can function as ground then it becomes much simpler AND saves io/driver chip pins
Depends what you mean by 'work'   Inactive grids or anodes at 0V = OFF.  The VFD tube acts as an AND gate - the specific segment only lights if both its grid and anode are positive. 

However you need to read the Futaba link I gave you again.  As far as the tube knows all voltages are measured relative to the center of its filament and the grid actually needs to be negative relative to that to totally cut off the active segments of the digit its trying to blank.    You could keep the filament at an average of 0V and shift all the anode and grid signals 25V negative and drive between there and your 5V rail, but the driver chips you've been looking at aren't designed for that so it would be a real PITA compared to using cathode bias.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 09:30:49 am
One display and its led to 4 pages of theories, i have no clue how to code and apparently im a stumbling idiot everywhere else also. Every idea i come up with either leads to more than i can afford or nothing at all (or at least nothing i know how to do).
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 29, 2016, 10:22:30 am
That's why we'll help you bring it up in stages.  e.g

Software

Digikey lists the  MM58342N as obsolete, zero stock, and other major distributors don't even have a listing for them any more. Don't design them in unless you have enough on hand + spares and have done enough testing to be certain they aren't fakes.

Design decision time:   Do you want to drive the grids separately or through the same type of SPI VFD driver you propose for the anodes?

IIRC you have 23 pins to drive on the tube so either you need enough SPI driver outputs to handle that or you need to split off the grids to a separate driver or you could parallel the center horizontal segments and ground the unused radials to turn it into a 7 segment display.

If you want to drive them separately from individual logic signals and you dont want a mess of discretes cluttering up your board, look at MIC2981 (http://www.microchip.com/wwwproducts/MIC2981)  8 channels of logic level translation + high side drivers, good up to 50V in a PDIP-18 package.   You'd need pulldown resistors from each output to ground to guarantee complete turnoff.  100K should do it as anode or grid current is negligable when biased more negative than cutoff.   Input would be direct from your Arduino or via a 74HC238 3 to 8 line active high decoder.
Title: Re: Vacuum fluorescent display to clock display
Post by: Buriedcode on September 29, 2016, 10:28:10 am
One display and its led to 4 pages of theories, i have no clue how to code and apparently im a stumbling idiot everywhere else also. Every idea i come up with either leads to more than i can afford or nothing at all (or at least nothing i know how to do).

Then take a step back and be guided by the restrictions you have.   For example, a VFD driver chip you want is very expensive and takes 6 weeks shipping?  Use something else.  You need to learn programming to use a different chip?  Well, that doesn't cost anything except time - and it's a great excuse to learn!   Doing everything discretely, as you've probably seen from the replies, a bit of an arse, but certainly doable if not a hell of a lot of effort.

If I were you, I would make a list of all the VFD driver chips mentioned - most require SPI so you'll be using your Arduino no matter what - and make notes of cost and availability, and 'ease of use' - for prototyping  the SMD parts will need adapters, so that adds to cost.  I couldn't really find the MM58342 here in the UK, but prices seems to hover around $20.  Which is steep.

Ideally, you could find a VFD driver chip and copy the 'example schematic' from its datasheet, hook up your VFD and Arduino to it, and provide the appropriate power supply, then it should just be a case of programming.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 10:29:27 am
One display and its led to 4 pages of theories, i have no clue how to code and apparently im a stumbling idiot everywhere else also. Every idea i come up with either leads to more than i can afford or nothing at all (or at least nothing i know how to do).
I couldn't really find the MM58342 here in the UK, but prices seems to hover around $20.  Which is steep.

for me i can get 5 for that price, my trouble is i have no clue how to code and no one seems to be able to give me an example of what to do rather than telling me what needs done, i do appreciate the help it just does me little good when i don't know enough to go off and do it. I have read easily a hundred google found articles and they are not helping. And while a pain in the arse that they are discreet solutions i actually can somewhat understand, for example a high side mosfet switch (if done right not like the shortcut i previously suggested) would enable me to drive the display off of logic level signals
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 10:45:01 am
as for the design decision , separate if output pins from vfd driver are limited
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 10:56:40 am
ok heres something digikey has (read as not china) that would work perfectly from my perspective,
http://www.digikey.com/product-detail/en/microchip-technology/HV5812P-G/HV5812P-G-ND/4902558 (http://www.digikey.com/product-detail/en/microchip-technology/HV5812P-G/HV5812P-G-ND/4902558)

i would need two but at that price its more than reasonable
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 29, 2016, 10:59:28 am
Roadmap for development without waiting for expensive/rare parts.

Its time to 'get off the can', start building hardware and tinkering with code to drive it. . . .

The Microchip (ex Supertex) HV5812 display drivers are nice parts for this.  Definitely get two.  You should be able to drive common anode 7 segment LEDs + 6K8 series segment resistors from them (rather inefficiently) at their minimum  Vpp supply voltage of 20V.  This will help with software testing before you've got your VFD filament supply circuit built and debugged.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 11:03:57 am
the only problem with me getting off my can is i can't just order and have it i either wait a month on china, pay a premium for us ebay or wait until my next digikey order in a month, good news is i have 7 segment common anode leds on hand.
If i got the 74HC595 shift registers off of ebay in america, do you think it would take me a month or so to get to the point in need more of the end design hardware?
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 29, 2016, 11:19:06 am
OK. Waiting for parts is a PITA.

Do you have any logic chips for 3 to 8 line decoders or serial in parallel out shift registers or even enough D type flipflops to build a chain of 8 of them on hand?   If so we can help you breadboard a multiplexed 7 segment LED display so you can start getting to grips with the software.  List what you've got on hand.

I cant say how long it will take you - the software side may just 'click' in a weekend for you, or it may take a month of wrestling with the code, with a forum thread helping you debug it.  Anyone of average or above intelligence and sufficient commitment can be taught to program adequately, but some have the mind-set that gives them a natural aptitude for coding in procedural sequential languages.

I suggest putting the HV5812 chips on your next Digikey order.  If you don't already have them I would also suggest adding 5x (depending on your spare cash)  of 74HC595 SIPO shift registers, MIC2981 high side drivers, ULN2803 low side drivers, and a couple of 74HC138 and 74HC238 chips.  That should cover you for most future output interfacing and display multiplexing experiments.  I've just checked and everything except the HV5812 chips can also be found on Amazon if you are in a hurry.

Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 11:43:25 am
 i have about a dozen MC14013b Dual D Flip-Flop with Set and Reset
one special flip flop i got is a SN74LS174N HEX D FLIP-FLOP made by amd
as for multiplexing chips
SN74LS155N DUAL 1-OF-4 DECODER/ DEMULTIPLEXER
DM74LS158N Quad 2-Line to 1-Line Data Selectors/Multiplexers
SN74LS157N QUADRUPLE 2-LINE TO 1-LINE DATA SELECTORS/MULTIPLEXERS
SN74LS151NS DATA SELECTORS/MULTIPLEXERS
74LS253M 3-STATE Data Selector/Multiplexer

74LS395N 4-Bit Shift Register with TRI-STATE Outputs   4 of them
SN74LS595BN 8-BIT SHIFT REGISTERS WITH OUTPUT LATCHES  1 of them
SN74LS164N 8-BIT PARALLEL-OUT SERIAL SHIFT REGISTERS   3 of them
N82775 DUAL 8-BIT SHIFT REGISTER   1 of them

for your convenience i included a copy of my board list but its incomplete so i dont recomend looking unless you know what for, i have alot of old circuit boards lying around on that list is but a mere 10% or so of the total
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 29, 2016, 12:05:43 pm
Lets start with the 74LS595 controlling one LED digit with no multiplexing, and get you happy with sending segment patterns to it with the Arduino SPI library then add the 74LS155 wired as a 3 to 8 line decoder driven by three Arduino pins and some PNP transistors to support up to 8 multiplexed digits.

Do you think you know how to hook up the '595 with only one digit, or do you need help?
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 12:09:52 pm
i can probably connect it but the only pnps i have are from the 80s and i wouldnt know how to code it, and the part that gets to multiplexing i wouldn't know how to wire
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 12:15:22 pm
well i do have some newer pnps but id have to hunt them down out of tv circuitry
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 12:44:29 pm
for the code to do it i got this from sparkfun, will it work?
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 29, 2016, 01:47:20 pm
No worries about the PNPs being 1980's.  A lot of my 'random stuff' parts bins are metal can transistors from the '70s and they are still fine for breadboarding as long as you don't let the cans touch!  Give me part numbers and I'll tell you if they'll do.

Here's the hookup.  Start with one digit and the anode direct to +5, then add the '155, transistors and other digits when you have the first digit working.
(https://www.eevblog.com/forum/projects/vacuum-fluorescent-display-multiplexing-problem/?action=dlattach;attach=259098;image)

CP is 595 shift clock. ST is its store clock. All logic chips to be hooked up to +5V and 0V with 0.1uF decoupling across their power/gnd pins.

Don't know about the sparkfun code.  Give the URL of their page with the project or module description and I'll take a look.  It will probably need quite a few changes if it isn't using similar chips (i.e any flavour of '595 and a 3 to 8 decoder).

Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 08:50:22 pm
i only have the one SN74LS595BN
and transistor part numbers
 2,   2n3800
 1,   2n1039
 10, 2n2905
 15, 2n1132
 3,   2n4036
 1,   2n2907a
 1,   2n3639
 1,   2n1119
 1,   2n988

i certainly hope that the 2n1132 or 2n905 will work their my majority

sparkfun link https://learn.sparkfun.com/tutorials/shift-registers
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 29, 2016, 09:18:44 pm
2N2905 (http://pcbheaven.com/datasheet/2n2905_2907.pdf) is an entirely adequate PNP switching transistor.  Its HFE is a little shitty compared to modern devices (min. 75 @Ic=10mA) and of course its in a big clumsy TO-39 can, but I wouldn't say no to a bag of them myself!  Its even got a high enough voltage rating to be satisfactory if you need to use it on your HT rail for your VFD.  Remember: Emitter by tab

2N1132 is rather less satisfactory: HFE min. 25 @Ic=5mA, and I'd have to be truly desperate to use it.

I'll take a look at the Sparkfun link and get back to you.

NOTE '595 to LED segment ordering.  D.P on the MSB then segments in alphabetical order with decreasing bit significance, because it makes the code slightly easier later, (specifically if you need to enter font tables in binary).
(https://upload.wikimedia.org/wikipedia/commons/thumb/0/02/7_segment_display_labeled.svg/240px-7_segment_display_labeled.svg.png)

NOTE 2: Don't try to run more than 1 or 2 digits of the Arduino's onboard 5V regulator. It isn't man enough for the job.  Use a 1A max 5V supply (+/-5%) or a separate voltage regulator from the unreg supply to the Arduino.  Don't just stuff a 7805 in the breadboard - if its ground leg comes loose it will kill your logic chips and probably your Arduino.  Critical stuff like that is best soldered!

Caution: Also DON'T use a 5V high current supply (e.g. old PC PSU) unless you protect the feed to your breadboard with a 1A or less polyfuse.  (you can salvage them off really old 10base2 Ethernet cards - look for a yellowish disk that resembles a cap).  Using a supply without a low enough current limit frequently results in a melted breadboard and blown chips at the slightest wiring mistake.   Before using a USB charger or similar, check its output's a clean 5V (if you don't have a scope, stick a 1uF cap in series with your DMM to block the DC and put it on AC).  You are looking for less than 0.05V ripple (0.15V pk-pk on a scope), both unloaded and into a 100mA load, a DC voltage that is within 5% of nominal at no load and doesn't drop too much loaded, and a safe shutdown if you short the output.

If shorting it makes it go bang or it outputs more than 2A shorted, its best to find out before you use it for anything valuable.  Expect dirt cheap Chinese USB chargers to go bang!  Also their safety clearances are often totally inadequate and  you risk electrocuting yourself, your Arduino and your PC. . .  :-BROKE  :scared: :scared:

Get breadboarding!
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 29, 2016, 09:47:25 pm
OK quick followup.  The Sparkfun tutorial is for a PISO shift register to connect eight extra INPUTS.  That doesn't interest us for this project, so follow their link for output (SIPO) to bildr's 74HC595 Arduino tutorial (http://bildr.org/2011/08/74hc595-breakout-arduino/).
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 29, 2016, 10:09:50 pm
i must apologize, i cannot find the board SN74LS595BN is on
i have a bench top 5v supply that 1A and i also have a very nice wall wart that is 5v 850 ma
i have bought 10 x 74HC595 shift register they will be here on the 5th
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 29, 2016, 10:33:33 pm
Can you find a 74LS164 and two 74LS395 chips?  We can use them to build a fake '595 style shift register.   See attached schematic.   Ignore all /Qn pins.  The top '395's Q0-Q3 pins are equivalent to '595 Q4-Q7.   If you need to daisychain take the output from the '164 Q7 pin.  The functionality is identical to the genuine 74xx595 apart from /OE which we don't need and haven't implemented.

If not, lets get going with a string of 4013 D type flipflops then.  It wont give us the simultaneous outputs updated by a separate latch pin that a '595 would (unless we double up on the D types and add a parallel latch) but will get you happy sending bytes out of the Arduino SPI style.

I took a look at the Sparkfun link + the onwards link to billdr, and although they're good on the hardware side of things, they are bitbanging the data transfer.  The AVR on the Arduino has a SPI peripheral, the eventual aim is to be busily updating a lot of VFD digits while running a clock in realtime without loosing any ticks, so relatively slow bitbanging is a crutch you need to discard as soon as you know the '595 is hooked up correctly and working.

Take a look at http://www.appelsiini.net/2012/driving-595-shift-registers (http://www.appelsiini.net/2012/driving-595-shift-registers).
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 30, 2016, 09:08:35 am
i wont guarantee i dont have them, i might finish this then find them for all i know the boards are anarchy little bit of everything everywhere, but i dont remember seeing them.
in case your wondering how i got my hands on over 200 circuit boards i went to an auction that had a guys stuff and he was a life long hoarder of anything electronic but his collection is a bit iffy when it comes to shift registers or other "specialized" ics i quote specialized because i have found ics i didn't even know existed (parity trees) but shift registers seem to be at a deficit
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on September 30, 2016, 11:13:22 am
i just de-soldered 8 4013 D type flipflops at 2 flip flops a chip i have 12 to play with assuming 100% success rate which is non practical, one problem however is that their leads are not long enough to breadboard
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on September 30, 2016, 11:45:23 am
Leads too short  to breadboard?   There are only two reasonably practical options - solder them in some tripad or matrix board (gets expensive if you are just hacking around with dodgy chips) or dead-bug them. That's take a sheet of stiff card or similar and some STRONG double sided tape.  Stick each one down with its legs in the air and IMMEDIATELY write at its pin 1 end the part number.   Wire pin to pin with Kynar wire wrapping wire.  You can also use the sort of magnet wire that has solder-through enamel.  Any other type of wire is more trouble than its worth.

Chips with short leads are virtually unusable for prototyping.  You might as well not have them.  However for ONE OR TWO chips it could be worth trying to extend their pins, so see if you can find that 74LS595 and a 74LS138 (or any other logic family variant of those two part numbers)   
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 01, 2016, 02:47:42 am
or i could just solder them to cheap perfboard i have lying around
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 02, 2016, 03:25:20 am
OK, connect each 4013 Q output to the D input of the next flipflop in the chain.  Connect all the CP pins together.  Connect all the CD pins together and  connect a single 1K resistor for the whole chain from there to 0V.  Do the same with the SD pins. 4 chips will then give you an 8 bit shift register without a latch.  If you want it latched then you need to T off sideways from each D output of the chain via another flipflop.  All the latch flipflops are clocked together like the main chain, and apart from their D wiring should be wired like the main chain.  If you use 8 chips, you can use one half of each chip for the chain and the other for the latch.   That gets you something very similar to a '595 chip.

Meanwhile I've been digging out parts.  I have a couple of 74HC595 chips on a breadboard with some ULN2803 chips as level shifters and a HNM-05SS62T 7 segment 4 digit VFD clock display.  I need to add some NPN active pullups to get that to drive the display properly.   I've already had the VFD illuminated with 1.5V DC on the filament and 24V between the filament and the grids and anodes from a little 1W DC-DC converter module, 5V in 24V out, just to check the voltages and currents will work before I assemble the driver circuit.   I'm forgoing my usual choice of a Microchip PIC to drive it with an Arduino, so will have something somewhat similar to your project on the bench here.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 02, 2016, 08:02:06 am
if what i saw when i googled that is right then i have some similar out of old microwaves
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 02, 2016, 11:53:25 am
Current problem: Finding 16 small NPNs of the same type in my transistor 'odds&sods' bin with Hfe>100 and Vceo>45V for the hgh side VFD drivers. I've found a moderate stock of 2N929, but the Hfe's a bit low (40 - 120), and they're only good for Ic<30mA.

If you've still got any of the boards the small VFD came off, take a look at them and see if you are lucky enough to find a VFD driver chip0 you can use.   Its most often something fairly custom but occasionally you'll find a SPI one
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 02, 2016, 08:10:21 pm
as i believe i have said i did not desolder these samsung 8 digit 14 segment ones but i have a couple microwave ones, 34s02 from nation semiconductors, mp7552 from TI,  D8049hc from NEC, hd61412op from hitachi and finally lm6059 (or lc6065 thats also there) from sanyo. im assuming their the vfd drivers given that their the biggest chip on the board, also i found nothing in my searches
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 02, 2016, 08:39:20 pm
D8049 is a fairly crappy MCU
HD61412 is an even crappier 4 bit MCU

You actually have to check which chip most of the VFD pis go to.  Its a long shot because if you are doing millions of units per annum, the cheapest option is to get a MCU with I/O pins that can go below ground. and run the filament at -30V or so relative to logic 0V, with the MCU pulling up to +5V and pulldown resisors on each pin to the -30V rail.  That's cheaper than open drain  HV outputs because it does't need external high side drivers.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 02, 2016, 10:42:50 pm
what about hitachi 7407 if it is what it claims on this datasheet then its a hex buffer/driver with open collect hv output
http://pdf1.alldatasheet.com/datasheet-pdf/view/122979/HITACHI/HD7407.html (http://pdf1.alldatasheet.com/datasheet-pdf/view/122979/HITACHI/HD7407.html)

also with the flip flops im going to assume CP= clock however when it comes to CD and SD im not sure what you mean though before we get too carried away with flip flops i have '595 chips meant to be here any day now
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 03, 2016, 12:40:43 am
Yes. Real Bipolar TTL 7407 or 74LS07 are hex non-inverting buffers that have have open collector outputs rated for up to 30V.  Their inverting equivalent is 7406 or 74LS06.   They wont directly drive a VFD because VFDs need a driver capable of sourcing current from the HV rail, but they make very good level shifters to drive either a PNP high side switch or a NPN emitter follower + diode pullup booster.
At 6 level shifters per chip, if you can find a couple of them  you could make a start with your VFD, but  you'd need 4 to do the whole job, + enough bits of shift register to drive them.   They are one of the few original TTL chips I bother saving when I find them.

N.B. as the HT for the VFD in the typical driver circuit 'stacks'' on top of the 5V logic supply to permit negative grid bias relative to the cathode to get good cutoff, using an '06 or '07 as the low side of your level shifter will effectively limit you to 25V Vak to avoid exceeding their 30V rating.

CAUTION: DO NOT USE any 74xx06 or 74xx07 with a 'C' anywhere in the 'xx' for level shifting as the CMOS equivalents have a parasitic diode from the output open drain to the Vdd rail.

The problem with 4000 series logic pin names (and to a lesser extent 74xx00 series), is that many of the manufacturers like to do their own thing.  The chips are generally fully compatible but they seem to want to call each pin something special of their own.
I was referring to the NXP (ex-Philips) datasheet: https://www.nxp.com/documents/data_sheet/HEF4013B.pdf (https://www.nxp.com/documents/data_sheet/HEF4013B.pdf) and if you look at the pinout in that all would be clear. 

If you've got the time and inclination to hook up 4x 4013 in a chain as I described earlier with LEDs + resistors between their /Q outputs and +5V, before your '595 chips arrive, it will let you practice writing code to shift out data bytes.  However as you said they are short pinned pulls that you cant breadboard with, so that may be more trouble to you than its worth.   
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 03, 2016, 12:49:19 am
i got 4 hd7407p and unlike the 4013 chips i have these are on a regular circuit board, with regular solder so i would be pretty confident at my abilty to get them off without over heating being a risk. The 4013 chips are part of old industrial circuitry.
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 03, 2016, 01:09:16 am
Great.  Original 74xx series TTL is generally fairly tough so as long as you aren't pulling them by barbecuing the PCB, they should be fine.   Do they have long enough pins to be usable on breadboard or have they been cropped?  You can test them with a simple LED and 330R resistor between the outputs and +5v.  TTL inputs float high on their own, so all you have to do is ground each input pin and check the LED lights, without even the slightest glimmer when the input isn't grounded.

Do you also have EITHER 24x small signal PNP transistors with Vceo>-30V, 24x 33K or 47K resistors. 24x 10K resistors, and 24x 100K resistors OR 24 small signal NPN transistors with Vceo>30V, 24x small diodes and 24x 33K or 47K resistors?  If so you can build and test a practical parallel input driver stage for your VFD before any of the other parts arrive.  The PNP setup is simple but uses a lot of resistors.  The 33K to 47K resistors (any value in that range will do) go between the 7407 outputs and the transistor bases, the 10K resistors go base-emitter, all the emitters go to the HT rail and it also needs 100K from the collector to ground.  The PNP transistors invert, so logic '1' in will give 0V out and '0' in will give +HT out.

The NPN version uses the configuration I posted back in reply #29 (https://www.eevblog.com/forum/projects/vacuum-fluorescent-display-multiplexing-problem/msg1032843/#msg1032843) (top 3 components only, driven by the '07 in place of Q2, with NO MORE THAN 30V for the HT rail.   At 30V the anode currents wont be so high, so Q1 needs less base drive, which is why I'm suggesting increasing R1 to the 33K to 47K range which also reduces the load on the +HT supply.  Depending on your VFD and the gain of your transistors you *may* be able to go up to as much as 100K, just check the voltage drop is acceptable when Q1 is ON and loaded by a working VFD anode.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 03, 2016, 01:14:50 am
i have 80 or so mpsa42 npn transistors, as for the resistors id have to look around on old circuits to find enough, i dont have a great stockpile of loose parts but i have a gigantic stockpile of stuff on boards
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 03, 2016, 01:49:09 am
MPSA42 is good, I must rummage through my shop clearance stock to see if I have any.  IIRC we had a little draw of them, but it may have gone to my ex-boss, as he cherry-picked the stockroom when we cleared it.

Its *NOT* worth salvaging ordinary 1/4W resistors.  The leads are almost always too short to do anything useful.   However I suppose you could scrounge enough parts to build one or two channels of the post#29 level shifter, extending the leads as required, just to gain experience with it.   

I've just finished sorting a couple of E12 resistor kits into a 12 compartment storage box, by first two digits, labelling each piece of bandoleer tape with the value for speed of access,  to have enough on hand for more complex projects.  Even at high-street prices it was under 2 cents a resistor, and I'll replenish any values that get used up individually, probably x50.  I also keep a good sized box of ex-breadboard resistors (with full length leads) that I tend to rummage through first when I just need a few of any value for anything non-critical so as not to chew through my sorted new stock. Once you've got your eye 'in', picking E12 three band resistors from a heap on a tray with a pair of tweezers is pretty quick - often quicker than getting a new part out.  I do however find 4 band codes a bit more of a PITA, expecially if there are E24 or higher series mixed in to confuse me. Some of the resistors in there have been my breadboarding companions for nearly 40 years - they get the  green pan-scourer treatment to clean the oxide off their leads before use.  I generally prefer to stick to the fresher ones, but I have more higher power ones from the old days.  I don't keep the few carbon composition stick 'body tip dot' resistors I inherited from my Grandpa in there, they aren't really suitable for breadboarding!
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 03, 2016, 04:56:26 am
i found 24 70k ohm resistors but their carbon (im guessing) if they wont do then i dont have any 40-70kohm resistors that will, or rather im sure i do but if it isnt on the surface then id have to go through three gigantic boxes looking for one value 24 times over which would take me days. Alternatively i could series a bunch of lower ohm ones
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 04, 2016, 07:46:45 am
i could use a pin out for the HD7407P
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 04, 2016, 08:21:11 am
Check the carbon resistors - they tend to go high with age.  If they are still in tolerance they are fine for breadboarding.   Just avoid using them for anything that is either important, or you plan to keep over a decade, or needs close tolerance parts.

Its 7400 series logic, second sourced by many manufacturers. Google is your friend, but just use the bare part number.  You should get several sources for the Texas Instruments or Fairchild version in the first page of results.  If you do a bit more digging and try hitachi 7407 datasheet you'll find the actual HD7407 datasheet.
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 04, 2016, 07:48:16 pm
The saga of my Arduino=>SAMSUNG SSED HNM-05SS62T VFD interface continues:
I didn't find any MPSA42 transistors, but I did find 450 of PIHER 2N4287, which are minature NPNs good for 45V Vceo, 50mA Ic, with HFE in the range 150-600 which should do nicely as the high side VFD drivers.   The anodes are getting 100K pullups, which should give me 1.5mA drive for 1V drop across the base pullup resistor, and when pulled low, pass 0.33mA to the ULN2803 collector.   The grids would probably work with the same, but I was short of 100K 1/8W resistors so decided to try a much lower value - 22K which should give 6.8mA drive for 1V base resistor drop.   The ULN2803 will be sinking 1.36mA to drive those.   All have small signal silicon diodes  base-emitter, k to b so the ULN2803 can pull the load down hard. 

The HT rail is from a AM1S-0524SZ 1W 5V:24V isolated DC-DC converter stacked on top of the 5V rail to give me 30V.  That should give me up to 42mA with 78% efficiency - a lot better than I could have cobbled together quickly and in a fraction of the breadboard area. The filament needs 60mA @ 1.5V, and to get started I'll be running it on DC  >:D so with a 60R series resistor as the 5V supply I am planning to use runs a little on the high side.  The resistor goes between one end of the filament and ground so the centre of the filament will be sitting up at approx 4.25V to give me some negative bias when a grid or anode is pulled low to get a proper cutoff.

Next job is to hook up all the VFD pins and the ULN2803 chips to the 12 high side drivers I've assembled and do a static test hard-wiring the ULN2803 inputs to light up various segment patterns, before I start hooking up the shift registers and Arduino.

I need to look at designing a 'Joule thief' style boost circuit for the HT which hopefully will be able to feed the filament from another winding - if I can get away with only three simple windings on a ferrite ring that will be great.  If it only produces just enough HT current for all segments lit, then I stabilise it with a 33V Zener, the filament drive should remain fairly constant.

Edit: The hardware is up and running - I tied the shift and store clocks together and clocked in random garbage by simply bringing my finger near the floating input wire (Joys of CMOS  :-DD )  Tying Din high blanked the display when I clocked it, tying it low lit everything and letting it float displayed random garbage.

The DC-DC converter was running a little warm, so I increased the digit grid base resistors to 150K - that's a little high so I need to find some more 100K sub-miniature resistors.  That part of the breadboard is a little crowded - I've got 12 transistors, 12 diodes and 12 resistors in 18 contact strips, it would be  4 less except that each driver needs two holes in the HT rail, so I really don't want to use normal 1/4W parts.

The Arduino in its little plastic protective frame is 'stapled' down with a heavy wire through each mounting hole and is hooked to the 74HC595 chain using its hardware SPI port. 

Now to write some software . . .
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 05, 2016, 12:23:18 am
when i say 70kOhm resistors i mean i went through and individually tester and found 24 resistors within a 10% tolerance, and when i actually build it ill either use modern ones or just make a note to replace them later
Title: Re: Vacuum fluorescent display to clock display
Post by: Buriedcode on October 05, 2016, 12:47:23 am
I don't want to break the flow here, but Ian. M - you sir, deserve some form of medal for your patience, and careful explanations.  You have helped many of us out, but this is true dedication.

Neo:  I hope your project is going well. If you count the posts Ian has made, and the length of each one, just imagine how much time and effort has gone into this.  It is one thing to provide schematics, hints, and recommended part numbers, but Ian has had to change so many of his recommendations so far I'm amazed he has kept up.  I hope you're taking it all in!
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 05, 2016, 12:56:30 am
I hope you don't mind me hijacking your topic to blog the build of my version.  At least it means I now have similar hardware to try stuff on if you get stuck writing the code.

Did you find the HD7407 pinout OK?
Don't worry about the carbon resistors, I'm using a mix of 100K and 150K with no problems so far so if they go high a bit it doesn't really matter. 

Ideally the resistors should be chosen to keep the load on the +HT supply constant.  When the open collector level shifter output is high, all the current goes through the segment, which takes I(seg) mA* by the nature of the VFD.  When the level shifter output goes low, the VFD segment doesn't get any current and the shifter has to sink whatever the resistor permits.  If you make the resistor V(+HT)/I(seg) (in K if you calculate with mA), the current will be the same as the segment would have took and the load on your +HT supply wont change.   In practice, I(seg) is not well controlled as it depends on filament temperature, +HT and aging, but for mains powered applications where efficiency isn't a big issue, you can certainly balance some or most of I(seg) and maybe get away with an unregulated or poorly regulated +HT supply.

* as specified in the VFD datasheet

What are you planning to use for your +HT supply?

@Buriedcode: No problem, its inspired me to get off my ass and build my own version, currently occupying most of a Boss Bimboard 3 next to my PC.  :-+
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 05, 2016, 01:30:30 am
Thank you ian, you are an excellent teacher and i am learning a lot despite my thick skull at some points, for the hv supply i was thinking of taking a 20 volt transformer i got from an oven if 20-30 (bridge rectifying amplification) isnt enough then i will probably use a cockcroft walton generator to step it up, alternatively i have a gigantic 30 v switching supply good for several amps (out of an old computer monitor) but im saving it i dont know what for but for something
Also yes i did find a datasheet though from TI rather that hitachi, and i dont mind at all that your "hijacking your topic to blog the build of my version."
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 05, 2016, 03:09:00 am
Cockcroft Watson doublers/triplers etc. need *VERY* large capacitors to work effectively at 50Hz or 60Hz, also for the few tens of mA you need, that's a horribly clumsy way of doing it unless the transformer is a micro-miniature 1 or 2 VA one.

My four digit VFD + driver is currently averaging 4mA from the +HT rail (I have a 100R resistor in series I simply measure the voltage drop across), so there is absolutely no way you need more than a few tens of mA for your 6 digit one.  To get started and find how much you actually need, either use a 30V bench supply with the current limit set at no more than 50mA, or if you don't have a 30V bench supply, use three PP3 9V batteries stacked in series.   They can be the absolute crappiest dollar store 'special' Zinc Carbon ones, though if you've got Alkalines on hand, you might as well use them.  If you split the battery clip so you have separate + and - clips, you can stack as many batteries in series by clipping them together as you need to get the +HT you want.  Connect battery - to Gnd or to +5V for more choice of voltages.   I'd start at 18V (2 batteries,  - to Gnd) then go up in steps till you are happy with the brightness.  You should see something at 12V Vak if the filament supply is correct, then up the voltage till you are happy.

Once you know what voltage your display likes, a small DC-DC converter is the best way of getting it.  Either order one or roll your own . . .

CAUTION: Don't exceed the voltage rating of your level shifters - 7407 is only good for 30V so don't go over 27V (three batteries, - grounded).
My ULN2803 chips are rated 50V and high side transistors 45V, so I can go up to 43V HT+ if I want to drive the VFD really hard.  However, I don't want to wear it out so I wont be doing that for more than a brief test.

I've currently got it counting in hex from 0000 to FFFF as I've hacked together a crude sketch to drive it.  I'll hold off posting code till I've fixed a few things - somehow I got the segment bits backwards so I've got seven VFD pins to rewire!  |O
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 05, 2016, 04:19:20 am
well as i said it was a consideration another more sensible way would be to use a hv buck boost assuming of course that its a voltage hog, matter of fact i dont even know why i brought a cockroft walton into this conversation now
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 05, 2016, 04:23:45 am
with the 595 which pins are the, mosi, /cs, and sck the TI datasheet wasnt clear
Title: Re: Vacuum fluorescent display to clock display
Post by: ebclr on October 05, 2016, 04:37:41 am
The path you are following is for sure the worst possible to make a VFD clock, why not use the chips  designed for this purpose ?
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 05, 2016, 05:12:57 am
which path are you talking about? the shift registers are a training exercise,  the 7407 i might end up using i might not but it too is a training exercise a stepping stone on the path to me learning how to program a display driver chip. I cannot speak for how you learn but i find it far easier with stepping stones.
Title: Re: Vacuum fluorescent display to clock display
Post by: ebclr on October 05, 2016, 05:18:43 am
Based on the learning idea, it's OK go ahead

But for real world have better ways

I would suggest based on the learning ,that you try Proteus, they have a nice simulator than can help you on the learning process

https://www.labcenter.com/ (https://www.labcenter.com/)
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 05, 2016, 08:16:44 am
Proteus VSM pricing is a bit on the steep side for hobbyists. 

Yes, it doesn't make any sense commercially to build a VFD driver from SSI chips and discretes, and hasn't made sense since the beginning of the '80s, but I've currently got 4 chips + 36 discretes assembled on my breadboard doing a pretty good job of emulating a MAX6920 (I'd have to invert Din and use higher voltage drivers if I wanted it to be more exact), and I didn't have to wait 3 days or pay shipping to get a boutique part.  OTOH there are 36 extra wires hooking it all up . . . . .

@neo,
Working from the NXP (Philips) 74HC595 datasheet, and the Arduino SPI reference (https://www.arduino.cc/en/Reference/SPI) page, pins are as follows:

Arduino Uno    74HC595
MOSI (11)   => DS (14) - first chip only
SCK  (13)   => SH_CP (11)
SS   (10)   => ST_CP (12) - SPI /CS

Other '595 connections
+5V     => /MR (10) - reset disabled
Gnd     => /OE (13) - outputs on
Q7' (9) => DS (14) of next chip

+5V => Vcc (16)
Gnd => Gnd (8 )

Please double check against the datasheet - I'm not immune to typos.
Title: Re: Vacuum fluorescent display to clock display
Post by: ebclr on October 05, 2016, 10:20:57 am
It's for fun...  Make it
Title: Re: Vacuum fluorescent display to clock display
Post by: ebclr on October 05, 2016, 10:36:42 am
Just in case if you plan do use Arduino, They can do everything except the high voltage driver, you don't need logic Ic's

(https://www.electronicsblog.net//wp-content/uploads/7s.png)
Title: SAMSUNG SSED HNM-05SS62T VFD Clock
Post by: Ian.M on October 05, 2016, 11:14:36 am
@ebclr: Unfortunately one rapidly runs out of pins that way.   

I've done some documentation of it.  Here's a schematic.   
Not shown: Arduino Uno

I've also attached a photo as built, and my first cut at a sketch for driving it.  Very crude - just multiplexing it in the main loop and counting up in hex from 0000 to FFFF  :-[

The display was photographed under normal room lighting with the PWM set for 1/4 brightness.  Its showing some flare on the segments, not visible in real life, due to the brightness and the camera's auto aperture & exposure settings.

Photo Notes
The 74HC595 chips U1,2 are top right, with pin 1 to the left.

The ULN2803A chips U3,4 are center right with pin 1 to the right

Q1-12 are on the right top half of the lower board, with Q1 that handled the LSB from U1,U3 on the left.  Pinout is B.C.E with E at the rounded end.

+HT is the top bus of the lower breadboad, from AM1S-0524SZ 1W DC-DC converter (bottom right)  Pinout is SIL: Vin-, Vin+, Vout-, Vout+.  All other busses are +5V at top edge , 0V/Gnd at lower edge of each board.

Decoupling: 2x 0.1uF ceramic disk across U1,U2, 10uF 50V on +HT rail (by DC-DC converter),  47uF 25V, (on right between U2 & U4).

There is some wiring under the VFD so that the four symbols appear in order as the eighth bit of each digit.  As VFD anodes and grids are fairly interchangeable from a driver point of view, this is achieved by connecting Grid 3 (centre symbols) to the 'A' anode (which is already under Grid 1), then connecting one of the centre symbol anodes to each remaining grid.

Edit: updated schematic, and zipped code for working clock
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 06, 2016, 03:54:52 am
i wired up the 595 on breadboard, it didnt blow up though the led did light up is it meant to?
Title: Re: Vacuum fluorescent display to clock display
Post by: ebclr on October 06, 2016, 04:53:54 am
(https://electronicmaker.files.wordpress.com/2016/07/clkarduino.png?w=680)

All the pins you need are available

Analog pins can also be digital pins
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 06, 2016, 05:27:57 am
except for the fact im trying to learn how to it with (relatively) high voltages that idea is ok, but as it says in the title this is for a vfd, specifically it has become me learning spi for a display driver chip, not simple logic level, i might be missing something from your post but i dont see how i would learn spi that way
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 06, 2016, 03:04:41 pm
The quick answer is: you woudn't.  You'd be taking someone else's code and just hoping it worked. 

Normally I'm a big proponent of using a MCU with enough pins rather than external I/O expanders and other logic, but sometime elegance or convenience wins over costs savings.

The 74HC595 circuit gives you far far more access with a logic probe, and if you 'bodge' it by wiring ST_CK to SCK instead of SS, you can get the previous shift register contents to appear on the outputs after each SCK rising edge, ideal for watching a bit pattern shift across a string of LEDs while you clock it sloooooooowly.   Stick a single chip integrated shift register, latch and HV driver in there and not only are there voltages you don't want to stick your logic probe into, but there is also absolutely no update until the rising edge of SS so if the data is getting corrupted, its the devil's own to debug without putting it on a reasonably good 4 channel DSO. (You need to monitor three lines of the SPI interface + at least one output bit, and the output level will blow the s--t out of a logic analyser unless you add a circuit to convert it back down to logic levels.)

Ebclr does have a point if you want to learn about driving multiplexed displays without the SPI stuff getting in the way and I suggested something similar to you in the early pages of this topic, but you'd have to rip it up to replace it with the SPI stuff, whereas if you learn the SPI first, simply displaying one static digit, you can then extend that to multiplexing without moving single wire, just by adding code to loop through all the digits repeatedly.   Unless you've got the resources to keep two versions fully assembled, that's a major benefit when you start doubting yourself and need to go back to simpler code that you've already proved to work.

I hope you found my VFD breadboard interesting, and at least the schematic should help you with some of the hookup details even though you intend to use different buffers for the level shifter.

Edit: Meanwhile I've got interrupt driven background multiplexing working.  I'll hold off on posting code to avoid confusing you before you've got the basics going.  Also it needs some cleanup before its fit to be out in public.
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 11, 2016, 10:16:55 pm
@Neo:  Its five days later and no followup on your progress with your VFD project.  Are you still working on it?  If so, I'll wait till you have cracked controlling a '595 chip before posting my current code, but if you've got sidetracked or would like to see my code before you work on your own, or don't follow up,  I'll wrap this up by posting it. 

Its currently loosing about 2 minutes per day (approx 700ppm) which is more than an order of magnitude worse than a really bad crystal. The Uno I am using is genuine 'Made in Italy' with a crystal, not a resonator.  I suspect the Arduino millis() count is FUBARed by design - its supposed to compensate for the Timer 0 interrupt rate not being exactly 1000Hz by adjusting the count periodically and my running second count allows for any adjustments to millis():
Code: [Select]
         if((millis()-ms)>ONE_SEC){
            ms+=ONE_SEC;
            BCDtime++;
            fixHMS();
         }
by keeping a running count of 'milliseconds'  and adding 1000 to it whenever it lags by more than 1000.   There seem to be a lot of reports of problems with millis() accuracy. . . .
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 12, 2016, 06:10:02 am
thank you ian, i have gotten a bit side tracked, all but one part for my simple iv-6 clock showed up and ive been building it, pics of it will go up when im done. As for the 595 i plugged it in but the led lit up, is it meant to? no code or nothing i just grounded the chip and it acted like id grounded the leds
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 12, 2016, 06:40:42 am
Thanks for following up.  Your IV-6 clock build sounds interesting, why not start another topic to document it as you build it? (I'm impatient to see it 8) )

Yes, the '595 can do that.  Its got 16 flipflops storing state, eight as the shift register itself and eight as the output latch and at powerup their states are effectively random* until you either shift in valid data or pulse the reset pin.  Without logic or a MCU set up to feed in data while pulsing SH_CP with a clean pulse, and then pulse ST_CP, the '595 will *NOT* do anything useful.  If you have two SPDT pushbuttons and either a quad NAND or quad NOR gate chip (either will do) + a toggle switch, I can draw you a schematic for a '595 test jig that will let you manually shift data through it and latch it to its outputs, but its probably better to dive right in and try to bit-bang it using an Arduino.
 
* They actually depend on manufacturing tolerances + noise on the supply during powerup, so although random from chip to chip, one specific chip in a particular circuit often tends to have 'favourite' powerup states.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 12, 2016, 08:06:49 am
ok, the threads started https://www.eevblog.com/forum/projects/daves-clock-from-russia-with-glow-version/ (https://www.eevblog.com/forum/projects/daves-clock-from-russia-with-glow-version/)
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 13, 2016, 12:39:38 pm
I was wrong.

AARGH!!!  Italian Arduino Designers!  |O

You already have a 16MHz crystal for the ATmega16U2 running the USB interface, so why not tap into that accurate clock for the main ATmega328P MCU instead of fitting a s--tty resonator?

No wonder Arduinos have such a rep for crappy timekeeping.  :palm:
Title: Re: Vacuum fluorescent display to clock display
Post by: Pjotr on October 13, 2016, 01:18:41 pm
You already have a 16MHz crystal for the ATmega16U2 running the USB interface, so why not tap into that accurate clock for the main ATmega328P MCU instead of fitting a s--tty resonator?

No wonder Arduinos have such a rep for crappy timekeeping.  :palm:

Indeed. An AT-cut crystal is more stable than a 32k watch crystal and runs way more accurate if properly trimmed. Such a thing is also a good one to learn a bit of assembler if you like. A hundred lines or so will do including alarm and bells and whistles :D  An ATmega48 will do easily.
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 13, 2016, 10:21:50 pm
Well, I'm now gilding and polishing the turd.
Code: [Select]
#define ONE_SEC 997784UL // micros() in one second trimmed for resonator.which was calculated based on the time lost during a 15 hour run, and:
Code: [Select]
int main() {

   uint32_t t; // temp for digit extraction
   uint8_t d; // extracted digit, then its font
   uint32_t ms; // tick counter  to sync to system micros count.


   setup(); // initialisation
   ms=micros();
 
   while(1){ // Superloop 
   flags.bMode=!digitalRead(BTNMODE);
   flags.bSet=!digitalRead(BTNSET);

         if((micros()-ms)>ONE_SEC){
            ms+=ONE_SEC;
            BCDtime++;
            fixHMS();
         }

   switch(flags.bSet<<1|flags.bMode){
     
      case 0b00: //Normal
         display(BCDtime>>8);
         VFDsymbWrite(VFD_SYMB_DOT,(BCDtime&1)); //Flashing dot
         break;
     
      case 0b01: //Mode pressed
         display(BCDtime&0xFFFFUL);
         VFDsymbWrite(VFD_SYMB_DOT,0); //No dot
         break;

      case 0b10: //Set pressed
         BCDtime+=0x000100UL; //Increment only minutes
         if((BCDtime&0x00FF00UL)==0x005A00UL) BCDtime&=0xFF00FFUL; //Wrap 60 to 00
         goto doSet;

      case 0b11: //Set + Mode pressed
         BCDtime+=0x010000UL; //Increment hours
      doSet:   
         BCDtime&=0xFFFF00UL; //Clear seconds
         ms=micros();
         fixHMS();
         display(BCDtime>>8);
         VFDsymbWrite(VFD_SYMB_DOT,1); //Fixed dot
         delay(80);
         break;
      }
      delay(20);
   } //endWhile(1)
}//endFn main
which is how I'm keeping time in my main() function (I've got a dummy .ino file so I can program it in real GCC C++ without the IDE mangling it before compilation).

We'll see this time tomorrow, how closely I've trimmed it for the crappy resonator.

I also found a fencepost error in my multiplexing function  :palm: - it was scanning one extra non-existent digit, and the variable after the display buffer array was the flags structure, which resulted in the top segment of the third digit getting lit, (or brightened if already lit) whenever the [Secs] button was pressed. Fortunately I had the display well dimmed so it was obvious that segment was getting extra time in each frame, and that it wasn't display buffer corruption.
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 14, 2016, 10:30:05 pm
I'd overcorrected.  It now using
Code: [Select]
#define ONE_SEC 999187UL // micros() in one second trimmed for resonator.
and is tracking a NNTP corrected PC clock to better than 2 seconds a day. To do any better, I'd have to either write a sketch to automate the clock setting and error measurement, or use a *good* frequency meter. 

The resonator currently has a frequency error of about -800PPM,  However its a s--ty resonator so I'm expecting the turd gilding to fail as it drifts due to temperature change, mechanical stress and ageing. 
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 04:34:38 am
this is getting way ahead of the 595 stage but when i go to build it will at at89c2051-24pi chip work? i just happened to find one 
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 16, 2016, 05:15:40 am
Theoretically yes, but that's an 8051 family MCU with only 1/16 the RAM and program memory of the ATmega328P on an Arduino, my fairly simple VFD clock is already using more program memory on the Arduino than its got, its not supported by GCC, and it needs a HV programmer you don't have.

Put it aside for now - there are some options to use it (see https://www.pjrc.com/tech/8051/ (https://www.pjrc.com/tech/8051/)) but the learning curve would be a lot steeper than Arduino and its not something a novice should tackle until they've thrown away the training wheels of the Arduino IDE, libraries, boards and preloaded bootloader.

On the subject of the gilded turd, the gilding is definitely flaking off.  The clock is currently running 6 seconds fast since I posted about it yesterday.   It looks like an order of magnitude improvement in accuracy over an uncalibrated resonator is practical in a shirt-sleeve environment, but its still an order of magnitude worse than an uncalibrated crystal.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 05:34:37 am
-puts the arduino chip in his collection next to the pic that he will probably not use anytime soon- ok back to the 595, i got the 595 on the breadboard what now?
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 16, 2016, 05:43:49 am
So what do you have hooked up to the '595?

I would suggest a LED on each output pin with a series resistor of between 330R and 1K for each one.  Either individual LEDs or a single 7 segment + DP one.

How do you want to stuff data into the '595?  Do you want to use push buttons and toggle switches till you have a feel for it, or go straight to Arduino?
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 05:47:04 am
i have a common anode 7 segment + dp display hooked up with 1k resistors before and after (1.2k +-20% their what i had at hand) and arduino with spi is what i thought i was meant to be learning
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 16, 2016, 06:36:46 am
Great.  I was asking about switches etc. in case you needed something simpler as a 'baby step' on your way to Arduino SPI. 

As you are going straight to Arduino, hook up the '595 to the Arduino as described in bildr's '595 tutorial and try bit-banging it: http://bildr.org/2011/02/74hc595/ (http://bildr.org/2011/02/74hc595/)
Once you've got that working, we'll move it to the hardware SPI port and try it that way.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 07:27:19 am
i have everything hooked up like you said fo spi, will that be a problem with bit banging and if no why wont his code allow me to change anything (yes the connections are right i changed the code to use the pins i have attached the shift register) Well something changed the leds switched off but i cant switch them on
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 07:40:21 am
now their back on im truly lost, the only thing i can do is turn the on or off by connecting or disconnecting pin 10 to +5v
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 16, 2016, 08:05:16 am
Photo  (or at least a very carefully checked list of what pin is connected to what) and current code please.

There's an Arduino library + sketch and a Windows application that lets you toggle pins directly from a Windows GUI.  It *may* be helpful to debug your hardware.

Do you have a logic probe that can indicate High/Low/Tristate?  If not, do you have a CMOS 4001 chip?  There's a reasonably simple logic probe here: http://www.zen22142.zen.co.uk/Circuits/Testgear/lprobe.htm (http://www.zen22142.zen.co.uk/Circuits/Testgear/lprobe.htm)  that's worth building to help debug this sort of stuff.

Alternatively do you have an Oscilloscope?
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 08:22:24 am
oscilloscope yes, a Hitachi V-1065A (if the model matters for whatever reason)

A-1.2kOhm-15
B-1.2kOhm-1
C-1.2kOhm-2
D-1.2kOhm-3
E-1.2kOhm-4
F-1.2kOhm-5
G-1.2kOhm-6
H-1.2kOhm-7
GND-8
+5V-16
Arduino11 - 595,14
Arduino10 - 595,12
Arduino13 - 595,11

595,10
595,13
595,14 all NC
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 08:30:43 am
current code
Code: [Select]
$b = "
int SER_Pin = 11;   //pin 14 on the 75HC595
int RCLK_Pin = 10;  //pin 12 on the 75HC595
int SRCLK_Pin = 13; //pin 11 on the 75HC595

//How many of the shift registers - change this
#define number_of_74hc595s 1

//do not touch
#define numOfRegisterPins number_of_74hc595s * 8

boolean registers[numOfRegisterPins];

void setup(){
  pinMode(SER_Pin, OUTPUT);
  pinMode(RCLK_Pin, OUTPUT);
  pinMode(SRCLK_Pin, OUTPUT);


  //reset all register pins
  clearRegisters();
  writeRegisters();
}               


//set all register pins to LOW
void clearRegisters(){
  for(int i = numOfRegisterPins - 1; i >=  0; i--){
     registers[i] = HIGH;
  }
}


//Set and display registers
//Only call AFTER all values are set how you would like (slow otherwise)
void writeRegisters(){

  digitalWrite(RCLK_Pin, LOW);

  for(int i = numOfRegisterPins - 1; i >=  0; i--){
    digitalWrite(SRCLK_Pin, LOW);

    int val = registers[i];

    digitalWrite(SER_Pin, val);
    digitalWrite(SRCLK_Pin, HIGH);

  }
  digitalWrite(RCLK_Pin, HIGH);

}

//set an individual pin HIGH or LOW
void setRegisterPin(int index, int value){
  registers[index] = value;
}


void loop(){

  setRegisterPin(1, HIGH);
  setRegisterPin(2, HIGH);
  setRegisterPin(3, HIGH);
  setRegisterPin(4, HIGH);
  setRegisterPin(5, HIGH);
  setRegisterPin(6, HIGH);
  setRegisterPin(7, HIGH);
  setRegisterPin(8, LOW);

  writeRegisters();  //MUST BE CALLED TO DISPLAY CHANGES
  //Only call once after the values are set how you need.
}
";
echo $b;
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 16, 2016, 09:31:17 am
Next time, please use code tags (https://www.bbcode.org/examples/?id=15) when posting code.  The forum swallowed the i subscript of the registers array in  clearRegisters() and writeRegisters(). :( 
Fortunately you didn't use i as a subscript anywhere else so I've been able to recreate the sketch.

A-1.2kOhm-15  ; I assume this is the LED --- '595 wiring
B-1.2kOhm-1
C-1.2kOhm-2
D-1.2kOhm-3
E-1.2kOhm-4
F-1.2kOhm-5
G-1.2kOhm-6
H-1.2kOhm-7
GND-8
+5V-16
Arduino11 - 595,14
Arduino10 - 595,12
Arduino13 - 595,11

595,10
595,13
595,14 all NC ; ?????? you've already listed '595.14 -- Arduino.11

There's a problem with your hookup.  You absolutely cannot leave '595 pins 10 (/MR) and 13 (/OE) floating.  Tie 10 high and 13 low - direct to the 5V and 0V rails is fine.

If you want to check signals with your scope, put a short delay in the loop() to make it easier to spot the beginning of each transfer.  delay(2); should be suitable.
Set it to 0.2V/cm and use x10 probes. (If you don't have any x10 capable probes, get a pair! Meanwhile tell me what probes you do have.)

Start by probing SRCLK_Pin and RCLK_Pin, one on each channel of your scope, triggering on RCLK_Pin -ve edge. You should see eight low-going pulses on  SRCLK_Pin nicely framed by the low time of RCLK_Pin.

Then try probing the SRCLK_Pin  and SER_Pin signals. Try triggering on SRCLK_Pin -ve edge and adjust the timebase and holdoff to get a stable display with eight low going pulses of SRCLK_Pin on the screen.  You should be able to see each data bit in sequence on SER_PIN.
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 16, 2016, 10:21:09 am
I've hacked my VFD board to simulate your one digit common anode LED hookup by disconnecting the PWM dimming signal and grounding /MR of the second 74HC595 so all the digit grids are on and as a result found another bug in the code.  The register pin numbers start from 0 not 1.  Try replacing your loop() with:
Code: [Select]
void loop(){

  // Display segments for "3"
  setRegisterPin(0, LOW); //a
  setRegisterPin(1, LOW); //b
  setRegisterPin(2, LOW); //c
  setRegisterPin(3, LOW); //d
  setRegisterPin(4, HIGH); //e
  setRegisterPin(5, HIGH); //f
  setRegisterPin(6, LOW); //g
  setRegisterPin(7, HIGH); //d.p.

  writeRegisters();  //MUST BE CALLED TO DISPLAY CHANGES
  //Only call once after the values are set how you need.
  delay(2);
}
Remember for common anode displays, LOW = ON ;)
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 16, 2016, 12:44:30 pm
For your amusement, I've rewritten it to use packed bits in the registers array.  It now only needs one byte per '595 chip.  I've also fixed the inverted logic problem - #define ON and OFF correctly as HIGH and LOW or visa-versa and it sorts it out for you.
Code: [Select]
const uint8_t SER_Pin = 11;   // MOSI - pin 14 on the 75HC595, data in
const uint8_t RCLK_Pin = 10;  // /SS  - pin 12 on the 75HC595, store clk 
const uint8_t SRCLK_Pin = 13; // SCLK - pin 11 on the 75HC595, shift clock

//How many of the shift registers - change this
#define number_of_74hc595s 1
#define ON LOW
#define OFF HIGH

//// uncomment for Ian's segment ordering
//#define SCRAMBLE
//const uint8_t scramble[]={ 6,5,4,3,2,1,0,7 };  //Map Neo's segment order to mine.

//do not touch
#define numOfRegisterPins number_of_74hc595s * 8

uint8_t registers[number_of_74hc595s];

void setup(){
  // Setup pins as output
  pinMode(SER_Pin, OUTPUT);
  pinMode(RCLK_Pin, OUTPUT);
  pinMode(SRCLK_Pin, OUTPUT);

  //reset all register pins
  clearRegisters();
  writeRegisters();
}               


//set all register pins to OFF
void clearRegisters(){
  for(uint8_t i = 0; i<sizeof(registers); i++){
     registers[i] = OFF?0xFF:0;
  }
}


//Set and display registers
//Only call AFTER all values are set how you would like (slow otherwise)
void writeRegisters(){

  digitalWrite(RCLK_Pin, LOW);

  for(uint8_t i = sizeof(registers); i--;){ //loop from N-1 to zero inclusive
     uint8_t t=registers[i];
     for(uint8_t j = 8; j--;){ 
       digitalWrite(SRCLK_Pin, LOW);
   
       // // Extract bit value and output the simple way
       // bool val = !!(t&128);
       // digitalWrite(SER_Pin, val);
       
       // Extract bit value and output the fast way
       if(!!(t&128)) digitalWrite(SER_Pin, HIGH); else digitalWrite(SER_Pin, LOW);
       //delayMicroseconds(10); // dont exceed 100 KHz!   
       digitalWrite(SRCLK_Pin, HIGH);
       t<<=1; //shift to next bit.
     }
  }
  digitalWrite(RCLK_Pin, HIGH);

}

//set an individual pin HIGH or LOW
void setRegisterPin(uint8_t index, bool value){
   const uint8_t BitMasks[]={1,2,4,8,16,32,64,128}; // convert bit position to single '1' mask

   #ifdef SCRAMBLE
     index=(index&0xF8)|scramble[index&7];
   #endif
  if(value) registers[index>>3]|=BitMasks[index&7]; else registers[index>>3]&=~BitMasks[index&7];
}


void loop(){

  // Display segments for "3"
  setRegisterPin(0, ON); //a
  setRegisterPin(1, ON); //b
  setRegisterPin(2, ON); //c
  setRegisterPin(3, ON); //d
  setRegisterPin(4, OFF); //e
  setRegisterPin(5, OFF); //f
  setRegisterPin(6, ON); //g
  setRegisterPin(7, OFF); //d.p.

  writeRegisters();  //MUST BE CALLED TO DISPLAY CHANGES
  //Only call once after the values are set how you need.
  delay(2);
}
Sketch is called 'Neo1e'.

I'm also using C99 fixed width integer types (from stdint.h) for brevity and efficiency - you'll need an OPTIONAL patch for keywords.txt if you want the IDE's syntax hilighting to support them. 
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 01:15:14 pm
Quote
595,14 all NC ; ?????? you've already listed '595.14 -- Arduino.11

im not immune to typos or mistakes, trouble is i tried that way with them as you said and it did nothing, perhaps the resistance is too high?
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 16, 2016, 01:31:00 pm
Leaving them floating is *NOT* an option.  *ALL* inputs of any CMOS logic chip that doesn't have built in pullups must *ALWAYS* be tied to a valid logic level.  /OE must be low to enable the '595 outputs and /MR must be high to prevent the shift flipflops all being forced to '0'.

The problem with bringing up something like a '595 for the first time is you have to get the connections and the signal sequence all right together, and if its not working you cant easily tell what's wrong without a scope and advance knowledge of what the signals are supposed to look like

If you are still stuck, post a GOOD photo of your breadboard + Arduino.  I need to be able to zoom it in enough to see resistor colour codes and which wire goes into which hole so make sure its in sharp focus, keep the resolution above 1000 px on the short side and don't over-compress it
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 01:40:25 pm
i warn you my camera sucks and this forum wont let it upload in 4k, also the trouble with my oscilloscope is its analog and so it would be a real headache to drag it in here but i can use it if i have to, i tried it with a 200 ohm same result. This is turning into a real headache
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 16, 2016, 01:53:02 pm
That's not in focus.  Try backing off a bit to give its autofocus a chance.  You may need to use the camera zoom to fill the field of view but using zoom requires very good lighting.  Also the Arduino isn't in shot so I cant trace the wires. Contrast, lighting and image size are good, so if you can sort out the focus (I should be able to read the part no. on the bottom chip) I can check your circuit.

However I note you don't have any decoupling for the '595.  Add a 0.1uF disk ceramic or similar directly across the top of the chip between pins 8 and 16.  Without it, any noise on the supply or long supply wires will make its behaviour unpredictable.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 01:56:21 pm
i cannot take a better picture i am sorry the bottom chip is for a later stage sn74ls155n the only thing connected is the 595
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 16, 2016, 02:16:25 pm
Its difficult to tell due to the camera angle (straight down or slightly side on is far better than an end-on  tilted view when one is trying to check breadboard wiring)  and the focus problem, but it looks fairly sane.  Of course I cant check the Arduino wiring as its out of frame and you haven't told me what colour the Arduino pins 13, 11 and 10 wires are.

You MUST connect the Arduino GND to breadboard GND/Vss/0V.  I cant see that connection in the photo.  If that doesn't fix it, scope the three signals keeping the arduino.13 signal on one channel all the time and swapping between the other two as I described above, probing right at the '595's pins, (and clip the ground lead on as close to pin 8 of the '595 as you can) then post photos of the traces.

Check the probes are properly compensated using the scope's squarewave calibrator output before scoping the signals. Adjust the probes' compensation trimmers if the leading edge of the squarewave overshoots or undershoots significantly. When taking scope screen shots, shade the screen from ambient light as much as possible, make sure the brightness isn't too high so the spot doesn't flair, and preferably use a mini-tripod or a pile of books to avoid camera shake.  When posting scope shots, always describe the gain setting for each input used, (V/div), note whether the probes where x1 or x10 etc. and give the timebase setting.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 02:27:42 pm
yellow green yellow white, gnd 13 12 11
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 02:32:24 pm
i got a question, forgive me if its dense but i have seven 7407 hex buffer chips, what is stopping me from just using these and code i can understand to drive the display? as i understand it the 7407 could be made to output 30v though im a bit fuzzy on how
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 16, 2016, 03:02:45 pm
The limitation was the Arduino's number of I/O pins.   D0 - D13 + A0 - A5 only gives you 20 pins.  IIRC, your VFD has 6 digits and 14 segments per digit, so if you drive the 7407 chips directly  from the Arduno you wont have any pins left to connect any buttons to control the clock or to connect a RTC chip (since the onboard resonator is so crappy).   You need to free up an absolute minimum of three pins, A4 and A5 because you need the I2C pins for a RTC chip and one other analog pin for a resistor ladder with all the buttons.  That could be done by using a 74xx238 chip to convert a three bit binary number into up to 8 digit select signals, but adding an alarm output would then be extremely difficult.

The pin shortage problem mostly goes away if you wire your VFD as if it was a 7 segment one, paralleling the two center horizontal segments, and grounding the unused radial segments. 

Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 03:06:23 pm
can the arduino program micro controllers bigger than it? if so i could just use a gigantic micro or maybe two smaller ones if it couldn't
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 16, 2016, 03:45:53 pm
Yes, mostly Atmel chips + a few others.  A reasonable option would be to use it to flash a 40 pin ATmega1284P with an Arduino compatible bootloader, then connect it to the IDE using a FTDI serial cable as-if it was an Arduino.   There's an article here: https://maniacbug.wordpress.com/2011/11/27/arduino-on-atmega1284p-4/ (https://maniacbug.wordpress.com/2011/11/27/arduino-on-atmega1284p-4/)
Title: Re: Vacuum fluorescent display to clock display
Post by: Rolo on October 16, 2016, 04:00:51 pm
Or Arduino Mega, lots of I/O and default supported in IDE.
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 16, 2016, 08:02:11 pm
The ATmega1284P PDIP chip is a heck of a lot cheaper than a genuine Mega, even if you add on the cost of a 16MHz crystal.  Its also easier to breadboard with.   If you are too cheap to get a USB<=>logic level serial cable, once youv'e stuffed a bootloader in there, you could even use a Uno with RESET tied low and tap its RX and TX pins to the equivalent pins on the  PDIP, then pulse its RESET low manually to trigger the bootloader.

See http://www.hobbytronics.co.uk/arduino-uno-pro-1284p (http://www.hobbytronics.co.uk/arduino-uno-pro-1284p) for ones with a preloaded bootloader + more up to date resources for adding it to the IDE etc.

OTOH Chinese Arduino Mega clones are cheap as chips . . . .
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 11:17:22 pm
im pretty sure i have old crystal oscillators about that speed if i do couldn't i use them? also does the chip need an arduino bootloader on it? also the main reason to go with a chip versus the mega is this does plan to be buried in a clock
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 16, 2016, 11:41:40 pm
it is confirmed i have a 16megahertz crystal oscillator from 1984 (not sure if it works but the previous owner kept it put up so i fail to see why it wouldnt)
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 17, 2016, 12:29:06 am
You don't *HAVE* to use an Arduino bootloader as the Arduino can be used with an ISP sketch to load your code into another AVR, but it makes development *MUCH* easier to simply flash it with the bootloader and use a *GENUINE* FTDI USB<=>Logic level serial cable or other high quality equivalent to make it appear as just another flavour of Arduino to the IDE. 

The 16MHz crystal is probably fine - get a spare ATmega328P chip, flash it with the normal Arduino bootloader and see if it works with the crystal and what caps are needed for it to get it to its nominal frequency.  (There are other ways of checking the crystal - build a pierce oscillator round it or simply use a 74HC4060, but the AVR option also gets you a useful chip and practice at moving from Arduino to direct AVR on breadboard without having to learn anything new on the software side or patch the IDE)

Incidentally, your breadboard is pretty fugly - its *EXTREMELY* limiting not having power and ground busses between the breadboard sections, and I'm sure that's not helping with the reliability of  your circuits so I strongly recommend getting some solderless breadboard bus strips (like these (http://www.jameco.com/z/JE19-100-Point-Solderless-Breadboard-Bus-Strip-2-Pack-_94457.html)) and sticking a pair down to your baseplate either side of each breadboard section.  I make do with the single bus strips found on my BIMBOARD, but frequently wish I had more.  If you've got the space and the money, more is better. ;)
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 01:04:40 am
If you are too cheap to get a USB<=>logic level serial cable, once youv'e stuffed a bootloader in there, you could even use a Uno with RESET tied low and tap its RX and TX pins to the equivalent pins on the  PDIP, then pulse its RESET low manually to trigger the bootloader.
there is a difference between cheap and practically broke, ill look into the bus strips the breadboard itself is a very old one i got from the same place i got the crystal
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 17, 2016, 01:26:15 am
If you are too cheap to get a USB<=>logic level serial cable, once youv'e stuffed a bootloader in there, you could even use a Uno with RESET tied low and tap its RX and TX pins to the equivalent pins on the  PDIP, then pulse its RESET low manually to trigger the bootloader.
there is a difference between cheap and practically broke
CH340G breakout boards can be found for as little as $2, or hack a really old cellphone data cable.  If its cheaper than a couple of bottles of pop, drink only water for a week to pay for it.. . . .  At this point I should note that my ancestry comes from two groups with reputations for being the tightest with money in Western Europe so min-maxing every purchasing decision is nearly instinctive for me.

However, knowing how to use an Arduino as a logic level USB UART is valuable to anyone who needs one in an emergency.   If you have a real UNO with a socketed '328P, you can also pull the chip, and then hook up the reset line to your breadboard which makes life even easier.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 01:49:09 am
my uno has a surface mount chip aka no socket
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 02:06:35 am
so just get a grasp on what were talking about (just confirming what i think is going on at this point), i need the ch340g and a ATmega1284P-PU chip so i can build my own arduino? also as for the crystal im meant to figure out what i need to get it hummin at the right frequency, i have a leftover 4060 from the supplies i got from my clock
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 02:21:16 am
i do apologize if im a bit dense at times, i learn by doing more so than reading, dont get me wrong i can and am learning from this it just takes a bit of effort on my part to do it thank you for your patience
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 03:49:14 am
how can the 7407 output 30volts i have yet to find anything on google to tell me that
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 17, 2016, 03:58:43 am
The easiest way to understand what you need to get an Arduino on a breadboard is to look at the Arduino Pro Mini schematic (https://www.arduino.cc/en/uploads/Main/Arduino-Pro-Mini-schematic.pdf) as that shows the required logic level serial connections on header JP1 and you can substitute any USB <=> 5V logic level serial adapter for the recommended FTDI one (including the CH340G one I mentioned)  or even use a MAX232 chip to convert the levels from a real serial port.  The absolute minimum serial hookup to support downloading sketches, is TXD, RXD + a manual reset button.  Add the DTR signal (or RTS for 3rd party USB<=>serial adapters) and the 0.1uF cap from that to Reset and AVRDUDE will reset it for you when it starts a download.

For the TXD + RXD + manual reset you can use your existing Arduino with its reset tied low to disable the surface mount  ATmega328P, as a USB<=>logic level serial adapter.  You have to hit the reset button on your breadboard when you see the end of compilation message just before AVRDUDE runs.  If you don't mind modding your  Arduino board, you could cut the link in the middle of the RESET EN solder jumper (easily reversible with a dab of solder) and attach a wire to the capacitor side of the jumper so you can connect it to the breadboard ATmega reset pin. 

Get a bit fancier and fit a 2 pin header wired to the jumper pads and mounted with a dab of epoxy and you can enable/disable the auto-reset with a simple plug in jumper and when its off, use a M-F jumper wire to get the DTR reset pulse to your breadboard.

Personally I'd hack the Arduino and start saving up for a better adapter.

Start with a 'vanilla' ATmega328P in PDIP, with a 16MHz crystal for a breadboard Arduino that runs unmodified Uno sketches, then upgrade to the ATmega1284P which requires you to patch the IDE and maybe some of the libraries to handle the extra pins.

A normal CD4060 or equivalent wont run a 16MHz crystal reliably if at all because its not fast enough even at 15V Vdd.  You'd need a 74HC4060, or 74AC4060.  For the crystal, start with a 33pF cap to ground either end of it + whatever chip you choose to make it oscillate.  If its running slow, go down to 22pF.  If its running fast, go up to 47pF.  The caps are non-critical if best frequency accuracy isn't a requirement.  You can mix and match adjacent values to get it closer or even replace one of them with a trimmer or add a gimmick cap in parallel to get it really close.  However as 30PPM error is only 2.6 seconds/day, you'll have to run your clock for a very long time making a very small tweak each day to adjust its rate by trimming the crystal.   Its much easier to simply note the daily error, calculate the actual crystal frequency from the error and trim it in software.

Read http://ww1.microchip.com/downloads/en/AppNotes/00826a.pdf (http://ww1.microchip.com/downloads/en/AppNotes/00826a.pdf) for an introduction to crystals that tries to keep it relevant to digital designers.

The 7407 cant output 30V, but its quite happy switching 30V provided via an external pullup resistor >=1K to its output.  Input at logic '1' output transistor switches off and pullup takes it up to 30V.  Input at logic '0', output transistor switches on and pulls it down to about 0.7V.  As 30V is the Abs. Max. limit, you'd want to keep the HT rail at or under 27V above ground to have a little safety margin.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 04:14:36 am
now im confused you say transistor but a transistor cannot output more than its base, also im not hacking my arduino it works and i like it that way, knowing my luck if i touched it that fact would soon change
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 17, 2016, 04:38:33 am
now im confused you say transistor but a transistor cannot output more than its base, also im not hacking my arduino it works and i like it that way, knowing my luck if i touched it that fact would soon change

Err. . . . I think you are confusing it with an Emitter Follower circuit where the Emitter cant go above Vb - Vbe unless the load pulls it up.  For a NPN transistor that isn't fully saturated, (i.e its in its linear region or Off) the collector voltage is almost always above the base voltage.  If its On and fully saturated at a moderate fraction of Ic_max, Vce may be a few hundred mV lower than Vbe.  Start a topic about 'transistor theory for beginners' to get the forum consensus if you are still confused as I learnt out of the 'Mullard Reference Manual of Transistor Circuits' 2nd (1961) edition, with a srew-cup breadboard and PNP Germanium transistors, a *LONG* time ago and I don't know which affordable newer books or online tutorials are any good for beginners as there are too many crap 'monkey see, monkey do' blogs, instructables and Youtube videos by posters who don't really understand transistors in any depth themselves.

I agree its not optimal to hack the Arduino.  However if you are only plugging wires in its headers, grounding its RESET, and using a manual reset button for the ATmega on the breadboard, its no more risky than any other low voltage Arduino + breadboard experiment.  The real risk comes if you take a soldering iron or Xacto knife to it., and considering the state of your Iron, I think that decision is very wise.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 07:17:04 am
ok we have been over this i know, purely transistorized version is somewhat weird but this is not an average display, every other option i cant quite understand yet this i can (i of course would use a circuit for the p channel mosfet i just connected them directly for simplicity) and with that font i came up with it is tested to work it wont make full use of the 14 segments BUT its good enough for me. Pardon me if this is considered an insult but try to see it from the way i look at it i can spend who knows how much going down the rabbit hole for a computer to drive it or i can use a very simple microcontroller, 75 cents of mosfets/transistors and stuff i have on hand to build this idea.
  The way it works is in fact somewhat simple all the npns do is act like switches the microcontroller pulses them and one grid mosfet and then the next, With the 4026 chips i bought for a second clock i have 42 outputs so 42 npn transistors, after the transistors, all the matching letters are tied together when one cluster is turned on so is its grid and all i need is 20 p channel mosfets (7 for the base letters, 8 for the grids and a couple more to support my slightly changed font) So instead of needing 50 or 60 io pins i would only need 8 in this circuit and and a uno chip could do that which is the standard chip for programming with arduino so lots of tutorials on it.
Post note i realize i didnt draw a 1k resistor pulling each diode to ground but i meant to
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 07:37:35 am
the reason i bring this transistor idea back up is as it gets more and more advanced (or complex) my thoughts return more so back to this, each time slightly more sophisticated method
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 17, 2016, 08:34:03 am
Can you find an old copy of Excel from before MS Office got the ribbon and went all XML and added the x on the end of all the document extensions?  If so, I'll post the font editor spreadsheet I wrote.   You could try it on the newer Excel, but I suspect it uses stuff that's been depreciated.

Your transistor idea is making a little progress but is still defective.  Apart from not showing the +HT feed to all the MOSFET sources (pin 2), it has major issues with the bipolar transistor drivers.

You are using P channel MOSFETs to drive each segment anode, but you need to pull their gates low to turn them on, and NPN emitter followers can only drive upwards to a maximum of one diode drop below their base voltage.  If you attempt to pull the bases down while the gates are charged to +HT, you'll Zener the b-e junction which does culminative damage to most types of transistor degrading the HFE.

If you add pulldown resistors on each gate to turn on the MOSFETs, the NPN transistors could drive the gates up, but the base voltage would need to be the same as the MOSFET source voltage to actually turn them off which means you'd need a level shifter between the transistors and your [IO1] control signal.

Also the segment control signals [A]-[F] wont work the way you hope.  If they are above Vb [IO1], the transistor will draw current from them to feed the emitter, but if they are open circuit the emitter will still reach nearly the same voltage, but all the current it needs will flow through the base.   If any of them are below [IO1] by more than approx 0.6V, they will draw an uncontrolled amount of current through the forward biassed b-c junction and pull down [IO1] with a risk of damaging the chip driving it.

Furthermore, even if you could resolve that issue, so that the transistors successfully combine [IO1] and [A]-[F], you'd need to make sure that the level on [IO1] to activate the Grid MOSFET: LOW is the same as the level needed on the transistor bases to turn the segment MOSFETs on, otherwise it wouldn't gate the segments for a particular digit through to the multiplexed display the way you are hoping.

Doing logic with 'bare' transistors is difficult - that's why historically there was a push to integration leading to ICs and the 7400 series logic families, rather than simply using transistor arrays with all b, c and e pins prought out individually like CA3096 (https://www.intersil.com/content/dam/Intersil/documents/ca30/ca3096-a-c.pdf).  To try to do level shifting from 5V TTL or 15V 4000 series CMOS up to 25v-30V for the VFD in the same device at the same time makes it even trickier.   You are certainly going to need a mess of resistor and probably diodes to make anything workable.   Imagine a two 'digit' two 'segment' per 'digit' VFD (i.e. two grids and two anodes) and try to figure out how to drive that with just discretes. If you can design a circuit that will generate the correct signals to drive that, extending it for 7, 14 or 16 segments and more digits is trivial.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 08:39:23 am
but you dont outwardly object and im closing in on the right idea, the only trouble is if i dont know ics barely at all, such is to say i wouldnt know what i was looking for if it was staring me in my face
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 08:49:53 am
ok then forget the p channel mosfets what if i just went with the basic npns to do the switching and used buck boost instead of mosfets? something like this http://www.digikey.com/product-detail/en/diodes-incorporated/AP3012KTR-G1/AP3012KTR-G1DICT-ND/4505297 (http://www.digikey.com/product-detail/en/diodes-incorporated/AP3012KTR-G1/AP3012KTR-G1DICT-ND/4505297)
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 09:44:40 am
as i understand it there is nothing wrong with my idea of npns to switch on/off signals its the voltage amplfiication process im a bit hazy on how, and one thought occurs to me regardless when it first came up they didnt have what we have available now and they pulled it, the question is how and is it applicable
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 17, 2016, 10:18:26 am
You may not be able to  gate those AP3012KTR boost chips fast enough for multiplexed VFDs.  Its got a 550us soft start time, then the output cap needs to charge up to 25V and when you turn them off the cap has to discharge most of the way down to the cathode (filament) voltage. If there's any overlap with the previous digit you'll get ghosting.

I found when I reduced the mux rate below 3ms per digit, the flicker started to become objectionable.  That's an 83Hz frame rate on a 4 digit display.  For your 6 digit display you'd only get 2ms/digit.  However it would be a cool way of static driving your individual digit IV-6 VFDs.

Your NPN transistor switching, combining two logic signals is borked.  The *ONLY* chance of getting two signals to combine logically in one transistor without extra diodes etc. is to use the base and emitter as inputs.  You'll need a series base resistor and the b-e reverse breakdown voltage must be greater than the logic supply.

Truth Table
===========
 NPN    PNP
-----  -----
E B C  E B C
0 0 Z  0 0 0*
0 1 0  0 1 Z
1 0 Z  1 0 1
1 1 1* 1 1 Z

Z is Hi-Z, add a pullup resistor (NPN) or pulldown resistor to the collector to convert to a valid logic level.  States marked * are weak  the only drive current is via the base resistor.  If there is an opposing pullup/pulldown that isnt at least an order of magnitude greater, a valid logic level is unlikely.  NPN is more useful for this application than PNP as it could also do the level shifting for the MOSFETS.  There is one NAND combo, that would turn the MOSFET on with a single inverted input: /E & B if you add a pullup for C.  Put the active low segment drive signals on E and the digit drive signals on B via base resistors as mentioned above, with a separate transistor with its emitter grounded to control the grid MOSFET for that digit.  You can wire-or the collectors of the segment transistors for each digit to handle the multiplexing

However you'd be better served by using MSI logic for the multiplexing and ordering those parallel logic input 50V high side drivers we spotted a while back: Microchip MICROCHIP  MIC2981/82YN  (http://ww1.microchip.com/downloads/en/devicedoc/mic2981.pdf) which were in stock at most major distributors.  Add a 330K pulldown to each output and it will do very well indeed for logic level to VFD electrode driving, with one of those boost chips to generate the +HT rail.   The pulldowns can be done with a single SIP resistor array if you order  Bourns 4610X-101-334LF Resistor Networks & Arrays 10pins 330Kohms Bussed, or equivalent whuch has 9 individual 330K resistors in a SIP package with a common pin at one end - ideal for breadboarding or for prototyping on matrix board or veroboard with the MIC2981.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 10:33:03 am
so with http://www.digikey.com/product-detail/en/microchip-technology/MIC2981-82YN/576-1158-ND/771627 (http://www.digikey.com/product-detail/en/microchip-technology/MIC2981-82YN/576-1158-ND/771627) all i have to do is input logic level and out comes 30v right (and do the thing with the resistors)? nd it all just kinda neatly wraps up like that no strings? because if what i perceive to be, is then you are a genius and you found my golden goose
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 10:57:04 am
i believe there was a misunderstanding i have no intention to use the transistor as a 2 input device what i mean was to combine outputs, like below
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 17, 2016, 11:09:47 am
Maybe.  I still don't think the NPNs are a good way of handling the multiplexing.   Use octal buffers with tristate outputs, one or two per digit according to the number of segments.  parallel all their same segment outputs and activate the output enable pin of ONE of them while activating the grid for the same digit.  Drive the digit selects  with a decoded counter clocked at >=480Hz (i.e. clocked by the Q5 output of a 4060 with a 32.768 KHz crystal, thats also generating your timekeeping clock), and its job done: static decoded segments for each digit => multiplexed VFD drive levels. 

You can go about it a little differently - use quad tristate buffers for each digit then build a single decoder using two 74HC238 chips or whatever the 4000 series equivalent is to get one pin out of 16 high at a time, wire those pins to the rows of a piece of stripboard, 16 rows, by 23 holes per row (min.) with a track cut in every row alternately 4 and 5 hooles from one end (zigzagged for strength) then build a diode matrix for the 'font' to directly drive the MIC2981 segment inputs.  mark out a 16x16 block in the middle of the board and it the diodes vertically cathode up, one row at a time to the long side of each row, leaving a couple of holes at the edge end of the row for off-board wiring, soldering a diode in wherever you want a lit segment, and omitting it where you want  dark one, then when all rows are complete link the cathodes with bare wires in columns and run insulated fly-wires from each column in turn to the short end of a row the far side of the track cuts for the segment outputs.   Don't be tempted to sandwich the diodes between two veroboards with tracks at right-angles: If you make a mistake its nearly impossible to get them apart again to fix it without a lot of damage.  I did that once for a 7 segment HEX display and regretted it bitterly.

Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 11:20:52 am
would this work for that octal buffer http://www.ti.com/lit/ds/symlink/sn74hct541.pdf (http://www.ti.com/lit/ds/symlink/sn74hct541.pdf) though im not entirely sure what you you mean by decoded counter? perhaps a part number would help
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 17, 2016, 11:42:38 am
i believe there was a misunderstanding i have no intention to use the transistor as a 2 input device what i mean was to combine outputs, like below above (reply#193)

That looks like two signals per transistor to me.  You've got an [An]signal and an [IOn] signal to each transistor then you are paralleling the emitters which cant ever work properly.

Try this:
(https://www.eevblog.com/forum/projects/vacuum-fluorescent-display-multiplexing-problem/?action=dlattach;attach=263079;image)
I've attached the LTSPICE circuit in case you want to extend it or add pulsed sources ground etc. and simulate it
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 17, 2016, 12:16:16 pm
would this work for that octal buffer http://www.ti.com/lit/ds/symlink/sn74hct541.pdf (http://www.ti.com/lit/ds/symlink/sn74hct541.pdf) though im not entirely sure what you you mean by decoded counter? perhaps a part number would help

Yes.  You need 6 digit select lines so you need a decade counter with decoded outputs.e.g. 74HC4017 Rig the 7th output (Q6) to reset the counter so it counts Q0 Q1 Q2 Q3 Q4 Q5.  As the '4017 Qn outputs and the MIC2981 grid drive inputs are active high and the octal tristate buffer's enable inputs are active low, you'll also need a hex inverter to generate /Q0 /Q1 /Q2 /Q3 /Q4 /Q5  for the buffer /OE gate signals.

However if you want to put the segment 'font' diode matrix ROM between the tristate buffers and the MIC2981, you'd do better to use 74HC241 which gets you two digits worth of 4 bit tristate buffers in one chip.   One is active high OE ahd the other active low, so you also need three screaming fast inverters (74AC series) to avoid overlapping the active low enable signals with the adjacent timeslot active high signals.  It would probably be safer to not use two timeslots, (Q0 and Q4), and group all the active high enables in slots Q1-Q3, and active low in /Q5-Q7 using Q8 for reset.  Then you could use ordinary inverters rather than 74AC ones.  That would also mean you might need to bump up the multiplexing frequency a bit as the frame rate @512Hz clock would only be 64Hz.

On the combined output of all the 74HC2412 chips, you'd use two 74HC238 active high 3 to 8 line decoders to build a 4 to 16 line decoder to drive the diode font matrix.  You'd probably only populate ten rows of the matrix for "0" to "9" unless you wanted to add extra letters/symbols, maybe "A" "L" "M" "P" "R" which would let you display "AM" "PM" and "ALARM"  Its worth keeping the 0xF row empty for blanking.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 12:51:22 pm
so this matter is conveniently solved until i either hit a brick wall of misunderstanding or get the parts
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 01:02:17 pm
However if you want to put the segment 'font' diode matrix ROM between the tristate buffers and the MIC2981, you'd do better to use 74HC241 which gets you two digits worth of 4 bit tristate buffers in one chip.   One is active high OE ahd the other active low, so you also need three screaming fast inverters (74AC series) to avoid overlapping the active low enable signals with the adjacent timeslot active high signals.  It would probably be safer to not use two timeslots, (Q0 and Q4), and group all the active high enables in slots Q1-Q3, and active low in /Q5-Q7 using Q8 for reset.  Then you could use ordinary inverters rather than 74AC ones.  That would also mean you might need to bump up the multiplexing frequency a bit as the frame rate @512Hz clock would only be 64Hz.
or alternatively i could just accept that my "font" would be best on leds where it isnt already ludicrously complex
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 17, 2016, 01:10:05 pm
i believe there was a misunderstanding i have no intention to use the transistor as a 2 input device what i mean was to combine outputs, like below above (reply#193)

That looks like two signals per transistor to me.  You've got an [An]signal and an [IOn] signal to each transistor then you are paralleling the emitters which cant ever work properly.

Try this:
(https://www.eevblog.com/forum/projects/vacuum-fluorescent-display-multiplexing-problem/?action=dlattach;attach=263079;image)
I've attached the LTSPICE circuit in case you want to extend it or add pulsed sources ground etc. and simulate it

as i understand it theres the 5v logic signal that turns it on (saturation) then from there until it is turned off it acts as a short circuit
but as you said i dont grok transistors so im merely explaining why i thought that and not arguing for it
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 17, 2016, 01:17:16 pm
Do persevere with the SPI and Arduino.  Its a skill that's worth cracking because it opens up the use of so many clever chips that can save you much money and effort building complex circuits.  However to get your VFD clocks going can be done in pure logic + those Micrel High side drivers, and I think I agree you'll get more satisfaction that way.

I suggest you make it modular so you can 'borrow' the VFD as a complete subassembly for other projects - put the MIC2981 chips, the +HT boost circuit, the filament supply and the VFD all on one board with a pin header for all the segment and digit control lines to the MIC2981 chips.  IIRC your VFD had 21 grid and anode pins so that lot would fit nicely on a 34 pin or 40 pin 2 row box header you could cannibalise old floppy or IDE cables to make mating cables for, leaving enough pins for plenty of grounds and 5V pins.  (As a rule of thumb: Use twice as many ground pins as 5v pins.)  If you connect a 'bare' pizeo sounder disk to a spare MIC2981 output, with a lower value pulldown - say 33K, you could use it as a fairly loud beeper for an alarm.   Just gate a squarewave audio tone.

e.g. to do it in pure logic, 1.024KHz from your '4060 divider chain ANDed with the 2Hz final output of the '4060 to get a 'beep-beep-beep' effect and also with the output of your alarm latch which would be triggered by your alarm time match circuit.  The easiest way of entering the alarm time would be to decode each digit to individual output pins and use rotary switches or jumper wires to program it.  Hours >=24 = alarm off. The selected digit pins would all be ANDed together and applied to the set input of your alarm latch, with the reset input connected to a pushbutton.
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 17, 2016, 03:06:14 pm
as i understand it theres the 5v logic signal that turns it on (saturation) then from there until it is turned off it acts as a short circuit
but as you said i dont grok transistors so im merely explaining why i thought that and now arguing for it
OK, lets give you a sim to poke around in and hope it 'clicks' for you.

I've created a simulation test jig for the circuit that shifts some 5V logic signals around for all the segment inputs while alternating [IO0] and [IO1] to simulate multiplexing:

(https://www.eevblog.com/forum/projects/vacuum-fluorescent-display-multiplexing-problem/?action=dlattach;attach=263131;image)

The top plot is all the logic signals.  They all use 5V levels so I've had to scale and offset them so they don't overlap vertically to make them clear enough to understand.
The bottom two plots are the VFD segment outputs straight from a P channel MOSFET.  The 10K resistors in the gate circuits act as a potential divider so the MOSFET gate drive is limited to 12V relative to the source to avoid blowing out the gate oxide. They also act as pullups for the NPN transistors. You can probe anywhere around the main part of the circuit, but be careful which plot pane you last selected as you really don't want raw voltages or currents in the digital pane.   If it all gets FUBARed, reload the plot settings file.

Ignore the gubbins in the box on the left  - its the simulation test jig and contains some fairly gnarly LTspice logic.

Edit: I've improved the test signals to make it easier to draw up a truth table from the plot, tweaked a few component values and added the grid drivers. See 'Discrete MUX2.asc'.  Copy the plot settings file from the zip and rename it to match.
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 18, 2016, 07:00:32 am
the now was a typo
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 18, 2016, 10:51:55 am
Was the LTSPICE Discrete MUX simulation any help to you?
Do you use LTSPICE?
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on October 19, 2016, 07:42:34 am
i do use ltspice and its useful to have it mapped out, thank you
Title: Re: Vacuum fluorescent display to clock display
Post by: Ian.M on October 22, 2016, 02:38:18 pm
Bump: Full code posted for my SAMSUNG SSED HNM-05SS62T VFD clock https://www.eevblog.com/forum/projects/vacuum-fluorescent-display-multiplexing-problem/msg1041506/#msg1041506 (https://www.eevblog.com/forum/projects/vacuum-fluorescent-display-multiplexing-problem/msg1041506/#msg1041506)
Title: Re: Vacuum fluorescent display to clock display
Post by: neo on November 07, 2016, 11:09:50 pm
OK i have come up with an idea i don't know if it sucks or not. Take a 4017b counter and wire it in to where it pulses buffers and the grid pin, some vfds i have would be totally cool with only 15 or 18 volts others i could use the MIC2981 on. As for the control circuitry (buffers) a logic level signal goes in to a tri state buffer and then a MIC2981 circuit like described pretty much unchanged from your idea except for the means of pulsing grids. The appeal of a 4017b is that its expandable, capable up to 10 mhz at 10 volts vcc and (this is provided this idea doesnt suck) i actually understand everything thats going on here. Also as a post note is there any multiplexer chip than when you pulse clock it just changes and doesnt require anything more complex than that