I am trying to run a motor when an output from my chip (PICAXE-08M) is high.
I am using a BC547B with a 1.8K resistor in series with the base. I connected the emmiter to ground and the motor is connected (in parallel with a diode) to the collecter and up to 9v VCC.
For some reason when I connect my 5v output from the chip, the motor starts, runs very shortly and then stops. After a few seconds it repeats.
Now when I tried to simply replace the 5v on the base with 9v (from my VCC) it started working... But I want to run the motor off my chip...
Any idea's as to why it's not working properly? (I am thinking the tranistor is simply not producing enough collector current with only 5v?).
You are using the NPN as a saturated switch. To properly turn on the NPN, its base current should be ~Ic/10, so one tenth of the motor current. If your motor current were 0.2A (my guess), the base current should be 20mA.
Assuming that the PIC can pull up to +5 at 20ma (which it cant quite do), Rb would have to be (Vdd-Vbe)/Ib = (5-0.65)/0.02 = 87Ω to pass 20mA into the base.
If your motor requires more than 0.2A, you cannot do it with a simple NPN, you will need a Darlington, or FET.
Yeah, I do believe that the PIC simply wont be able to supply such a large current. I think I will just use an FET instead. I shall post back when I test it.
It looks like the stall current is about 1.25 amps so this is going to take a lot of gain to get moving if you want to go lite on the port pin and say limit to 10ma. Yes a MOSFET sounds like a decent idea, as long as it is a logic level input MOSFET. Another idea is a compound made from a PNP driving an NPN if you cant get a MOSFET, or even an NPN driving a PNP, as Darlingtons drop more voltage.
You need an NFET, likely in a TO220 package so it is easy to heatsink, with a Vds rating two to three times your positive supply voltage, with an Ron of <100mΩ, and where it turns on hard with only a Vgs of 5V. This is usually described as a "logic-level-gate" NFET.
Without checking the current rating of the motor and trying to drive it with a little transistor with a max allowed current rating 12 times to 20 times less, you probably blew up the little transistor.
Are you a gambling man?
It is not a "logic level" Mosfet so some will barely turn on with a 5V gate voltage. Some will. It is designed to be turned on with a 10V gate voltage.
It is also not available any more in North America (obsolete?)
It is a PFET, not an NFET. Its ON resistance is quite high, It's Vds rating is only -6V, and it is in a tiny package.
I say again:
You need an NFET, likely in a TO220 package so it is easy to heatsink, with a Vds rating two to three times your positive supply voltage, with an Ron of <100mΩ, and where it turns on hard with only a Vgs of 5V. This is usually described as a "logic-level-gate" NFET.