1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Electronics Interfacing TTL Clock to 12v 4017

Discussion in 'Modding' started by bigal, 25 May 2008.

  1. bigal

    bigal Fetch n Execute

    Joined:
    8 Oct 2004
    Posts:
    609
    Likes Received:
    0
    Hi people,

    I am trying to connect a 9x 7 segement VFD display (from a pole display / cash register) to a PIC uC, using a 4017 decade counter for the segement (grid) selector, since the grids have to be +12v to be active (0.5ma current draw) and transistors for the segements. I was hoping to use the 4017 directly, running at 12v levels. This works fine, if i clock the 4017 with 12v. However the 4017 needs to be clocked (and reset) by the PIC which gives out 5v signals which dont quite do the job (as in, they sometimes do it). Also switching the segements 12v, am I correct in thinking I can do this with a transistor easily? Collector to 12v, emitter to segement and base to PIC pin?

    Generally what I am asking is, how do I make a PICs outputs reliably switch 12v at multiplexing speeds?

    many thanks in advance,
    Alex
     
  2. jakenbake

    jakenbake full duplex

    Joined:
    5 Jun 2005
    Posts:
    495
    Likes Received:
    3
    yep, using a typical 2N2222A NPN transistor. connect the PIC output the the base thru a 10k resistor. connect the collector to +12, and connect the emitter to the clock input. you'll want a pull down resistor going from emitter to ground as well.

    heres a picture:
    http://hyperphysics.phy-astr.gsu.edu/Hbase/electronic/transwitch.html#c5

    Rb=10k, Rc=1k, Load = clock input, the switch = pic output.

    if you have multiple outputs, they make ICs that have 4 NPNs built in. may be a better solution as it uses less space.
     
  3. bigal

    bigal Fetch n Execute

    Joined:
    8 Oct 2004
    Posts:
    609
    Likes Received:
    0
    your a star, I tried a similar thing but not with a 2n2222, but i have a stash of those....
    I am going to use a similar thing to achieve the 8 segement select channels, straight from PIC to VFD (via an NPN transistor)...

    love your sig btw....
     
  4. bigal

    bigal Fetch n Execute

    Joined:
    8 Oct 2004
    Posts:
    609
    Likes Received:
    0
    hmm, this doesnt actually work...
    I have spent a good while trying to saturate a NPN transistor with 5v through a variety of base resistors, With the collector of the transistor tied to 12v (i cannot switch the ground - VFDs dont have grounds except for the communial filiment). The emitter only swings between 0 and the base voltage.
    I have also tried with a selection of PNP transistors in a similar fashion. They do not conduct with the base held at 12v but do with it at 5v or 0v (thus no use as a PICs 5v swing would allways conduct!)...

    I have settled on trying to use the other half of the MAX232 for this part (clock line pic - 4017), but i still need 8x 5v - 12v level convertion in order to switch the segements on the VFD...

    I am really stuck here...
     
  5. jakenbake

    jakenbake full duplex

    Joined:
    5 Jun 2005
    Posts:
    495
    Likes Received:
    3
    i'll get on my other computer and get you the exact resistor values. in the meantime, do you have a schematic you can post of what you did?

    edit: simulated and got the same results you did. sorry that didn't work out, bad advice. anyway, i got it working, but its inverted with respect to the 5V source:

    [​IMG]

    if you need it un-inverted, you could do it in software or have the 2n2222a drive the base of an pnp (2n2907) to output the 12V. or just use a n-channel FET.
     
    Last edited: 26 May 2008
  6. bigal

    bigal Fetch n Execute

    Joined:
    8 Oct 2004
    Posts:
    609
    Likes Received:
    0
    heh, I did actually think of something similar to that using a voltage divider which the transistor bypasses, it seems NPNs dont like being before the load (eg connected straight to vcc). Just breadboarded that circuit using 2n2369s and it works fine (I had a sack of 2369s and only 3 2n2222s - they are very similar) plus I want to use this for the segement select, I plan to use the other half of the max232 for the clock line to the 4017 as that works a treat now ;)

    on a side note, what simulation software is that, i really should start using some as it makes life alot simpler...
     

Share This Page