2907 TUBE DRIVER [Replace Q3, P channel MOSFET]

For RTC breakouts, etc., use the Other Products from Adafruit forum

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
russell 27
 
Posts: 242
Joined: Thu Sep 12, 2013 3:59 pm

2907 TUBE DRIVER [Replace Q3, P channel MOSFET]

Post by russell 27 »

IMG_01.JPG
IMG_01.JPG (85.46 KiB) Viewed 11484 times
Anyone having a problem with battery backup not functioning or a VFD display that's uneven or with dim digits, I offer this Transistor MOD. The sole purpose of the ZVP3306A MOSFET, is to disconnect tube filament power at power loss, so backup battery is not supplying current there, instantly draining the cv1220 button cell, which is then unable to power AT168 to keep current time. The MOSFET is supposed to switch fully off at power loss and fully on at power up. This was not the case on my board. MOSFETS are switched by voltage, and I'm not certain there is a high enough voltage potential at the gate to fully and reliably turn on and off, so it can be in a PARTIAL state. The PN2907 is an old work horse, uses current to do switching, and has worked perfectly in my tests. If you've ever closely examined your tube, you might have noticed the two hair sized filaments stretched across the entire display, about 3/16 an inch above the segment screens. Current flowing through these is what enables the phosphor in the segments to illuminate. Pin 1 and 13 are the filament connection pins of the VFD tube. One other note of operation, filament current is constant, regardless of tube brightness, segment brightness is handled by the MAXIM chip via the Atmega 168. A reliable, good current, on the filament, is essential to a full, bright, even display. Tube specs are; 5 volts @ 75-95 milliamps. Measurements I made : current measured directly from + 5 volt rail to tube filament anode (pin 13) read 65 milliamps. Current measured from transistor collector to filament anode pin read 64 milliamps, no current loss through transistor. voltage at +5 rail is 4.73 volts and voltage at transistor collector is 4.6 volts. No real voltage loss through transistor, .33 volt loss on +5 rail is due to voltage drop of MBR160 schottky protection diode. Tube is a little under driven according to specs. I'm not criticizing, just showing the readings I made of available power compared to transistor operation, which is very good. I can't say this will improve everyone's display. It's made a marked difference in mine. Bright, full, even digits throughout, and battery backup is now money, Just by using the transistor.
Display operation has been discussed via the forums in detail, I wanted to offer the above as something that may be over looked.
Some have either jumpered or changed the 22 ohm resistor to supply higher current to filaments. Also there has been some debate of alternating current vs direct current to drive the display segments. Often this type of display is driven with alternating current. But true sine wave alternating current is different than a push pull circuit, producing a modified, square sine wave. Can't say the display will notice this difference. John Archie has covered this in his post:

Ice Tube Clock IV-18 To-Spec Hack

and says a small improvement is visible in segment display evenness. If you are having problems or just want to test the MOSFET, a simple jumper test is all that's needed. The clock needs to be working, so remember all the safety from the kit directions when testing a live board. Touch the board by the sides where the power jack is connected. I doubt touching the higher voltage points will be your demise, but when that muscle reflex from the ' ZING ', sends your board sailing across the room...

Take your jumper and carefully connect the two outside pins of the MOSFET, through the jumper. Do not short the middle gate pin, just the two outside pins, drain and source together. If your display gets brighter and evens out, MOSFET is not holding up it's end. Since a transistor uses current to switch, a current limiting resistor is needed. MOSFETS do not need a current limiting resistor.



I've attached photos for the basic construction of the modification. Cut the center, base pin, of the PN2907 transistor to about a 1/4 inch or so. Also cut one lead of the resistor the same way, there's some leeway here for your personal preference. Clamp the parts together with tape and lightly solder together. Cut the remaining resistor lead to match transistor leads. New modified part mounts directly where MOSFET was, rounded contour of transistor matching round contour of board etch. Be careful not to overheat base pad connection during soldering, and unsoldering resistor modification made earlier. You may not experience the exact same result of total segment evenness as I have, there are other variables, including slight differences in tubes, but decent filament current is an absolute. Very pleased with my tube driven by the 2907. By the way, if you want to see the filaments in action, Look at the display in total darkness, especially at low brightness, they should appear, slightly glowing red. Now if I can just figure out this C language, the SUN will really be shining.

