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.
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.
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..
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).