Need help with basic transistor switch

Discussion in 'The Projects Forum' started by RobbJohnson, Jan 24, 2012.

  1. RobbJohnson

    Thread Starter Active Member

    Dec 15, 2009
    76
    0
    On the test point I am looking for 0 to 10v signal. The part of the circuit that is indicated by S1 actually is come comparaters and nor gates witch result in Either gnd or +15v or gnd. The Charging circuit is actually a constant current cuicuit feeding C1 via R10.

    My problem is the signal nevver reaches 0 volts (as shoun on the trace. I can compensate in the comparator for this), but I really want 0 volts. Changing the 1k (R3), but that changes the decay rate and the current.

    Does anyone have any sugestions?
     
  2. wayneh

    Expert

    Sep 9, 2010
    12,126
    3,048
    I think you could add a pulldown resistor, maybe 5K or so, to help pull it down a bit more. Testing is needed.

    If you manually pull S1 to ground, do you get the result you want? What voltage do you see at S1 when it's only pulled low by the comparator? I'm a little surprised that's not low enough.
     
  3. RobbJohnson

    Thread Starter Active Member

    Dec 15, 2009
    76
    0
    I need the Cap to discharge to 0V via the Transistor when told. Once the comparator sees 0v (not 0.0001 or above) it will turn off the transistor allowing the Cap to charge.
     
    Last edited: Jan 24, 2012
  4. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    The way I have solved this problem in the past is to turn off the current source with the same signal that turns on the switch. A small MOSFET in place of the NPN will also be an improvement.
     
  5. RobbJohnson

    Thread Starter Active Member

    Dec 15, 2009
    76
    0
    Ok, Would this make it easier, using the op amp can we offset this down to zero. may be even amp it up by 2 volts and then lower the bottom to zero?
     
  6. RobbJohnson

    Thread Starter Active Member

    Dec 15, 2009
    76
    0
    Ron,
    Turning off the source will not discharge to capacitor. may be a combination of both, but i wounder what will happen when the collector voltage becomes so low that the transistor turns off. I'll play with that. thanks.
     
  7. panic mode

    Senior Member

    Oct 10, 2011
    1,320
    304
    not quite sure what you are after but you do have dual supply so you can connect emitter to -15V instead to ground. then you can get not just zero but also negative output if you so desire.
     
  8. RobbJohnson

    Thread Starter Active Member

    Dec 15, 2009
    76
    0
    Panic mode,
    First thing I tried, but conecting the emitter to -15V stops you fron turning off the transistor and allowing the circuit to recharge.
    Something else I need to Do?
    Don't forget my switching voltage (on the other side of the base resistor) is 0 and +15

    I am probely just missing something.
     
  9. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    I thought you said you had a constant current source. All I see is a resistor charging a cap, a transistor discharging the cap through another resistor, and a voltage follower. It is important to post your actual schematic, not a simplified version of it.
    What I meant was, turn off the current source (if you have one) at the same time you turn on the transistor discharge switch.
     
  10. RobbJohnson

    Thread Starter Active Member

    Dec 15, 2009
    76
    0
    Ron and all.
    Here Part one of the Circuit so far. R46 and R47 ofset the comparator so it detects a voltage above zero (to make the circuit work). But as i explained before I really wanted to be Zero, Grounding U3 pin 3 would be better.

    This circuit does work, just trying to tweek it to a point I would like it to be.
     
  11. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    I assume Q1 is your constant current source. This is not a solution to your problem but isn't the emitter - collector of Q1 wired back wards?

    BTW, the suspense is killing me.. Are you building some sort of scope sweep?
     
  12. PaulEE

    Member

    Dec 23, 2011
    423
    32
    Without knowing much about your circuit in particular, I've found that transistors work far better at switching things on and off when they are the bottom element and the top is either an active load or resistor. In this way, a worst-case base current estimate based on a crappy beta value (like 10 or 20 for the 2n2222) can be injected and the transistor will saturate and shunt your output signal to ground more effectively than if the resistor were on the bottom. If you can't work with that circuit because it inverts the signal, simply add a second stage; same style as the first. My 2¢.
     
  13. RobbJohnson

    Thread Starter Active Member

    Dec 15, 2009
    76
    0
    This is Crazy, the circuit is working with the transistor the way we think it should be, But the simulator only will work with it in as the schetmatic says. The simulator schetmatic was drawn in error and since it worked i didn't catch it.
    Now i have to figure out whats going on there. (Mulisim 11)

    Yes, I have a 2 channel bit scope and was playing around with sweeping audio circuits.

    Mainily, jsut love the chalange of elcetronics.
     
  14. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    Swap the emitter and collector on the PNP. The reverse beta is high enough for the transistor to work as a current source, but it is far from optimum.
    The attached circuit has a transistor added, to turn off the current source during the ramp discharge time. In simulation, the ramp reset voltage was about 6mV. It will probably be different from that, how much depends on how well the 2N3904 model matches reality.
     
  15. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    This approach is what Ron mentioned earlier.
    http://forum.allaboutcircuits.com/showpost.php?p=448425&postcount=4

    I spiced this using a PNP but you will have to lower the V+ voltage to the current source and compromise with the values of R5 & R6 for it to work. On the up side PNP's are much easier to find. The other one is switched with a PFET.

    Note that I made no attempt to choose the best P Chan FET for this. If you decide to go this rout someone should be able to tell you the best FET for this application.

    Chris
     
  16. Ron H

    AAC Fanatic!

    Apr 14, 2005
    7,050
    657
    When the current source is turned off, the cap discharges through the NPN as before, but there is an additional path through R1 and the PNP's collector-base junction. This might not be an issue.
    At this low frequency, this technique might be OK, but at high frequency (low values of C1), Having the entire current source transistor moving from basically zero volts to near Vcc will probably be a problem.
    Of course, my circuit has high speed problems too, due to transistor storage times, but I have used similar concepts at relatively high speeds.
     
  17. SgtWookie

    Expert

    Jul 17, 2007
    22,182
    1,728
    Are you really using 100 Ohms for R5? That would be asking the LM311 to sink 150mA current when it's only designed for 50mA max! :eek:

    BTW, nice to "see" you again, Robb - how's the tank coming? :)
     
  18. RobbJohnson

    Thread Starter Active Member

    Dec 15, 2009
    76
    0
    cdrive and others,
    This is what i was looking for. while not at 0v it's close and i can live with the voltage divider on the comparitor.
    Thanks again for all the help
    Robb
     
  19. RobbJohnson

    Thread Starter Active Member

    Dec 15, 2009
    76
    0
    No, 100k, amazing how many errors crop up when you play with a circuit.

    Tank is still on the bench, Got two sets of worm and gear made so it dosent free wheel. Modifing the track and will be ready for another road test. Hoping not to have to go to larger motors. Your circuit sugestions are still working.
    Robb
     
  20. CDRIVE

    Senior Member

    Jul 1, 2008
    2,223
    99
    Ron, I like your approach much better than mine. As Paul stated,.. it's usually easier to low side switch than hi side. ;)

    Regarding the speed issue at high rep rates you mentioned: I guess it could be sped up with a small cap across the 100K base resistor.

    Chris
     
Loading...