Post by victorgrant on Feb 19, 2018 6:08:14 GMT -5
HI,
I am trying to use a 12V motor to operate a dog feeder remotely using a transistor switch from the GPIO pins on my raspberry pi. I am using the directions here, minus the part about the screen and email, basically just using the transistor switch and then plan on programming my own GUI around it. However I'm running into issues with the transistor switch.
I have a 12V 1Amp power cord running it. when it's plugged in directly to the motor it works just fine, when I add the flyback diode to it on a breadboard it also works just fine allowing the current to pBanned, the issue is when I run it through the transistor it stops working. Once I put it through the transistor, wired up to a GPIO pin, turn the pin on, nothing happens. If I skip the 270 Ohm resistor and the 10K Ohm resistor it will turn on, then when I turn the GPIO off it will lower the power, but not all the way.
Through my own tinkering I discovered that if I use a 150 Ohm resistor the motor will initially be off when plugged in, but then turn on when I turn the GPIO pin on, however, again when I turn the GPIO off, it lowers the power of the motor quite a bit but not fully off.
My only other concern was, my transistor says on it, that it's a MPS2222A, and not the PN2222 as required in the diagram, but from my googling it seems they have identical data sheets. I'm also using 1/4 W resistors, so wasn't sure if that would be an issue? I've googled and googled and searched these forums to no help. I'm begin to think I should scrap the whole thing and try it with a relay switch as that seems easier, and a main advantage of the transistor switch is the speed, which is not an issue here, but I would like to learn more about how these work as they seem useful in future applications.
Thanks
I did not find the right solution from the internet.
References:
www.raspberrypi.org/forums/viewtopic.phpt=200976
Mobile banking video
I am trying to use a 12V motor to operate a dog feeder remotely using a transistor switch from the GPIO pins on my raspberry pi. I am using the directions here, minus the part about the screen and email, basically just using the transistor switch and then plan on programming my own GUI around it. However I'm running into issues with the transistor switch.
I have a 12V 1Amp power cord running it. when it's plugged in directly to the motor it works just fine, when I add the flyback diode to it on a breadboard it also works just fine allowing the current to pBanned, the issue is when I run it through the transistor it stops working. Once I put it through the transistor, wired up to a GPIO pin, turn the pin on, nothing happens. If I skip the 270 Ohm resistor and the 10K Ohm resistor it will turn on, then when I turn the GPIO off it will lower the power, but not all the way.
Through my own tinkering I discovered that if I use a 150 Ohm resistor the motor will initially be off when plugged in, but then turn on when I turn the GPIO pin on, however, again when I turn the GPIO off, it lowers the power of the motor quite a bit but not fully off.
My only other concern was, my transistor says on it, that it's a MPS2222A, and not the PN2222 as required in the diagram, but from my googling it seems they have identical data sheets. I'm also using 1/4 W resistors, so wasn't sure if that would be an issue? I've googled and googled and searched these forums to no help. I'm begin to think I should scrap the whole thing and try it with a relay switch as that seems easier, and a main advantage of the transistor switch is the speed, which is not an issue here, but I would like to learn more about how these work as they seem useful in future applications.
Thanks
I did not find the right solution from the internet.
References:
www.raspberrypi.org/forums/viewtopic.phpt=200976
Mobile banking video