From: reynhout@cs.uri.edu (Andrew Reynhout)
Subject: Simple transistor project (Q)
Organization: University of Rhode Island, Computer Science Dept.
Date: Thu, 13 Aug 1992 06:24:18 GMT


(the first post contained an error in the schematic.  I hope the cancel
catches it before it propagates too far...)

Hello.  I've been having some problems with a circuit, and I'm wondering if
someone out there can help me...

   Basically, I need to take a 5v low-current logic signal, and on the 
transition from low to high, cause a relay to close for about half a second.
This is my attempt (forgive the ASCII graphics...)


                   +----------------------------------+
                   |        1/6 7404                  |
                   |     |\ INVERTER                  |
  logic in >--+----+-----| O-----+                    |
              |          |/      |                    |
             R1                  | B   Q1             | B   Q2
            3.3k               ----- 2N2222         ----- 2N2222
              |                 / \                  / \
             GND             C /   \ E   +        C /   \ E        +
                    +5v >-----+    ->----|>|---+---+    ->--+----|<|-------+
                                         D1    |            |    D2        |
                                       1N4148  |            |  1N4148      |
                                              --- C1        |              |
                                              --- ~10uF     |   relay      |
                                               |            +---coil-------+
                                               |             (5v / 80mA)   |
                                              GND                          |
                                                                          GND

   I hope that's reasonably clear...My theory follows:
   R1 is to make sure that a logic low is really 0v. (Important to make
sure that Q2 doesn't conduct until I want it to.)
   When the logic input is low, the inverter output is high, causing Q1 to
conduct.  ~5v should be available at the emitter.  It charges C1 through
D1, but doesn't go through Q2, since the base voltage on Q2 should be zero.
C1 charges quickly, and after that point, very little current flows thru Q1.
   Then, when the logic goes high, it turns OFF Q1, and turns ON Q2, and
C1 discharges quickly through Q2, and then through the relay.  Since
Q1 is off, there is no other current available after C1 discharges, and
the relay should return to its normal state.
   When the logic input goes low again, the process repeats.
   
   I am aware of a possible problem involving a one-diode drop in voltage by
the time the relay sees anything, but what else is wrong with this circuit??
It is distinctly possible that I've overlooked something simple, or even
used the wrong approach to begin with.
   Currently (no pun intended, :) the emitter of Q2 seems to follow logic,
although at a greater current capacity...but it goes high and stays
high...this is not particularly useful.

   If anyone can help me out or point me in the right direction, I would be
greatly appreciative.  This started out as a seemingly simple project, but
has turned confusing...

   Many thanks,
   Andrew
-- 
   Andrew <reynhout@cs.uri.edu>    "If you remind me of my dog,
                                    we'll probably get along"  -jane siberry