Transistor Switch giving funny readings

Discussion in 'The Projects Forum' started by Mashly, Jun 5, 2014.

  1. Mashly

    Thread Starter Member

    Apr 4, 2014
    33
    1
    Hi Guys,

    Probably going to be really silly question here.

    I am trying to make a transistor switch with a voltage divider to get a output prportionally lower than the input when the base is pulsed.

    I am using trying to get no more than 5V when using a 12V source (testing the voltage of a battery using an arduino).

    I have chosen R1 as 1K, R2 as 2K and Rb as 4K. It seems to work when I turn the base on (I get around 5V output at 15V input). But when I turn the base off and measure the voltage across the capacitor I am still seeing the 15V input? Why could this be?

    Thanks for any help in advance.

    Mash

    Edit: with a BC108 transistor.
     
  2. djsfantasi

    AAC Fanatic!

    Apr 11, 2010
    2,812
    834
    Do you have a schematic?
     
  3. Mashly

    Thread Starter Member

    Apr 4, 2014
    33
    1
    Don't worry I think I have solved it.

    The volt meter is measuring voltage drop, so when the no voltage on the base, the drop between the collector and ground is 15V.

    Does this sound correct?
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    If your circuit is intended to work as I'm guessing, then I think you'll need a 2-transistor solution; something like this.

    Edit:
    If transistor leakage current is significant then a respective ~33k resistor between base and emitter of each transistor could be added.
     
  5. Mashly

    Thread Starter Member

    Apr 4, 2014
    33
    1
    Sorry if I am being a bit stupid, but could you elaborate on the need for the two transistor circuit?

    I am looking to get the voltage of a battery with an Arduino so I can send it using a radio module I have. I will pulse the transistor every minute (or when needed) to get the voltage then send it via the radio link.
     
  6. AnalogKid

    Distinguished Member

    Aug 1, 2013
    4,545
    1,252
    Alec's schematic looks like what you described. If it isn't, please post your own schematic.

    ak
     
  7. Mashly

    Thread Starter Member

    Apr 4, 2014
    33
    1
    Hi, this is the way I was thinking of doing it, with just the one transistor. It is not properly set up yet as I am still trying to learn spice, but you should get the idea.
     
  8. Papabravo

    Expert

    Feb 24, 2006
    10,152
    1,794
    In your circuit the Vout will be at 12V when the transistor is off. Ohms law requires the voltage drop across a resistor to be 0 when there is no current flowing. It this what you intended? 12V on a digital input would be ahhh...bad bad thing.
     
  9. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    .... which is why one transistor is needed as a level-shifter.
     
  10. Mashly

    Thread Starter Member

    Apr 4, 2014
    33
    1
    I think I see what is happening now. The NPN is shorting the base to ground when pulsed which turns the PNP on. There is no voltage present over the voltage divider now when the PNP is turned off.
     
  11. Mashly

    Thread Starter Member

    Apr 4, 2014
    33
    1
    Thanks got it working, Your value of 100K was a bit high for the Transistor I was using but replaced it with a 4K and it works fine.

    Can anyone tell me if this will be temperature stable or if I can do anything to help with this?

    Thanks again.

    Mash
     
  12. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    The c of Q1 need to pull high, otherwise, when the input(Vpulse) is low, then the c of Q1 will be floating, it maybe has a chance to causing the c of Q2 oscillating.
     
  13. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    5,804
    1,105
    Simulation shows it's stable over a -50C to +50C range.
     
  14. ScottWang

    Moderator

    Aug 23, 2012
    4,855
    767
    You can use it normally until when the oscillation happening and then to take care of it.
     
Loading...