# how to switch dc motor with transistor?

I am trying to switch a DC motor using an NPN transistor.

When I connect the motor directly to the battery, it works.

I built a traditional transistor switch circuit with potential divider. To switch the transistor on, I use an LDR. It is all balanced and works well with an LED.

After replacing the LED with the DC motor, it did not run. I used a 9V battery.

What surprises me is that when I measure the voltage between the collector and positive terminal, it shows 8.7V. When I connect the DC motor and measure it again, it shows 0V.

simulate this circuit – Schematic created using CircuitLab

• let me guess ... you have a resistor in series with the LED, and you left it in the circuit when you put in the motor – jsotola Feb 5 '18 at 19:07
• WHats the resistance of the motor? – Trevor_G Feb 5 '18 at 19:22
• You want the motor on when it is dark? Which LDR are you using? Can the motor run from 8 V? Or does it need the full 9 V? – jonk Feb 5 '18 at 19:28
• i want the motor to run when it is dark. – Petr Stejskal Feb 5 '18 at 19:30
• the motor is where the lamp is in the schema, I just couldnt find an appropriate symbol – Petr Stejskal Feb 5 '18 at 19:30

The following is just a behavioral diagram that is perhaps semi-close to what you want:

simulate this circuit – Schematic created using CircuitLab

(Swap the positions of $R_1$ and your LDR to change the behavior relative to dark/light turning on the motor.)

The above depends upon the idea that the motor can run on about $8\:\text{V}$, because $Q_3$ cannot pull its collector down much more than to allow that.

I've set up a nominal hysteresis here. But since you haven't specified anything here (and you probably need to perform some experiments with light and your LDR in order to provide that information), it is what it is. Maybe okay. Maybe not. Until you provide detailed information about the LDR and its response at the light levels you want to use when switching to ON and when switching to OFF, I can't do much more to help on this.

If you measure 0V on the motor, it's clearly acting like a short circuit. Maybe it is shorted. Much more likely, it's designed to consume a much higher current than a LED, and your circuit is unable to provide that current.

Connect the motor directly to the battery. If it's not turning, your battery is too small. If it is turning, measure the current and make sure the transistor you're using is able to provide it. In your current schematic, the base current may be not high enough.