NPN to Convert Sin to digital wave

Discussion in 'General Electronics Chat' started by Neyolight, Feb 27, 2012.

  1. Neyolight

    Thread Starter Member

    Dec 13, 2011
    54
    3
    Hi all

    I want to use npn (BF199) to convert the sin wave from my oscillator to a digital wave ( of 2V PK-Pk).

    At the moment I am getting something close to digital wave but with 1.6 V P-P.

    The base of the npn has a sin wave at 124 KHz with 800mV p-p. The collector is connected to a voltage divider. The emitter goes to ground.

    Any ideas as to how I can make my wave look square and increase the Vp-p .

    Thanks
     
  2. #12

    Expert

    Nov 30, 2010
    16,316
    6,818
    A Schmidt trigger comes to mind. You can buy them in a chip or build them with transistors.

    There may be reasons why this is impractical but you didn't include any of those reasons in your question.
     
  3. Neyolight

    Thread Starter Member

    Dec 13, 2011
    54
    3
    Is there a way I can fix my design ?
     
  4. #12

    Expert

    Nov 30, 2010
    16,316
    6,818
    There are a dozen ways, but you aren't saying anything like how many transistors are available, what your DC voltage is, if you have a capacitor to AC couple the almost kind of sine looking wave, if you have pnp transistors, how important the rise time is, whether you can get or use IC's, etc.

    Give me some clues!
     
  5. MrChips

    Moderator

    Oct 2, 2009
    12,447
    3,363
    Why do you need R1 and R3 in that circuit?
     
  6. Neyolight

    Thread Starter Member

    Dec 13, 2011
    54
    3
    Here are my circuit characteristics:
    1) Using 9V DC Power supply
    2) Built a colpitts oscillator that oscillate at 124 KHz ( Very low Peak-peak though, about 500mV)

    3) This signal ( sine wave at 124KHz at 500mV p-p) is connected to the base of the transistor

    4) The transistor Im using is NPN (BF1999)

    5) In the end, all I want is that sine wave to turn digital with 2-3V P-P so that I can use a PIC to read the frequency
     
  7. Neyolight

    Thread Starter Member

    Dec 13, 2011
    54
    3
    Would it work without them? R1 connects emitter down to ground and R3 and R2 maintains collector volatge
     
  8. MrChips

    Moderator

    Oct 2, 2009
    12,447
    3,363
    Omit R3 and replace R1 with a short to GND.

    Show us the circuit of the colpitts oscillator.
     
  9. BillB3857

    Senior Member

    Feb 28, 2009
    2,400
    348
    If you disconnect the transistor from the voltage divider, what voltage would you expect at your "output" junction with 9V at the top. Check the values of the voltage divider resistors.
     
  10. Neyolight

    Thread Starter Member

    Dec 13, 2011
    54
    3
    To be honest Im not sure what voltage to expect. The sine wave that Im feeding the base of the transistor is at very low volatge - about 800mV.

    The positive part of the sine wave turns the transistor on and the negative part turns the transistor off. This phenomena should give me a nice proper digital wave.
     
  11. Neyolight

    Thread Starter Member

    Dec 13, 2011
    54
    3
    I just tried this, It gives me this ( please see the attached pic). The Peak to peak volatge is 8.5 V ( total supply volatge) .

    Is there a way I can modulate the Vout to 3V ? I cant feed the PIC 8V.
     
  12. MrChips

    Moderator

    Oct 2, 2009
    12,447
    3,363
    Put the top of R2 to the VDD of the PIC instead of 9V.
     
    Neyolight likes this.
  13. Neyolight

    Thread Starter Member

    Dec 13, 2011
    54
    3
    Thanks will try that :)
     
  14. Neyolight

    Thread Starter Member

    Dec 13, 2011
    54
    3
    One last question, can the signal be more even ? Can I get a perfect TTL with same ON and off time. Currently the output signal looks like this :
     
  15. Neyolight

    Thread Starter Member

    Dec 13, 2011
    54
    3
    Heres the current output
     
  16. Neyolight

    Thread Starter Member

    Dec 13, 2011
    54
    3
    .................
     
  17. MrChips

    Moderator

    Oct 2, 2009
    12,447
    3,363
    It would be difficult to get exactly 50% duty cycle. If you are feeding this into the input of a PIC then it should not really matter.

    You can try increasing the value of the pullup resistor.
     
Loading...