I thought of changing and using a mosfet with n channels instead p channels. I connected the mosfet's source leg to the minus pole. I connected the drain leg of the mosfet to the plus pole. In this way, MOSFET will think that it is sending electricity to the minus pole and n Channel mosfet will work and connect positive + pole like P channel mosfets. I connected a lamp where the positive electricity was. The result is successful because it worked without any problems. But the arduino did not charge the mosfet gate leg. Later I saw that the plus pole of the mosfet was operating the gate leg when it is connected. Then I connected the plus pole of the mosfet to the minus pole of the arduino uno and the arduino uno started the mosfet smoothly. But I can do this with a maximum of 20 volts because the electric current coming to the gate leg is equal to the sum of 5.5 volts and 20 volts. When I use 100 volts, the electric current coming to the gate leg is 105 volts. Then the mosfet explodes. How can I solve this problem and run MOSFET with 100 volts. I can't charge mosfet gate leg any other voltage source. I can only charge their drain positive voltage source. I need to use n channel mosfet like p channel. How can I fix this charge problem ? Mosfet have only 20 volt Vgs limit capacity in gate leg. When I give it 105 volt it exploded like a bomb .
If you're wanting to use the Uno to control high voltage AC devices, I'd recommend using a relay for switching instead of a MOSFET. Relays are more reliable and safer, but don't offer anywhere near as fast of switching speeds as FETs, so for a simple light switch it's likely a better option.
in the datasheet the absolute max for Vgs is 20V, so it's no wonder why pushing 100Vs through it got wild. Relays isolate the two circuits so you don't run the risk of damaging your board or popping another FET. Even though the IRFP250 is rated up to 200V VDS, expecting it to handle the resulting Wattage would require a serious cooling system and lots of additional safety measures built in. As others have pointed out though, you probably should hold off on working with such high voltages until you have more experience.