Hope this is of help

RUSSELL
IMG_03.JPG
IMG_03.JPG (93.44 KiB) Viewed 11484 times
IMG_04.JPG
IMG_04.JPG (131.34 KiB) Viewed 11484 times
Last edited by russell 27 on Tue Feb 04, 2014 5:44 pm, edited 2 times in total.

User avatar
phild13
 
Posts: 247
Joined: Mon Sep 10, 2012 1:05 pm

Re: 2907 TUBE DRIVER

Post by phild13 »

I take it a stackpole 1K resistor at about 3.3mm long in body (S1KQCT-ND) would be a good fit?
http://www.digikey.com/product-detail/e ... ND/2617685

I don't want to mess up my working main board as I am actually using it; the ZVP2110 I am using is working fine, battery backup works fine, and the tube is lit nice and even. So I have a board I am close to ordering from OSH so I can have a few to play with (it is basically the same layout as the kits, just slightly wider but should still fit fine in the case). It would be easy to stand R3 up, stand the 1k up next to it, and give the transistor a try with my tube and see how it works.

Good PN2907 transistor for those interested.
http://www.digikey.com/product-detail/e ... ND/3504474

User avatar
russell 27
 
Posts: 242
Joined: Thu Sep 12, 2013 3:59 pm

Re: 2907 TUBE DRIVER

Post by russell 27 »

I used a 1/8 watt 1K resistor from radio shack. 2907 cost about 21 cents, there are a variety of great PNP bipolar's that would work great here. What I like about this set up, no board modifications, new part neatly fits in just like original part. The important part is the base resistor, and can be added in any manner. Board aesthetic doesn't have to be perfect, but nice layout is always appealing. Mosfets are nice, but in this situation on many of our boards, the original did not switch properly and fully. I think if the gate voltage of ZVP330A was just a little higher, 5 volts to 9 volts, this problem may not have ever occurred. Glad the P channel you chose did the trick. I have a drawer of PN2907s, and confident would be a good solution. Also working on my own circuit design.

User avatar
phild13
 
Posts: 247
Joined: Mon Sep 10, 2012 1:05 pm

Re: 2907 TUBE DRIVER

Post by phild13 »

I agree the solution you came up with is great, fits like the original part, looks good, and anyone wanting to try the mod can do it with the existing board they have. I tend to sometimes forget that Radio Shack has some common parts. I made the suggestion of parts from DigiKey so if someone wanted to try the mod they could get the right parts and the resistor would fit like yours did as it looks to be about 3mm long in body. Using a 3mm long resistor I think would be a bit easier to attach to the transistor led than a 6-7mm one would, though either length will work. Since I was playing with Eagle anyway I moved things around a bit and have a board where I could put in a transistor/resistor combo if I want, otherwise the board is basically the same as the original board.

User avatar
russell 27
 
Posts: 242
Joined: Thu Sep 12, 2013 3:59 pm

Re: 2907 TUBE DRIVER

Post by russell 27 »

Radio shack is good in a pinch, but sparse now, most things I use Digi key also. Also reworked the the drawing a little to put together my own circuit. Any chance you know anything about programming. I'm not an ace programmer, but assembly language and PICs are what I'm familiar with. Part of my interest in this project was the AVR. There are many programmers here, and for some, programming is the main interest in the project. Much, decent code design shared, but not much on how to, which would be a little difficult. My main question is, do you know how to take the current master firmware, and compile without the GPS. Probably quite easy, maybe this is all handled in the make file, but I could not find a post that covers this. Might be one of those things I have to work out myself.

Thanks

Russell

User avatar
phild13
 
Posts: 247
Joined: Mon Sep 10, 2012 1:05 pm

Re: 2907 TUBE DRIVER

Post by phild13 »

I thought there were two versions of the firmware on the GitHub site, one with GPS code and one without.

At any rate jarchie has been doing a great deal of programming with the clock firmware and would probably be able to help with the major questions. He made a post recently that should get you started whith what you need to know and the reference you will need. Learning some version of C will probably help even though that is not your goal.
http://www.adafruit.com/forums/viewtopi ... 75#p193933

He can also probably tell you how to remove stuff you don't want.

