Transistor base voltage

Status
Not open for further replies.

iceblue

Member
Hi all. A rather elementary question I suppose, but I would just like to know if it is okay to connect the base of a transistor to a higher voltage than the collector.

I have a microcontroller operating off 5V but one of the inputs is coming from a 12V signal, so could I just use the transistor to ground the port pin when the 12V signal is supplied, or would there be a better way to do this? I had initially planned to use a voltage regulator but thought it would be over-kill.

Any thoughts on this? Thanks
 
With a PIC you can just use a current limiting resistor to directly feed the input pin, the protection diodes clip the input signal to 5V.

You could use a transistor, but you need two resistors as well, and it inverts the signal.
 
The inverted signal wouldn't be a problem as this can be dealt with in the software.

I'm not sure I follow you though wrt the current limiting resistor. The data sheet states that the input voltage to the port pins cannot exceed the supply voltage (5V), so would the 12V not fry the microcontroller?
 

The voltage to the PIC wouldn't be 12V, you feed the 12V through a series resistor which limits the current, and the protection diodes clip it to 5V. It's a standard technique, used in many MicroChip application notes - including directly feeding mains into a pin for zero-crossing detection.

As the PIC inputs require very little current I would suggest using resistors in the 10's of K's - a 70K would give 100uA through the resistor.
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…