I want to use a level shifter, these are really small and hard to work / test with. I have one on a PCB but it's not working as expected. The reason this is not working could be something else and not the level shifter + wiring, so I thought I would break it down into sections. To do this I made a breadboard version of a level shifter using a PNP (2N4403) and a NPN (BC548B) and to simulate I added 22k resistors in the same positions as the . This still does not work but I think this is because the transistors are not 100% the same . If I reduce the NPN base resistor to 10k (was 22k) it works, but this does not help me determine if I have got it right with my BCR22PN level shifter.
The RX_IN in 5v and the RX_OUT it 3.3v on a Xmega MCU RX pin.
So I have a couple of questions:
Looking at my picture should this work as a level shifter?
Am I correct in saying the my breadboard simulator does not work because of the difference in the transistor specs.
Finally to confuse me even more I created a Multisim siumlation of the breadboard setup "2N4403 + BC548B with 22k's" and this worked without the need to change the base resistor to 10k!!! but I suspect this is because in Multisim is a perfect world with no real world losses.
Do I need a pullup? when I measure the RX pin on the MCU it's at 3.3v already and it stays there even when the input to the 22k / NPN is moving between 0-5v. It's like the NPN is not pulling it down hard enough, hence me trying a 10k to improve the pull down.
FYI with 22k I see about 0.7v (but its right on the edge of 0.7v might be <0.7v) on base of NPN and with 10k I see about 0.8v on base.
Ronv, I don't have the HW in front of my right now but you could be right, if you are your a genius for figuring this out so quickly!!, I will keep you posted.