DC motor & internal Battery controlled by PNP transitor and digital PIN

Hello to everybody.

I would like to control a DC motor with internal Battery with my Arduino Nano using a digital PIN and a PNP Transistor. Unfortunately the motor does not move.

Attached the sketch the of configuration I prepared which is NOT working.

I am using a PNP BC557 - E211 Transistor.

Can somebody help me to fix it? Please be flexible and tolerant as I am just a beginner :slight_smile:

I tried the following setup and it worked:

Unfortunately I cannot use this configuration on my set up as the motor and the battery are already closed inside an housing which has been already sealed, so I have only access to the cables, as shown in the image attached.

Thank you so much in advance for your help and support!

alex :slight_smile:

You have no power to the Nano so I'm not suprised it's not working

Hello, thank you for the reply. The arduno Nano is connected through USB to the laptop and is ON. Leds are blinking correctly, so for sur the NANO is power ON.

Connect the grounds. Edit: and something about a something across the motor. Flyback something. OK, I can't remember what is supposed to be put across the motor leads. Another edit: Might be a flyback diode.

Why a <100mA signal transistor for a motor. Is it tiny?
Why PNP.
Why collector to positive. Emitter goes to positive for PNP.

PNP is posible, but then VCC has to be shared. Not ground.
The motor needs a diode across if you want the transisor to live.
The base resistor value is too high. If the transistor is not saturated, it will overheat and pop it’s top.
Try 220ohm.
Leo…

Hello Vinceherman,

thank you for the comment. The motor is connected to a battery and there is a + and - pole,

Shall I connect the GND to the - Pole of the battery? I think it will not work. oder?

Hello Wava,

in my projekt I use an existing electical device which is already working and has one motor an one battery inside a housing box. Instead of the mechanical switcher ( a simple mechanical button) I would like to switch it on using a transistor. Unfortunately I have access to the cables that were connected to the mechanical button, and these are located as shown in the drawing. The solution with PNP instead of a NPN transistor comes from this link: https://learn.sparkfun.com/tutorials/transistors/applications-i-switches

I didnt have a 220 ohm resistance and I used what I had, that is the 1 kohm resistance, I will change it.

The PNP model I used is just because I had this model already ah home. Which model should I use for you?

There are so many and really I cannot get the name of the transistor to choose. Is the use of a PNP also for you correct? DO you have an idea which PNP name shoudl I buy? I see that on the BASE the voltage goes from 0 V (PIN LOW) to 1.6 V (PIN HIGH), but the Transistor remains "closed".

Maybe the Transistor in the drawing is inverse comparin to my experiment. I double check and send an update. In any case thnk you so much for your comments!

Alex

Need more details about the "motor" (stall current) and "one battery". Is it possible to open the case and add a diode across the motor.

For small motors, the 2n2222 or BC337 might do. Leo..

Yes a BC557 has only a tiny current rating of 0.1A absolute max. Its designed to amplify small analog signals. Small motors are more like 0.5 to 1A stall, thus needing a high current device to switch them.

Its usually easiest to low-side switch a power load like a motor since the power will be separate from the logic 5V (it certainly ought to be). Low-side switching allows a different voltage for the motor supply. An NPN bipolar transistor or an n-channel MOSFET would be used.

If you want the motor to turn in either direction a circuit called an H-bridge is needed, consisting of 4 switching devices rather than one.

When switching any kind of inductive load you have to protect against inductive kick-back, typically using freewheel diode(s). Most H-bridges have these built-in, if using a single transistor then you'll need a freewheel diode across the motor terminals to protect it.