I still shop Radio Shack, and I remember when Radio Shack was staffed by Ham Radio enthusiasts, electronics buffs, and was a coveted after school/summer job to get for some of the high school Ham Radio/Electronics geeks.
Most of my stuff now comes from DigiKey.

User avatar
jarchie
 
Posts: 615
Joined: Sun Jun 24, 2012 2:16 pm

Re: 2907 TUBE DRIVER

Post by jarchie »

Russell 27 wrote:My main question is, do you know how to take the current master firmware, and compile without the GPS.
In addition to the thread recommended by PhilD13, I'd like to suggest a couple others:

Two posts in another thread (1, 2) describe in detail how to compile and program my xmas-icetube firmware from a Windows computer. I do realize your goal is not to install xmas-icetube, but compiling xmas-icetube is much easier than compiling the official Adafruit firmware. So I strongly recommend compiling xmas-icetube as a learning exercise to become familiar with AVR compilation. No reason to install xmas-icetube on your clock, however, unless you're interested in playing with my firmware. (Also in that thread is a post listing my favorite resources for understanding AVR C code.)

The official version of the Adafruit Ice Tube Clock firmware no longer compiles on modern versions of GCC, and you must manually update the C source code as necessary. This is a lot easier if you're confident you have a working build environment, which is why I recommended compiling xmas-icetube first. If you're not all that familiar with C, that's okay. This post does a reasonable job of describing the necessary modifications. Yes, that post is oriented toward alternative firmwares, but the process is identical for modifying and compiling the official Adafruit code.

Good luck and happy hacking!
PhilD13 wrote:I thought there were two versions of the firmware on the GitHub site, one with GPS code and one without.
Unless I'm mistaken, I believe Lady Ada merged the GPS branch into master, so the current version of both branches incorporate GPS support. But the nice thing about revision tracking is that you can still download the pre-GPS version.

User avatar
russell 27
 
Posts: 242
Joined: Thu Sep 12, 2013 3:59 pm

Re: 2907 TUBE DRIVER

Post by russell 27 »

Jarchie Wrote:
Unless I'm mistaken, I believe Lady Ada merged the GPS branch into master, so the current version of both branches incorporate GPS support. But the nice thing about revision tracking is that you can still download the pre-GPS version.
Thanks John, I looked for this on Github, all I could find was the other. It's not that I'm not interested in your Xmas Ice Tube firmware, Just have the Atmega 168 right now. Next order I'll get some 328's and give yours a shot. I wanted to start with some of what I considered, the more simple stuff. I don't know what version of the GRC I have but it will compile the ADAFRUIT master firmware with the GPS included, Just slightly bigger file than hex included. As I understand it, the GPS is merged into the other Master file, playing around with the bare bones is where I wanted to start. Thanks for the input. Eventually I wouldn't mind trying driving the tube with pure AC, See if I notice any real improvements, I read in one of the posts that DC was bad for the tube. I'd like to know the reason for that one. I realize these types of tubes are generally driven by AC, but it was also mentioned these tubes were intended for calculators. DC, likely would have been implemented then.
Last edited by russell 27 on Fri Sep 27, 2013 8:04 am, edited 1 time in total.

User avatar
russell 27
 
Posts: 242
Joined: Thu Sep 12, 2013 3:59 pm

Re: 2907 TUBE DRIVER

Post by russell 27 »

PhilD13
I still shop Radio Shack, and I remember when Radio Shack was staffed by Ham Radio enthusiasts, electronics buffs, and was a coveted after school/summer job to get for some of the high school Ham Radio/Electronics geeks.
Most of my stuff now comes from DigiKey.
We must be about the same age, I remember testing tubes there when I was a boy. Good old days for parts are long gone.

User avatar
jarchie
 
Posts: 615
Joined: Sun Jun 24, 2012 2:16 pm

Re: 2907 TUBE DRIVER

Post by jarchie »

Russell 27 wrote:Thanks John, I looked for this on Github, all I could find was the other.
You're welcome! :-)

