Timer circuit: Switching transistor on Low state?

Discussion in 'The Projects Forum' started by mjelic, Mar 11, 2008.

  1. mjelic

    Thread Starter Member

    Mar 11, 2008
    21
    0
    Hi folks,

    First up, I'm sure there is a really simple answer to this, and back in my younger years I'm sure I'd think this question is a newbie one, at best. :) But at 40, and not having kept up my tinkering, I have lost most of the knowledge I once possessed, so I turn to you all for help, and I'm thankful forums like this exist. :)

    OK, to the circuit: I purchased a "Flexitimer Kit" from Jaycar which I have put together and it works wonderfully as they designed it. It uses a 555 oscillator, going to a 4020 ripple (binary) counter. When the circuit is powered up, the 555 starts cycling, pulsing the 4020, and when the selected (with a jumper) pin on the 4020 eventually goes high (12v or so), it triggers (through a 39k resistor) a BC338 transistor which activates a relay. When the transistor goes high, it stops the 555 from counting any further by pulling pin 4 high as well. All perfect as they designed it. (Although I also added a reset switch to pin 11 of the 4020 to start the cycle again, rather than just working on power up.)

    Now, the problem: The problem is that I need it to be a countDOWN timer. Meaning, what I want to happen is the relay is to switch ON during the counting up period, and once it gets to the selected time, the relay should go off. So what I figure is that I need the transistor to be switched on when the selected output pin on the 4020 is low (zero volts) and switched OFF when the 4020 goes high.

    In other words, I want (I think) the transistor to work in reverse, but do you think I can think of any way to make it do that? :( Is there any such thing? Do I need a "not" gate in front of the transistor, and if so, can I make one using only a couple of components? (I don't want to add another IC to make this work.)

    I hope I have been clear enough in my description of the circuit. I know it must be hard to envisage these things without a circuit diagram in front of you, but I can scan it in for people to see if needed. But in summary, all I really need is a better understanding of transistors. ;-)

    Thanks in advance for all your help. :)

    Mark
     
  2. Colin Mac

    Member

    Mar 11, 2008
    18
    0
  3. hgmjr

    Moderator

    Jan 28, 2005
    9,030
    214
    There are a couple of things you can do with minimal effort.

    a.) If the relay has both a normally closed set of contacts and a normally open set of contacts you can wire the load you are switching to the set of contacts that are normally closed.

    b.) Alternatively, you could get a second relay that has the normally closed contacts and activate the added relay with the closure from the relay on the flexitimer board.

    hgmjr
     
  4. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    I dont know how your circuit is but maybe you can use a pnp transistor than a npn.
    Also you can make a simple not gate by using a transistor and and two resistors
     
  5. mjelic

    Thread Starter Member

    Mar 11, 2008
    21
    0
    Agreed, and that is the easy option, but the relay would then stay energised for long periods for no good reason, and only power down when the timer is running.

    Thanks for the reply. I'm really impressed with how active this forum is and very helpful, too. :)

    Mark
     
  6. mjelic

    Thread Starter Member

    Mar 11, 2008
    21
    0
    Yes, that is what I am thinking, after doing a bit of reading on the UK Electronics Club site linked above by Colin. :)

    Attached is the schematic of the circuit. It seems like a pretty simple one. The only thing I can think of, if I go the route of changing the tranny to a PNP, that I still need to connect the 555 reset (pin 4) to the output to stop the timer. That being the case, do I just tie it to the base of the PNP tranny, or do I connect it to the Emitter side?

    (BTW, and now that I've done some reading around on various sites, I realise I probably could have made a very simple circuit for my needs using just the 555 timer, as I simply need the relay to stay on for a bout 10 minutes. :))

    And again, thanks for all the replies. Love it! :)

    Mark
     
  7. mjelic

    Thread Starter Member

    Mar 11, 2008
    21
    0
    Thanks Colin! That pages is actually a great resource, and yes the last circuit does indeed do the trick. But I see above it, in the section called:
    Choosing a suitable PNP transistor

    That if I changed the transistor that is in the kit now (BC338 - an NPN) to a PNP tranny, and moved the load to be "on the other side" (I think the term is a sinking load?) then it should work, and probably use (waste?) less current than if I use the inverter method, yes?

    (Sorry for the delay in replying... Been reading that site up a lot. Awesome resource!)

    Mark
     
  8. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Connections for the pnp: emitter to the relay, collector to ground and base to output of 4020
    if you put the pnp you dont need R4, you can remove it but for safety reasons leave it but change it from 39K to 1K.
     
  9. mjelic

    Thread Starter Member

    Mar 11, 2008
    21
    0
    Excellent, thank! :)

    And what about the reset for the 555? To the B, C or E of the PNP?

    Mark
     
  10. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    whats this switch connected to the reset ? and the 555 pulses when the reset is high not low
     
  11. mjelic

    Thread Starter Member

    Mar 11, 2008
    21
    0
    The switch is just a little jumper on the board that lets you tie the 555 reset (pin 4) either high, so it just keeps oscillating (and thus makes the timer and interval timer), or it ties it to the output of the 4020 (on the other side of the NPN tranny) to stop the 555 from cycling once it reaches the count you have selected with another jumper. This makes it a one shot timer, which is what I need.

    So, I need the 555 to stop cycling when the input on the new PNP tranny goes high, so by rights, I should be able to just connect it to the base?

    (I don't understand why they didn't hard wire it like that in the first place, rather than wiring it in after the tranny???)

    Mark
     
  12. mjelic

    Thread Starter Member

    Mar 11, 2008
    21
    0
    Actually, I don't have that right, after thinking about it...

    It needs to stay high UNTIL the 4020 gets to the selected count pin (which goes high). With the new PNP transistor in place, the Base will be low when the counter is still not at the end of the count. This allows power to go through the PNP energizing the relay and at the same time, should tie the 555 pin 4 high to enable it to continue cycling.

    So, if I am not mistaken, pin 4 of the 555 needs to be connected to the Emitter of the new PNP tranny, before the relay coil is connected to the Emitter of the PNP, right?

    Mark
     
  13. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    So, if I am not mistaken, pin 4 of the 555 needs to be connected to the Emitter of the new PNP tranny, before the relay coil is connected to the Emitter of the PNP, right?

    Mark[/QUOTE]

    No it wont work, forget the pnp !! use a npn, lets say BC108

    disconnect R4 from Q14, then connect the collector of the bc108 to R4 and take a 1K resistor and connect between the collector of bc108 and V+. Then connect the emitter of the bc108 to ground , then connect a 10K resistor to the base of bc108 and then connect the other end of the 10K resistor to Q14. Leave the rest of the circuit as it is.
     
  14. mjelic

    Thread Starter Member

    Mar 11, 2008
    21
    0
    Man, you caught me just in time... I had already started to desolder some of the components off the board!

    Can I ask why it wont work? Is that because of the need to set the 555 low to stop the counting?

    Hmm, not sure I have one of those at hand... Any reason why I can't use the one that came with the kit, the BC338?

    Is the above describing the NOT gate option? To clarify, you suggest:
    1) Changing tranny from BC338 to BC108.
    2) Are we are changing R4 to be 10K (from 38K) or are you still using R4 (38K) connecting the base to the collector?
    3) We connect a 1K resistor from the collector to V+... (But where does the relay go?)

    Is that all right? Sorry for the myriad of questions: Wish I remembered more of this theory. :(

    Thanks,
    Mark
     
  15. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    No you didnt understand or my explanation is bad!

    check the attachment

    you can another npn transistor than bc108 if you want but you need to calculate R2 on the attachment again
     
  16. mjelic

    Thread Starter Member

    Mar 11, 2008
    21
    0
    Ahhhhh... :)

    OK, I'll have a good search through all my available NPN trannies and get back to you with what I have, since I have no idea how to calculate the required resistor. ;-)

    Thanks for all your help. Above and beyond the call! :)

    Mark
     
  17. mjelic

    Thread Starter Member

    Mar 11, 2008
    21
    0
    In that circuit, when Q14 is high (which is most of the time) then the BC108 is switched on, and thus current will be flowing through the easiest path, that being the 1K resistor, right? Does that mean that resistor should be a larger wattage than your normal 1/4 watt ones?

    Also, I assume this can no longer really work off batteries because of the constant leakage through the 1K, or is that negligible?

    You didn't explain why using a PNP tranny would not work. It seems like the more efficient way to do it.

    Mark
     
  18. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Ok to lets modify it a little as to draw less current when the BC108 is on. According to my schematic, replace R4 with a diode (IN1004 is ok) with its anode connected to the collector of BC108 and its cathode to the base of bc338. And replace R3 (the 1K resistor) with a 35K resistor. The rest is the same. 1/4 watts resistors are ok

    Now the pnp wouldnt work because you want the reset on the 555 to go low when the output Q14 goes high. This is not possible because when Q14 goes high then the reset will go high too, unwanted, and what is more when Q14 would be low the transistor would be on and so the reset would be low. So the timer wouldnt start counting
     
  19. mik3

    Senior Member

    Feb 4, 2008
    4,846
    63
    Did it work?
     
  20. Søren

    Senior Member

    Sep 2, 2006
    472
    28
    This will:
    [​IMG]
     
Loading...