I just bought a DC motor from 3 to 6v but i noticed that the motor needs more ampere than the arduino can give. After that i put an battery on the arduino so it had extra power. Now i want to program the motor and i found a program it uses the 2N2222A NPN transistor but I think this transistor is for motor that use less ampere because i becomes really hot when i use it. Is there an transistor that works the same like this one but can handle the power from a pc and an 9vbattery?
This is the circuit
it uses a 1N4001 diode, PN2222 Transistor,270 Ω Resistor, a motor and a arduino UNO
Driving a motor direct from an Arduino pin is likely to cause permanent damage,
though overcurrent and inductive voltage spikes.
Motors should always be driven with a suitable motor driver circuit - a transistor
and diode combination as you show is fine for single-direction use.
However the transistor has to saturate and be able to handle the maximum current
the motor will take. Do you know how much current? Have you sized the base
resistor to guarantee saturation? These are likely the problem.
Its much simpler to use a MOSFET to control a high current load like this as you
don't have to provide a large base drive current and the saturation characteristics
are vastly superior with a modern low resistance device.
For one direction use, I would just use a MOSFET. For two direction use, I would look at a basic motor driver like the following:
Some of them also have current limiting. You want to make sure that your motor isn't going to pull more current then USB can supply or else you may trip the over current on your USB. USB current limit is usually about 500mA.
What you need is a logic level gate mosfet. The gate needs to be fully on or the resistance of the drain/source is not at its least so causes heat.
My favourite small mosfet is NTD5867NL. It works with 5v on the gate and handles a few amps with ease. They are cheap. I bought mine from RS Components.
There are others but make sure they are fully on at 5v on the gate.
Thanks for the reply's.
The motor uses many amperes when I plug it in the arduino I can see that the lights on the arduino give less light en the pc gives the sound that a usb is unplugged.
How can I see how many ampere the motor uses exactly I couldn't find it on the site where I bought it.
And what do you mean with one of two directions, I want to drive the motor from the pc and I want change the speed while it runs I already wrote the code for this.
I am a first year student mechatronics so I already know a bit about electricity but not all.
I tried it with a 9v battery and with a and I measured the amperage.
I measured between the 0.6 and 0.8 A it changed a lot between those two numbers.
How do i seperate the arduino supply from the motor supply?