I was able to find it by clicking on the "commits" link, and then clicking on the "Browse code" link for the "Updated with pmosfet" commit. That lead me to the web address I linked to in the previous post.
Russell 27 wrote:It's not that I'm not interested in your Xmas Ice Tube firmware, Just have the Atmega 168 right now. Next order I'll get some 328's and give yours a shot.
I'm delighted that you're interested in my firmware, but I don't want to push it on you.
Russell 27 wrote:I wanted to start with some of what I considered, the more simple stuff. I don't know what version of the GRC I have but it will compile the ADAFRUIT master firmware with the GPS included, Just slightly bigger file than hex included.
Interesting. Would you provide me with more information so I can help you?

What operating system are you using? What AVR package(s) are you using? (WinAVR?) What ISP programmer will you be using? (The Adafruit USBtinyISP?)
Russell 27 wrote:As I understand it, the GPS is merged into the other Master file, playing around with the bare bones is where I wanted to start. Thanks for the input.
I completely understand. You're welcome for the input, but it seems I haven't been very helpful thus far. :-(

And since the Adafruit code compiles on your computer, I no longer see value in compiling xmas-icetube as a learning exercise.
Russell 27 wrote:Eventually I wouldn't mind trying driving the tube with pure AC, See if I notice any real improvements, I read in one of the posts that DC was bad for the tube. I'd like to know the reason for that one.
I do not believe that DC is bad for the tube, but I do believe that DC is more damaging to the filament than AC. I'll dig up a credible reference and provide an explanation tonight in the Ice Tube Clock IV-18 To-Spec Hack thread.

User avatar
phild13
 
Posts: 247
Joined: Mon Sep 10, 2012 1:05 pm

Re: 2907 TUBE DRIVER

Post by phild13 »

If you look at the vintage (70's - 80's) calculators containing VFD and Nixie displays, some schematics show the filament being driven by DC even when the calculator was powered by AC while others show the filament being powered by 6.3 volts AC from a tapped transformer.

Info on VFD filament drives AC, DC, Square wave
http://www.noritake-elec.com/vfd_operat ... FDFilament

The data above reinforces what has been discussed on the clock forum. Namely, that pure DC causes a brightness difference from one end to another of the tube, that a 50% duty cycle pulse at a frequency around 60hz or higher is fine (though I have seen recommendations of anything over 40 hz as ok and as high as 100khz - 200Khz suggested), using a sine wave AC that is center tapped to prevent a difference in brightness from one side to the other of the tube and ghosting.

It also reinforces that the important point for long life is to drive the filament within specifications and not overdrive it or under drive it to reduce the evaporation of the filament oxide coatings

Here are a couple interesting links
Clock alarm chip with direct drive display - 6.3 vac filament drive shown
http://ferretronix.com/tech/vfd/mm5316_alarm_clock.jpg

Archer (Radio Shack) VFD tubes - 1.5 v ac/dc filament drive
http://ferretronix.com/tech/vfd/archer_ ... tron_2.jpg

User avatar
jarchie
 
Posts: 615
Joined: Sun Jun 24, 2012 2:16 pm

Re: 2907 TUBE DRIVER

Post by jarchie »

Russell 27 wrote:
jarchie wrote:The official version of the Adafruit Ice Tube Clock firmware no longer compiles on modern versions of GCC, and you must manually update the C source code as necessary.
[My compiler] will compile the ADAFRUIT master firmware with the GPS included, Just slightly bigger file than hex included.
Using a Windows machine with WinAVR, I can confirm that the Adafruit code does indeed compile--both before and after Lada Ada committed the GPS mod. Is there any chance you are using WinAVR?

The most recent version of WinAVR seems to be almost four years old! When that version was released, I believe the avr-gcc developers were still in the process of deprecating features used in the Adafruit code which are no longer supported.

Unfortunately, I've posted many times that the Adafruit code will not compile on modern versions of GCC. Although that might technically be true, everything works fine (albeit with warnings) under WinAVR. My only excuse is that I don't really use Windows.

So I apologize to you, Russell 27, and everyone else I've mislead!

EDIT: Also, don't expect the hex files to be identical. Different versions of the compiler will produce different outputs. Usually the culprit is that newer compiler versions do a better job of converting the C code to assembly, where "better" means either a smaller program or an improvement in execution speed. Barring a compiler bug, the hex file you generated will be functionally identical to the provided hex file, despite the size difference.
PhilD13 wrote:If you look at the vintage (70's - 80's) calculators containing VFD and Nixie displays, some schematics show the filament being driven by DC...
Thank you for sharing that!

I've always taken it for granted that these old VFD tubes were designed for a sine-wave-AC filament drive. In another thread, I found that the brightness gradient completely disappears when driving the IV-18 to specifications, but using +5 volts DC on the filament. I also could not find a reference to AC (BANNED ток) in the IV-18 tube specifications, but I am not able to read Russian. :-(

Since designs from that era use both DC and AC on the filament, I wonder if these old tubes might actually be intended for both current types. After all, DC notching is really only a problem with light bulbs and, to a lesser extent, power vacuum tubes. I'm not aware of DC notching ever being an issue with filaments under low current density and low voltage, as in the IV-18.

User avatar
russell 27
 
Posts: 242
Joined: Thu Sep 12, 2013 3:59 pm

Re: 2907 TUBE DRIVER

Post by russell 27 »

Thank you John and Phil.

I apologize for my tardiness here, I don't make it online everyday. I truly appreciate the wealth of discussion and information here!

John, I read your recommended post about compiling. Since I started with PICs, I got into the groove on their how to. I use more of a development board there, in circuit serial programming is also an option, but I usually use the ZIF socket for direct programming. If I'm not mistaken ATMEL developed and released ICSP first, Maybe that's why it's so common with AVRs. Almost seems like development boards for AVRs are not as common as for PICs. Anyway, anything you want to share about programming, compiling, circuits, or C is just fine with me. I use windows XP, and hate the thought of going to windows 8. I use the atinyusb pocket programmer from sparkfun; based on LADYADA's, and WINAVR/ AVRDUDE Version_20100110. Basically because of my greenness, I just used WINAVRs programmers notepad to compile. If there were no errors in my code, everything seemed to compile. Of NOTE: I do not have the Cygwin/perl files installed as you had noted in your post, so consequently when I compile through programmers notepad I get a message in the output box " no perl found", something like that, files do compile nonetheless. There are numerous ways to compile. I wondered if there was an advantage or reason you compiled directly from the command prompt as you had described. Using windows to click on "write" chip, is essentially just a short cut to this happening anyway. I just got used to doing it this way with the PICkit 2 software/ programmer interface. Using the command line is the only way I've programmed the ATmega 168, glad I learned how to do this. Your knowledge of C, programming, and all the software tools and extensions far exceeds mine. There maybe some benefits or advantage using the missing tools I don't have. Your Xmas Ice Tube firmware is a masterpiece of features. At this moment I would be happy to add two small rotating squares, possibly opposing, at the lower part of digits [3] and [6], segment c, d, e, and g; to give the effect of rolling colons. This may not look as good in person as the imagination. I made a few, small, working changes. I'm glad I at least have a rough understanding now of how to program an AVR, compile C, and the basic software tools and hardware to do so. And that's partly due to both of your help, Thanks again.

Phil, Thanks again for the your splendid, laser exact detail, of shared, resourceful information.


Russell

User avatar
jarchie
 
Posts: 615
Joined: Sun Jun 24, 2012 2:16 pm

Re: 2907 TUBE DRIVER

Post by jarchie »

Russell 27 wrote:Almost seems like development boards for AVRs are not as common as for PICs.
I've never used a PIC. A lot of people use the Arduino Uno as an AVR development board, but inserting a ZIF into the IC socket blocks the ISP header. Personally, I like the Barebones AVR development board.
Russell 27 wrote:I just used WINAVRs programmers notepad to compile. If there were no errors in my code, everything seemed to compile. Of NOTE: I do not have the Cygwin/perl files installed as you had noted in your post, so consequently when I compile through programmers notepad I get a message in the output box " no perl found", something like that, files do compile nonetheless.
The Adafruit Makefile uses a Perl script (timedef.pl) to define macros specifying the current hour, minute, and second (TIMEHOUR, TIMEMIN, TIMESEC). The script is invoked through backticks in the compiler options, which means the output of the script will be used as command line arguments to the compiler.

Since you don't have Perl, the script fails to run and generates no output. But compiler is still executed--just without options defining the hour, minute, and second macros. And the code still compiles, because those macros are only used in a commented-out section of iv.c:

Code: Select all

  /*
    // if you're debugging, having the makefile set the right
    // time automatically will be very handy. Otherwise don't use this
  time_h = TIMEHOUR;
  time_m = TIMEMIN;
  time_s = TIMESEC + 10;
  */
Russell 27 wrote:I wondered if there was an advantage or reason you compiled directly from the command prompt as you had described.
The main reason is that I'm familiar with the command line. I'd rather type a command and know exactly what I'm doing than push a button and hope a graphical interface will do what I want. But it boils down to familiarity and personal preference.

On Windows, I've heard that Atmel Studio is an excellent IDE, but I've never tried it myself.
Russell 27 wrote: Using the command line is the only way I've programmed the ATmega 168, glad I learned how to do this.
Seems like everything is working in your hands. Congrats!
Russell 27 wrote:Your Xmas Ice Tube firmware is a masterpiece of features.
Thank you!
Russell 27 wrote:At this moment I would be happy to add two small rotating squares, possibly opposing, at the lower part of digits [3] and [6], segment c, d, e, and g; to give the effect of rolling colons. This may not look as good in person as the imagination.
Sounds nice. I'm open to code contributions. :-)

User avatar
russell 27
 
Posts: 242
Joined: Thu Sep 12, 2013 3:59 pm

Re: 2907 TUBE DRIVER

Post by russell 27 »

Hi John,

I tried to compile something last night and did not work as expected, either I did not have it defined right in the code, or possibly the missing perl script was part of the problem, lots of things to know. Thought I would try adding the perl script as you had suggested in your post, see how that works.
jarchie Wrote:
Sounds nice. I'm open to code contributions.
Not sure what you meant by that. The way I see it, I could just add a loop to DIGIT [3] and [6] to turn on and off the required segments, that rotate. It's probably not that hard, just don't know C good enough yet. If you have any suggestions, please. I wouldn't take credit for anything I did not do. To be honest just going over these things in the forum is a big learning curve, because I can see things from many perspectives.
jarchie Wrote:
I've always taken it for granted that these old VFD tubes were designed for a sine-wave-AC filament drive. In another thread, I found that the brightness gradient completely disappears when driving the IV-18 to specifications, but using +5 volts DC on the filament. I also could not find a reference to AC (BANNED ток) in the IV-18 tube specifications, but I am not able to read Russian.
IV-18_Dieter's tube archive.png
IV-18_Dieter's tube archive.png (35.39 KiB) Viewed 11265 times



You had covered this in your post: ICE TUBE Second digits are DIM

But I offer this perspective, I thought about posting there, but this continues with my original posting here. I don't know if you have ever seen: IV-18_Dieter's tube archive, tube specs. Don't recall where I got that from but I posted the specs from that PDF. It shows filament voltage @ 5V and current @ 75-95 milli amps, 85 Ma nominal. Also shows Anode grid Voltage @ 20-30 volts and expected current. In your test you went to 50 volts, maybe just in trial. Reading the resistance of the filament heater is a little tricky, at rest it reads about 13.5 ohms, but when heated up, resistance gets higher, just like a filament light bulb. Board voltage is a nominal 4.72 volts and current I measured through filament from stock kit circuit is 65 milli amps. Little low according to specs. If we take 4.72 volts divided by 65 milli amps ---->> 4.72/ .065 = 72.62 ohs resistance. 22 ohms resistance comes from the inline 22 ohm resistor, not sure how ADAFRUIT came up with this value. So if we jumper the 22 ohm resistor, that leaves 72.62 - 22 = 50.62 ohms filament resistance. Now 4.72v/ 50.62R = .093, 93 milli amps on filament. But taking into account that the higher current will add a little more resistance, we're probably pretty close to the 85 milli amp nominal current listed for the tube, if we had an actual 5 volts that would vary just slightly. If the extra current added say 5 ohms resistance, that would make 5+ 50.62 = 55.62 ohms; So -->> 4.72v/ 55.62R = .085 -->> 85 milliamps. So taking this into consideration, one could mathematically fine tune the filament heater current. PhilD's attachment about VFD drives gives a very good account of tube magic, I'm sure you had already looked this over.

Hope this is useful

Russell

Locked
Please be positive and constructive with your questions and comments.

Return to “Clock Kits (discontinued)”