I am using a 5V power supply, a NPN transistor, a Arduino and a 3-6 volt motor and my circuit will not work. I have tried many different configurations and they all won’t work. Here is a picture:
which one ?
what is the value of the resistor. ?
what is the wattage of the motor ?
From the looks of it you have it the wrong way around, but that is just from the looks of it.
Try swapping the yellow & black wires that are connected to the transistor, and please add the flyback diode (cathode to the Green on the motor id' say)
Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
This is almost completely identical as what I have (after switching the black and yellow wires on my breadboard). The only difference is the batteries equal 4.5 V and not 5V. My transistor is the MPS2222A. TinkerCAD says it should be working, but it isn’t.
Edit: forgot to mention the resistor is 10000 ohms
Switch to a 1K resistor first up. (10K should probably also work, but the datasheet mentions 1K)
Connect the motor directly to the PSU to verify it still works, and measure the current draw with a DMM
Grab another 1K resistor and put it in place of the motor.
Instead of driving the transistor from the UNO, connect the resistor at the Base of the transistor to 5v+ of the PSU and see what the voltage reads at the collector to verify that the transistor works.
If it still does connect it again to the UNO and see if that still works.
The answer to the problem should become clear to you after this.