And following on from post #19, if you do need opto isolation, simply swap out the 2N3904 (npn bjt transistor) and replace with an opto isolator such as the 4n35.
And following on from post #19, if you do need opto isolation, simply swap out the 2N3904 (npn bjt transistor) and replace with an opto isolator such as the 4n35.