Go Down

Topic: Help needed to run a dc motor using NPN Transistor, BC547B  (Read 5363 times) previous topic - next topic

okidoki

Hello all,
This is my first post in this forum and I have just started with arduino.

I have arduino UNO board and I am trying to change the speed of the motor with help of a PWM pin 9

I am using NPN BC547B transistor as a switch.
Following are the connections made on the breadboard.

Following steps are then carried out

->Connected a 2K resistor in series  between pin 9 of arduino and base of the transistor.
->Grounded the emitter of bjt.
->Connected the motor between the 9v external source and the collector terminal.
->Connected a diode 140007 parallel with the motor (implemented as flyback diode).
->grounded the external 9v source negative on breadboard(connected to the same reference of emitter)
->Grounded the reference from arduino (from the power pins)

Loaded the sketch and nothing happened.

Hence I put a multimeter and saw that current was fluctuating correctly.
Then to check if my observations were correct, I replaced the motor with an LED(which had 1K resistor in series with it) and it worked.


Therefore I concluded that the current was not enough to drive the DC Motor.

For this I referred to Jermey Blum's tutorials and his was working without any current amplification.


Just wanted to know if my component selection is correct and how to make a DC Motor run with arduino.


Please help.

Thank you.


runaway_pancake

Try a lower value base resistor, 330 ohms (that could be 3 1k resistors in parallel.)
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

runaway_pancake

BC547
100 mA collector current (max.)  Is that correct?
If so, it's not for les moteurs.]
"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

okidoki

Thank you Runaway Pancake,
Would putting such low resistor help in protecting my arduino pin (pin 9)?
If something shorts out then I think it can just destroy my PWM pin 9.


How did you calculate it though?

I tried to do this without a arduino board connected, I took the same 9v supply and connected it to the base with value of 100 Ohms, Motor did turn, however, the transistor was very hot, and by hot I mean really very very hot.

I think that I might have passed excessive current through the transistor.


Just would like to know how experienced guys come up with values and component selections and what care should be taken to protect the components that are involved in the circuit.

I would never like to do is burn up pins from arduino board.



Thanks.

Grumpy_Mike

Quote
Would putting such low resistor help in protecting my arduino pin (pin 9)?
Yes it would. Anything greater than 120R keeps the current from the pin below the limit.

Quote
If something shorts out then I think it can just destroy my PWM pin 9.
Resistors with this little current do not short out.

Quote
I think that I might have passed excessive current through the transistor.
Yes I think so as well.


Quote
Just would like to know how experienced guys come up with values and component selections
See this:-
http://electronicsclub.info/transistorcircuits.htm

runaway_pancake

How did you calculate it though?
Base current -
"Ideal": 5V / 330 ohms = 15 mA
 "Real World": (4.8 V - 0.8V) / 330 = 12 mA

"Who is like unto the beast? who is able to make war with him?"
When all else fails, check your wiring!

Paul__B

With regard to the motor and selection of transistor, part of my explanation here would be relevant.

MarkT

BC547 is a small signal transistor, driving heavy loads like motors is completely
out of its league.

First question you need to ask is what is the stall current of the motor?
Then you find a switching device that can handle that...
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

Wawa

If you want to stay with the BCxxx family, then a BC337 is a better choice.
That one is happy with base resistors upto 330ohm.
Only for small motors though.
Leo..

MarkT

You can't stay with the BC family, the C in BC means "small signal low frequency",
just as BF means "small signal high frequency" and BD means "high power low frequency"...

A MOSFET is actually a far better bet, bipolar switching devices have low current gain
(10 to 20 is commonplace).
[ I will NOT respond to personal messages, I WILL delete them, use the forum please ]

okidoki

Thank you all for the replies.

I think I would go for PN2222 transistor to drive this dc motor.



CrossRoads

Or use a Low Rds, Logic Level, N-channel MOSFET
http://www.digikey.com/product-search/en?KeyWords=aoi514&WT.z_header=search_go
When on, will provide the most voltage for your motor, vs losing 0.5 to 0.7V across an NPN.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up