Take the 2-minute tour ×
Electrical Engineering Stack Exchange is a question and answer site for electronics and electrical engineering professionals, students, and enthusiasts. It's 100% free, no registration required.

I have SN74HC14 or BC548 / 2N2222 transistors. I need level shifter for I2C between arduino and RPi. Here's simple circuit from the internet enter image description here

Problem is I don't have any MOSFETs. Can I use NPN transistors instead? or do I better use 2 74HC14 NOT gates as single MOSFET?

share|improve this question
1  
Not easily, because unlike normal level shifter circuits, these signals must conduct in both directions. –  Brian Drummond Jul 1 at 10:55

2 Answers 2

up vote 2 down vote accepted

You can try to use BJTs. Here is what I've built and it works (it has some disadvantages though and may not work in all cases):

enter image description here

Source: http://playground.arduino.cc/Main/I2CBi-directionalLevelShifter

share|improve this answer
    
Can you say what disadvantages? or in what cases it will not work? –  a_vasilkov Jul 1 at 11:05
    
@a_vasilkov "If a line is pulled low, a current from the base to the emittor will turn that transistor on. But the other transistor will leak current from the base to the collector. That current will reduce the current in the first transistor. " from playground.arduino.cc/Main/I2CBi-directionalLevelShifter –  Cornelius Jul 1 at 11:06
    
sorry, didn't read yet. thank you. –  a_vasilkov Jul 1 at 11:07

No, you can't. The "trick" of using MOSFETs in this type of level shifter relies on the fact that MOSFETs are very symmetrical devices — for all practical purposes, the source and drain terminals can be interchanged, and the device works identically (ignoring the effects of the body diode).

BJTs do not have this symmetry property. The base-emiiter and base-collector junctions are deliberately made with different properties, and while you'll get some gain using it in the reverse direction, it's much less than using it in the proper direction.

The 74HC14 has pins that are input only and output only, and can't be used for bidirectional signals at all.

share|improve this answer
    
What do you mean by by symmetrical? –  Roh Jul 2 at 14:37
    
@Roh: Which part of "interchange source and drain" isn't clear? –  Dave Tweed Jul 2 at 19:00
    
How a MOSFET can works two-sided (symmetrical)? –  Roh Jul 3 at 4:41

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.