DC Motors & PWM

I am trying to control a fan (dc motor) using PWM for a project. The problem is the fan is connected to power but not the arduino I think? Since the motor doesn't turn off but stays on thats what I am thinking. Attached is my schematic and my tinkercad representation:


Screenshot 2024-01-16 10.21.15 PM

The way you show in your diagram, if you set pin 2 to HIGH you will burn the transistor. And yes, the motor is permanently ON.

The motor must be connected to V+ and to the transistor’s collector, which must be disconnected from V+. Diode cathode should be connected to V+ and its anode to the collector, in parallel with the motor.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.