A while ago I posted on here for some help with my circuit design. I received some great advice which thoroughly improved the original.
I made the changes to the breadboard design and the circuit ran well.
Then, on one test I left the relay activated for a few minutes by leaving sw1 closed. After a while I found the 2N2222 began to get hot. I thought maybe the resistors R5 4.7k and R6 1k are stopping the transistor being saturated, so I swapped the values round making R5 1k and R6 4.7k. When I ran the circuit again I saw the voltage drop across the transistor was less and it did not get warm at all.
The relays coil resistance is 100ohm and its a normal 12v relay which draws 120mA. The 2N2222 is rated for 800mA so there should be headroom.
Could someone advise if I have the right base resistor setup? The original idea behind the potential divider R5 and R6 was to limit the voltage into the base, as I read in the datasheet the maximum emitter base voltage was 5V. I think I'm misunderstanding something here.
This is as the circuit stands with the resistors in the swapped position so the 2N2222 runs cool.