I have a 24 vac motor that is partially controlled by a limit switch, which shuts down the motor when the payload has reached its maximum distance. Using a Raspberry Pi, I'm trying to detect when the limit switch has been triggered. I've come up with the following solution, but am having trouble deciding if it's safe to run the 24 V directly into the base of the transistor or not. The two datasheets I've found for the 2n2222a transistor (one, two) do not have specific information regarding the maximum voltage or current allowed on the base of the transistor. Note that after the diode, in theory, the voltage is actually \$24\sqrt{2} = 33.9\text{ V}\$. In practice I've actually seen the voltage be 42 V. I think this is due to the motor and 120 µF capacitor, but not sure. At any rate, using 42 V and 100k ohms, we can calculate the current at the base should be about 0.42 milliamps.
Specifically then, what is the maximum voltage or current that can be applied to the base of the transistor in this circuit? Is this circuit safe and/or is there a better way?
- The 10 µF capacitor is 50 V.
- The 120 µF capacitor is 100 V.