I have an MCU (1.8 V logic levels) driving an NPN transistor to turn an relay on/off. The relay has a 12 V DC coil with resistance of 1028R per datasheet. This would require a current of 12/1028 = 11.6mA to drive.
The transistor has a min gain of 100 per datasheet. Hence a min base current of 11.6 mA/100 = 0.116 mA required.
Analysing the circuit, (ignoring 22k resistor for simplicity) the base current is set to (3.3 - 0.7) / 1k = 2.6 mA (>> required 0.116 mA). This should be more than enough to saturate the transistor and ensure that the relay is on.
The problem is that the relay does not always turn on (seen as a production issue). The transistor circuit looks good to me. I'm wondering if the TXS0108E level translator is part of the problem. Or am I not driving the relay properly?
I will put the scope on the circuit shortly but any help would be appreciated.