I have built the circuit attached below and it is working as desired. I was wondering if the community here had any recommendations to make this circuit more pro.
The transistor is a 2n2222 or 2n3904 BJT NPN used to switch the motor on off
Motor is a 12v dosage pump DC motor
Resistor is 10R
The voltage regulator is just a placeholder on the diagram. On this test board I'm using a 12v to 5v step-down (S9V11F5) for testing.
Also the circuit is seriously deficient in a number of ways - it will take a while to list them. Let's begin with a lack of bypass caps on the voltage regulator... why on earth a diode on the transistor base and no base current limiting resistor. Why the 10 ohm in series with the motor?
OMG, you edited and erased the voltage regulator!!!!!!!!!! What the ???????????
Sorry -- I can make a schematic but I'm not trying to make it LOOK more pro -- sorry -- I'm trying to see if there are any enhancements to the circuit the community would recommend. Such as different/more transistors, pull-downs, etc.
...and if you don't make one, you will never be judged by professionals because they will mostly refuse to deal with a Fritzing style diagram. So nobody who really knows anything will care whether your actual circuit is "professional" or not.
The point is to not modify posts that have been commented on. It disrupts the continuity and can make helpers advice look strange. If you make changes, make a new post.
Thanks for the feedback. Below is much closer to what I am planning/hoping to put into production.
I had the diode there to protect the IC from any feedback from the 12v through the BJT. I don't believe it's necessary (since that's not how BJTs are supposed to work) but I was just being careful.
Yes, I've done research and even made the basic circuit work. I am still struggling with exact resistor values but basically the 10R is because I believe I need a resistor into the motor but I don't want to lose much voltage since it's a 12v motor. I believe I need a resistor instead of a diode into the base of the BJT. I chose a 1k here on the fly, I'd need to do some math to figure out exactly what it should be. The motor has a 13R resistance and consumes 220mA at 12V.
I've never heard that one before. You really think a surge will destroy the motor? Where would a surge like that come from? What about the heat generated and power wasted in the resistor? The reduced starting torque of the motor? What voltage is the motor?
According to the datasheet for the LM1117, you're right, looks like C1 should be a 22uF, is that what you mean? I saw that in the "typical application" on page 1. Updated the diagram.
No, I don't think there will be a surge but I was trying to follow best practices. I thought a resistor on the Vin was best practice, feel free to correct me if I'm wrong. I agree, I'd rather not have one. I think they have 0R resistors too that could be better used for this application. Perhaps it's like a fuse? Agreed, not necessary here, just curious.
Okay, my bad. I was thinking about a 100nF cap in addition but they don't mention it. Maybe I'm thinking of a different part. 10/10 or 10/22 uF should be okay...
A myriad of internet research over the past month or two. Culmination of things. This is why I'm bring what I think I know here to get people like you to help me verify what I think.
I suspect you are hanging around in the wrong places on the internet. Your circuit should work, but the transistor has a definite practical current limit. So you need to know if it is enough to drive the motor properly. Does it get hot?
Now I see, you are missing a flyback diode across the motor.