Hi. I'm struggling to understand what's the real problem with my DC motor circuit. I've made a prototype on Thinkercad and everything is fine there. But whenever I physically build this, the motor is not spinning.
At first I thought that the mosfet was broken but I made some tests and it actually works. So I don't know what the real problem could be.
There are several problems with the circuit. PP3 block batteries, if that is actually what you are using, are designed for low power circuits like smoke alarms, not motors.
Please have Fritzing produce a schematic, with all the parts and pins properly identified and labeled, rather than the above. The transistor needs to be identified, and it requires a gate or base resistor in series with the Arduino output pin.
You posted a Fritzing diagram, and if it does not represent your circuit, it is misleading as well as wrong.
Please post a hand drawn wiring diagram (pencil and paper works) that represents your actual circuit, with pins and parts clearly identified and labeled. Also, post links to the parts, like the motor power supply.
Posting instructions can be found in the "How to get the best out of this forum" post, linked at the head of every forum category.
Can you please post a copy of your circuit, a picture of a hand drawn circuit in jpg, png?
Hand drawn and photographed is perfectly acceptable.
Please include ALL hardware, power supplies, component names and pin labels.
Can you post some images of your project?
So we can see your component layout.
Why you need the schematic if there's already a clear image of what the real circuite should look like. For the components, they're the ones provided in the Arduino starter kit
Because it makes more sense, such as MOSFET connections, switch connections.
So much better, you just need to refine your layout, but this one is good.
What is your MOSFET part number?
If you pull out the wire from gate to UNO and connect the gate to +5V what happens?
If you then connect the gate to gnd what happens?
Can I suggest at least a 10K resistor from MOSFET gate to gnd.
If you mean the mosfet model by "part number" it's an IRF520. So I have (looking from left) Gate, Drain, Source. Also I don't quite understand the:
"If you pull out the wire from gate to UNO and connect the gate to +5V what happens?
If you then connect the gate to gnd what happens?"
Are you trying to tell me that I'm short-circuiting? I shall put the resistor before the gate or after the source?