There are a number of things that are not correct for the application that you are attempting to implement...
First, in regards to the N-Channel MOSFET, the voltage applied to the Gate must be in reference to the Source. Second, 3.3V applied across the Gate-Source junction may be enough to get the FET on, but you want to use this as a switch, so 5V wouldn't even be enough to get the FET fully enhanced. You want to apply 12V across the Gate-Source junction of the IRF510. Which brings us back to the first point. Let's say that the FET is ON and you have some type of load tied between the FET Source pin and Ground. What is the voltage going to be on the Source pin? With the FET fully enhanced and 1A flowing through the load (and by default, the FET), the Source pin would be sitting at around 29.5V. If you need 12V across the Gate-Source junction to get the N-Fet fully enhanced, then the voltage at the Gate pin (with respect to Ground) would have to be 42V.
In short, you are using the wrong type of MOSFET for the application. You want to get yourself a P-Channel MOSFET. Connect the Source pin of the PFET to the 30V source and the Drain pin of the PFET to the load. There are a numberr of different ways to control the PFET gate, which in turn will control the voltage to the load, but one way would be to tie a resistor across the Gate-Source pins of the PFET and then tie a resistor from the Gate pin to a switch and then tie the other end of the switch to ground. The resistor divider should be set up so that when the switch is ON (so that the resistor tied to it is shorted to ground) the voltage across the Gate-Source is -12V and the voltage across the resistor tied between the Gate and the switch is 18V (with respect to ground).