I'm trying to turn on/off a 12v line using a Arduino and a p channel mosfet (f9540n), but if i were to connect them together using some simple schematics online, i would be sending 12v through the arduino. The supplies for the 12v line and the arduino have the same ground since im using the same power supply and a 5v regulator to supply the arduino. What options would I have to solve this? Is getting a n channel mosfet the only choice?
Edit: This is the diagram, I'm not really good at making them, but i hope it helps