Connect with us

transistor base input

Discussion in 'Electronic Basics' started by lerameur, Apr 30, 2008.

Scroll to continue with content
  1. lerameur

    lerameur Guest

    Hi all

    I have an old analog alarm system. I am hooking up the bell output to
    a microcontroller.
    Although the output voltage for the bell fluctuates around 6 to 9
    volts. I need either a steady 0 or 5v for the input of the
    controller.
    I made a circuit with 2 2n222 transistor, acting as an inverting
    gate. The problem is that the spec sheet of these and most transistor
    have a Veb of 5 volt. my Ve is at ground therefor my Veb exceeds
    this. any ideas on how to get pass this issue.
    Thought about a voltage divider at the output of th bell , but I am
    scared that if voltage drops a bit below 6v, the inverter will not
    pick it up as positive voltage.
    thanks
    k
     
  2. lerameur

    lerameur Guest

    ok good thanks for the link. below is my circuit . I have a 7805 that
    regulates the 5v. The ground is common to all. The source is anywhere
    between 6 to 9 volts. The source as mentionned in the circuit is the
    output of the analog alarm system going to the siren. I will hooking
    up the 5v regulator most probably on the batteries (12v) actin g as
    backup and being recharge by the analog circuit.
    Hope that helps you help me.


    VCC 5V
    +
    VCC 5v |
    + |
    | .-.
    | | |
    .-. | |
    | | '-'
    | | | ___
    '-' -------|___|-- to
    microcontroller
    | |
    | ___ |/
    |----|___|--|
    | |>
    ___ |/ |
    Source--|___|- --------| |
    |> |
    |
    | GND
    |
    GND
     
  3. lerameur

    lerameur Guest

    Well section 13.9 of the pic16F88 datasheet is copied below:
    From what I can read, if I supply 5v to the chip, my input to the
    microcontroller has to be between 4.4v and 5.6v.
    So the circuit is there to have a steady output of 5v into the
    microcontroller for any voltage between 6 to 9 v off alarm system
    (source)

    A simplified circuit for an analog input is shown in
    Figure 13-4. Since the analog pins are connected to a
    digital output, they have reverse biased diodes to VDD
    and VSS. The analog input, therefore, must be between
    VSS and VDD. If the input voltage deviates from this
    range by more than 0.6V in either direction, one of the
    diodes is forward biased and a latch-up condition may
    occur. A maximum source impedance of 10 k? is rec-
    ommended for the analog sources. Any external com-
    ponent connected to an analog input pin, such as a
    capacitor or a Zener diode, should have very little
    leakage current.
     
  4. lerameur

    lerameur Guest

    Because the input is from the analog alarm system, which varies
    between 6 to 9 volts. I cannot use that as an input.

    Just high or low, alarm on or off...

    k
     
  5. lerameur

    lerameur Guest

    no

    just as 5 volt.

    When the voltage from my source is between 6v and 9 volts, my chip
    reads high (or 5v)
    otherwise the chip reads low or zero.
    like I said, the source is the voltage going to the siren, so it is
    almost always ZERO.
    When siren goes off, the voltage jumps anywhere between 6 to 9 volts.
    Then the chip should read high

    ken
     
  6. Randy Day

    Randy Day Guest

    lerameur wrote:

    [snip]
    Just use your micro as a digital input; no analog required.

    6-9vdc in --10K-----+------ micro
    |
    /\ 5v zener diode
    |
    Gnd

    HTH
     
  7. lerameur

    lerameur Guest


    I think we have it now, thats sounds pretty good. Sorry for the bad
    explanation, I thought I had it good enough.

    k
     
  8. lerameur

    lerameur Guest


    I think we have it now, thats sounds pretty good. Sorry for the bad
    explanation, I thought I had it good enough.

    k
     
  9. Randy Day

    Randy Day Guest

    Good point.
     
  10. gearhead

    gearhead Guest

    You should rethink the 10k resistor.
    You chose to make your input signal the max specified impedance for
    the chip -- without even allowing for the additional impedance of the
    source signal, or just plain old wiggle room; which you can easily
    afford. You should also consider zener current. A smaller resistor
    is in order, maybe by an order of magnitude.
     
  11. gearhead

    gearhead Guest

    Well, it's a bell output from an alarm. I guess I was operating on
    the assumption that it has the power to drive a physical bell, so it
    will hardly be able to tell the difference between 200uA or 2mA;
    either way you'd draw magnitudes less than the alarm's potential
    output, so it hardly matters.
    But if he feeds a maximum specified impedance to the micro input, he
    risks having the circuit not work.
    But the OP knows more about his alarm than I do. Let him work it out.
     
  12. neon

    neon

    1,325
    0
    Oct 21, 2006
    all transistors as you mention it have a ~5v meaning that is the reverse voltage breakdown of 5 v. does a voltage of 20 v destroy it of couuse not. a 100v destroy it of course not. the only way to destroy it is if the power dissipation is exceeded. 100v and 1mega in series will not destroy it NO ENOUGH POWER. if you add a cap in series with the base all the source DC will disapear and why don't you use a comparitor to begin with.
     
  13. lerameur

    lerameur Guest

    The output is DC, depends on the batteries voltage. But it is usually
    6.4v.
    Well I tried the circuit with the zener diode. I get 5v at the output.
    But as soon as I place the microcontroller input pin, that voltage
    just sink to 1.4v and the controller do not read it. If I put the
    input pin directly on the output of the 7805 regulator (5v) then it
    reads it as 5v. I used a 150ohm resistor afterwards, that did not
    work. why is that ?
     
  14. Randy Day

    Randy Day Guest

    As an experiment:
    put the 10k resistor back in, and connect the
    input end to the +5 supply for the micro.

    Measure the voltage with and without the zener
    in the circuit.

    If the voltage stays at 1.4v, you've probably
    got:

    a) your input pin is actually programmed as an output pin
    b) your input pin is actually programmed as something other
    than a digital input (analog, clock in, etc).
    c) a fried input to your micro.

    A working digital input is said to be 'tied high'
    with a 10k resistor; the voltage should be near +5.
    If your voltage is 1.4 without the zener, the problem
    is in the micro.

    Can you hook a 10k to another input pin on the
    device to compare?
     
  15. lerameur

    lerameur Guest

    crap, my pin was set to output...
    thanks
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-