Unable to run toy motor.

Hi guys. I am looking for help for a simple program ( circ-03 ). Its a small prg to run Motor using Transistor,. It is like this, I have wired the arduino board as mentioned in tutorials. Transistor used is S.8050 d331. and resistor 2.2k ohms. When i connect the toy motor, the motor does not run but when i use a led , the Led runs okay on this sketch. I have verified motor by running it on 1.5 V cell. I have two pairs of motors. Both checked. I have checked the transistor also and it is working. I am observing voltage drop, but one my friend says its normal. I am a novice in electronics and programming.. Any help will be appreciated... Thanks.

Make a simple pencil drawing showing exactly how YOU have connected everything and post a photo of the drawing.

Also post the program that YOU have uploaded to your Arduino - which Arduino board are you using?

The problem might be that you are trying to power the motor from the Arduino 5v pin and it cannot provide enough current for the motor. An LED uses a great deal less current. But without seeing your diagram this is just a guess.

...R

Also I think that if you aren't using a dedicated motor control board you will need a diode in there as well to protect the Arduino.

Sir, Its Arduino Uno board, and yes i am connecting to 5 V pin. There is a diode as well. The Circuit is as per attached 2 images…

Reference .:Spin Motor Spin:. - (Transistor and Motor) - CIRC03 - YouTube

PROGRAMME

int motorPin = 9;

void setup() {
// put your setup code here, to run once:
pinMode(motorPin, OUTPUT);
}

void loop() {
// put your main code here, to run repeatedly:
motorOnThenOff();
//motorOnThenOffWithSpeed()
//motorAcceleration()

}

void motorOnThenOff() {

int onTime = 5000;
int offTime = 1000;
digitalWrite(motorPin, HIGH);
delay(onTime);
digitalWrite(motorPin, LOW);
delay(offTime);

}

Probably not getting enough current from the Arduino pin. Measure the resistance across the motor and divide that into 5 to get the stall (ie, startup) current.

V=IR

I= V/R = 5/R

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks… Tom. :slight_smile:

Never wise to run a motor from the same supply as the MCU.
But I think your biggest problem is the 2k2 base resistor (~2mA base current).
Ok for a LED, but not ok for a motor that might draw a few hundred milliamps.
The transistor won't saturate (excessive voltdrop across), and might overheat and die.
Change that base resistor to 220 ohm, and see what happens.
Leo..

Wawa:
Never wise to run a motor from the same supply as the MCU.

I actually read his answer as that he's running the motor from the Arduino, not just in parallel from a common supply.

I understand from the drawings that he is powering the toy motor from Arduino's 5volt pin.
Leo..

Thanks Tom for showing the guidelines..

I am doing as per the instruction sheet. I am trying with 5V pin. Shouldnt i be doing that. And there are lots of videos which show motor running from 5 V pin from Arduino. Thats why i am lost. I have tried with different motor but wont run. I tried 220 ohm resister. Still it wont run. I tried direct running the motor on 5 V. Still it wont run.

dipeshvala:
I am trying with 5V pin. Shouldnt i be doing that. And there are lots of videos which show motor running from 5 V pin from Arduino.

NO.

For two reasons. Motors usually require more current than the 5v pin can provide and then they can overload the Arduino and may damage it Also the overload may cause the Arduino to reset or to behave erratically. That can look like a programming problem even though it isn't. The important characteristic for a motor is the stall current, not the no-load running current. It can draw the stall current very briefly at startup.

And second, motors can produce high voltage spikes (positive or negative) which could be very damaging to a microprocessor that works between 0 and 5v.

As to the videos, well you may get away with it for a while with a particular motor.

...R