I am looking to turn a motor on and off at very fast speeds (relays won't work), which leads me to transistors. Consider this diagram of an NPN transistor:
Will the 12V 20A line harm the pi since it's grounded to the pi?
Edit
The Motor
As far as pulse rates go, I won't be sure how fast it will need to be until I start testing, but let's say we will be using pulse widths of 400 microseconds, spaced out at 400 microseconds. This is a total period of 800 microseconds (about the fastest you can do on a nema 17 with the A4988 driver).
The motor I am selecting is called the K2G20-12V-BR-04 (G20 is the maximum current draw). On that page, you will find a spec sheet, but take note of this graph:
For no load on the linear actuator, there is a current draw close to 20A. Here is how the motor is wired:
I talked to a representative for this motor on the phone, and he said that this motor will be able to receive PWM. I plan to have two transistors controlling the "extend" and "retract" switches shown in the above diagram. Sadly, I don't believe they provide inductance values.
The Transistor
This will be my first time working with transistors - mechanical engineer here :), so consider my knowledge to be naïve. I believe I have found a MOSFET here that will work. I say that it will work because in the datasheet, it says that it has a "gate source threshold voltage" between 3 and 5 V. The gate source threshold current is 250 microamps. So would the resistor value at the base not be 3.3/250e-6 = 13.2 kohms?
As far as kickback is concerned,
would this not be protecting it?