I have this motor one wire is connected to a Arduino UNOs ground pin, another to a BD135 transistor emitter pin, i have the base of the transistor connected to the Arduinos 9 pin which is emitting power, and the collector to the 5v source. but the motor is making a ticking sound and not moving why is this happening?
Whats the best way for me to control a electric motor with transistor pins? I have tried multiple tutorials over the internet but there not working.
You need standard switching circuit, common emitter:
+ve motor supply -> motor -> collector, emitter to ground, base to base-resistor to Arduino pin.
You also need a free-wheel diode across the motor because it is an inductive load and would otherwise
risk blowing up all the semiconductors.
This is the basic setup, although the parts mentioned will only be suitable a tiny motor:
Normally you would use a MOSFET and a large rectifier diode since motors can easily that amps.
bipolar switching transistors driven from the Arduino can't handle more than an amp really.
^ Use MarkT's circuit.
A BD135 is a medium power (1Amp max) transistor.
It needs a fair amount of base current to saturate.
You HAVE to use a resistor between the Arduino pin and the base, as on the diagram, otherwise you could destroy the pin.
120ohm is the absolute minimum!
I would suggest 220ohm.
The kickback diode across the motor could also be a 1N4004.
Leo..
You haven't said anything about this motor - perhaps it needs a lot of current (usually the case),
have you checked what your supply and your transistor can take? Assume a practical max
gain in switching mode of 10 to 20 for the transistor.
Never power a motor from a logic supply - that's why I said "+ve motor supply" above.
No it does not show the information we need. In that respect the data provided is very poor. As you have the motor you will have to measure the current with your meter when it is running directly off a 3V supply.
This link http://www.b2s.com/DC-Motor-of-FA30/434059
Shows you need 150mA to drive the motor. However it looks like 3v is the maximum, so use MarkT's circuit and connect it to a PWM pin and don't push it above a 3V average. If you are using the same power supply as the arduino then you need some decoupling to prevent its interference resetting the Arduino. Use a series 1mH inductor or bigger and then a 0.1uF ceramic across the supply in parallel with a 47uF
I,m using the Arduino's power just for testing, i was going to connect a 9V battery pack to it for when it's ready but i guess i'll need a resistor if the max voltage it takes is 3V.
Also is it necessary that i need a resistor going to the base pin, isn't the Arduino's pin output something really low like 0.5V. sorry if this is a noob question i don't have much experience with electronics.
I,m not using a battery pack that takes 9V batteries i mean that my battery pack holds 6 AA batteries which is 9V altogether. About the resistor do i need it because the transistor will burn without it or another reason?
Thanks for you help the answers was really useful.