1

is it possible to use a normal PNP transistor to drive a motor? I'm kinda new to this stuff so I want to be on the safe side, so I don't damage my Arduino Uno because of the motor.

I have made a motor driver? https://circuits.io/circuits/2493784-test-1 But I'm not sure if i have done right and I wont break any components.

So does this work without any problems and have I done it right?

I'm not trying to make a H-bridge because I need both PNP and NPN?

EDIT:Picture enter image description here

  • That diode in the circuit is doing nothing. And it's not a good idea to put a resistor in series with a motor as the motor will draw a lot of current, thus the resistor producing heat. Get a motor that matches (by being above) the battery's voltage. – Bradman175 Jul 31 '16 at 4:05
  • @Bradman175 Why do you think the diode is doing nothing? IMO it is absolutely vital for this circuit to protect it from overvoltage. – Ariser Jul 31 '16 at 11:03
  • Look again at the way he wired it. I know diodes in reverse are used to prevent the inductance from creating too much voltage. Forgot to say that. – Bradman175 Jul 31 '16 at 11:04
  • You can upload images as part of your post. That is preferable to including a link that some people can't open. – Nick Gammon Aug 1 '16 at 10:57
  • In addition to your circuit being seriously mixed up, you should really avoid using 9v "transistor radio" batteries for motors - they won't last long, and while they are working the motor performance will be reduced by the internal impedance of these weak batteries. – Chris Stratton Aug 1 '16 at 17:51
2

When connecting together several circuits that have different supply voltages, common practice is to make them all have a common negative supply rail. This is called “common ground”. As explained in Majenko’s answer, you would need an NPN transistor for that.

If you want to use a PNP instead, then you could forget the common practice and do everything “backwads”: if you connect together the positive ends of the power supplies, you will have a “common VCC” instead of a common ground. Relative to the Arduino ground, your 9 V battery will have one pole at +5 V and the other at −4 V.

The wiring is the following:

  • connect the emitter to +5 V (Arduino +5 and battery +)
  • connect the base to an Arduino output through a resistor
  • connect the collector to the motor
  • connect the other end of the motor to the battery −
  • put a free wheeling diode in parallel with the motor.

Edit: Below is an ASCII art rendering of the circuit. Beware that the motor is ON when the Arduino output is LOW.

+-----------+
|         5V|-----------------+-------------------+
|           |                 |                   |
|  Arduino  |                 |                   |
|           |    ,-----.  B |< E                 ___ +
|        D13|----|     |----|    PNP              _
+-----------+    `-----'    |\                   ___
                              |C                  _
                              |                  ___
                              +---------+         _
                              |         |        ___ 9 V batt.
                              |         |         _
                             ---        |        ___
                              ^       motor       _
                             / \        |        ___
                             ---        |         _  −
                              |         |         |
                              |         |         |
                              +---------+---------+
  • Is this method safe or so-so? I have a lot of PNPs that can carry 80 volts, and always use NPNs for driving voltages higher than 5. – user400344 Jul 31 '16 at 21:59
  • @user400344: We all use NPNs: it's the standard practice, and it feels kind of weird to have the + side of the supplies as a common reference. As always, it's safe as long as you are within the component's specs. – Edgar Bonet Aug 1 '16 at 8:11
1

You need an NPN transistor to run a motor like that off of an arduino. Take a look at this article: https://learn.sparkfun.com/tutorials/transistors

Similar to the NPN circuit, the base is our input, and the emitter is tied to a constant voltage. This time however, the emitter is tied high, and the load is connected to the transistor on the ground side.

This circuit works just as well as the NPN-based switch, but there’s one huge difference: to turn the load “on” the base must be low. This can cause complications, especially if the load’s high voltage (VCC in this picture) is higher than our control input’s high voltage. For example, this circuit wouldn’t work if you were trying to use a 5V-operating Arduino to switch on a 12V motor. In that case it’d be impossible to turn the switch off because Vb would always be less than Ve.

Using an NPN transistor is the way to go here. Keep in mind that you can't control the direction of a motor with just one transistor, however.

1

Despite the fact that the circuit you have is completely wrong, there is one fundamental thing that is stopping you using a PNP transistor.

With an NPN transistor you have to raise the voltage on the base above the ground voltage (this voltage is called V_BE, the Voltage between Base and Emitter). Typically that voltage is around 0.7V.

With an PNP, because the emitter is wired to your 9V rail, V_BE must therefore be relative to 9V, not ground, so the voltage on the base must be less than 0.7V below 9V to turn on. Which in itself is fine - a LOW will be around 0V, which is about 9V less than 9V. So it will turn on. The problem comes when you want to turn it off. You need to get the base voltage above 8.3V (9V - 0.7V), and that is impossible for an Arduino to do.

So normally a PNP transistor is switched by using an NPN transistor to switch the base of the PNP between 9V (pulled up through a resistor) and 0V (switched through the NPN).

And that then becomes pretty much pointless, since you are then adding a second, NPN, transistor, and you could just as well use the NPN alone to switch the motor, making the PNP completely redundant.

0

I don't know what you are trying to do, because the link fails to display in my browser.

In general there is no reason why you can not use a PNP transistor, providing you use appropriate polarities, and assuming common-emitter mode, reference to the +5V rail rather than Gnd.

Having said that, you would need some specific reason. In general NPN devices are cheaper and/or outperform PNP, all other things being equal.

  • Link works on my iPad. You just got to wait for the image for a while. It should at least have a loading animation. – Bradman175 Jul 31 '16 at 11:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.