Re: Q: Transistor as a switch with pull down ?





John Fields wrote:

Benjamin Sølberg wrote:
Eeyore wrote:
Benjamin Sølberg wrote:
Eeyore wrote:
Benjamin Sølberg wrote:
Hi all.

I am interfacing an PIC microchip to a relay by using a normal NPN
transistor. The relay is connected between +12v and collector. A
protection diode in reverse has also added. Emitter is grounded. My
concerne is that by only adding a 10k resistor between base and the
digital output pin (5v) the base will be floating if the PIC failes to
start as all IO pins are default input. Would it be correct to add a
pulldown resistor at 10k and replace the IO pin to base with say a 1k
resistor.

For what purpose ? The transistor's leakage current won't be enough to turn the
relay on.

You might be right. I just wanna make sure that the transistor doesn't
turn on because it is floating
as the microcontroller is defaulted to an input pin upon startup.

So to be short: Even if the micro controller does nothing else than an
infinit loop after startup and the IO pis is
defined as an input there are no chance of the base of the transistor
can go beyond 0,7v and thereby setting
the collector emitter in an on state, even so that no other resistor
is on the base except the one from base to
the IO pin (defined as an input) ?

I hope you don't mind my exact question. I am just trying to make sure
i understod everything.

If the uC defaults to an input on start up is there an internal pull-up ?

Maybe it's wise to have a resistor from base to ground anyway. Say 4k7.

Graham- Skjul tekst i anførselstegn -

- Vis tekst i anførselstegn -

Exactly my point, but looking at schematics around the net i usually
only see a resistor between base and IO pin.
And i was surprised so i just wanted to know if this is normal/good
pratice.

---
Good practice dictates that you know what your circuit is doing all
the time, and even though it's tempting to think that a floating
base won't affect anything downstream, it might.

Consequently, it's a good idea to pull the base down (or up,
depending on what your circuit's supposed to do) in order to take
the uncertainty out of it.

Be careful with attaching too much importance to what the donkey
states.

Couldn't resist sniping eh ?


Note that he's back-pedaling in order to try to fix his earlier post
and hasn't stated whether the pull-down should be on the µC side or
on the transistor side of the series-connected base resistor.

Exactly what part of " base to ground " is unclear ?

Graham

.



Relevant Pages

  • Re: Switching +/-12V from 6/0V
    ... total current through the 1K emitter resistor. ... > collector and emitter. ... It's the transistor that drops the rest of the voltage. ...
    (sci.electronics.design)
  • Re: Q: Transistor as a switch with pull down ?
    ... Emitter is grounded. ... digital output pin the base will be floating if the PIC failes to ... pulldown resistor at 10k and replace the IO pin to base with say a 1k ... defined as an input there are no chance of the base of the transistor ...
    (sci.electronics.basics)
  • Re: Amplify 1.5v DC to 5v DC?
    ... with the transistor being a 2N3904. ... in that example the emitter resistor is required because the input ... >one NPN feeding in to the base of another NPN? ...
    (sci.electronics.basics)
  • Re: Transistors
    ... What should I consider to do regarding DC biasing of the transistor ... Collector to V+ through a 1K resistor. ... The key voltage is between the base and emitter. ...
    (sci.electronics.design)
  • Re: Q: Transistor as a switch with pull down ?
    ... Emitter is grounded. ... digital output pin the base will be floating if the PIC failes to ... pulldown resistor at 10k and replace the IO pin to base with say a 1k ... I just wanna make sure that the transistor doesn't ...
    (sci.electronics.basics)