I have been trying to power a motor with a 5 V power source using the 3.3 V strength input of a Raspberry Pi. To simulate this temporarily, I am using a breadboard power source that supplies one end of the breadboard with 5 V and the other with 3.3 V. When I run my circuit on Tinkercad, it works.
The real circuit below doesn't work, as the motor doesn't run! The transistor just heats up. The 3.3 V with resistor is correctly supplying voltage to turn on the transistor. The transistor's voltage when on reads 4.7 V, however the motor's voltage only reads 0.5-ish V. The motor works fine when connected directly to the 5 V power source. What's going on?
I have tried rebuilding the same circuit with replaced components but still it does not work. The transistor just gets really, really hot. I have also tried flipping my transistor's collector and emitter the other way in case I had it wrong but this yielded nothing. The transistor is a 2N2222. The power source supplies accurate voltages.
I consulted a family friend electrician about this but he was unable to draw any conclusions (he was on FaceTime so he couldn't mess with it directly). I am very new to electrical engineering, so I was hoping someone on here could help.
Here is the transistor: