I wouldn't use PWM for your ignition application. Just use normal digitalWrite().
Here is some code to do that and also use the builtin LED to monitor the process.
This code uses an 'F' input from the Serial monitor to fire the igniter.
const int fetPin = 6; // pin connected to IRF550 MOSFET gate
const int ledPin = 13; // pin connected to Arduino LED
void setup() {
Serial.begin(9600); // Use Serial monitor to send fire command
pinMode(fetPin, OUTPUT); // Set FET pin as output
pinMode(ledPin, OUTPUT); // Set LED pin as output
digitalWrite(fetPin, LOW); // Set FET output to 0V
digitalWrite(ledPin, LOW); // Turn LED off
}
void loop() {
// Wait for FIRE command (F) from serial monitor
if (Serial.available()) { // Check for serial input
if (Serial.read() == 'F') { // If 'F' is entered, then FIRE!
digitalWrite(fetPin, HIGH); // Turn FET on
digitalWrite(ledPin, HIGH); // Turn LED on to monitor process
delay(1000); // Wait 1 second
digitalWrite(fetPin, LOW); // Turn FET off
digitalWrite(ledPin, LOW); // Turn LED off
}
else
digitalWrite(fetPin, LOW); // Make sure it's off!
delay(5000); // Wait a bit before next command entry
}
}
Note that there is a warning in the Arduino manual regarding the use of the PWM output. This might result in a non-zero PWM output to your FET gate.
Notes and Warnings
The PWM outputs generated on pins 5 and 6 will have higher-than-expected duty cycles. This is because of interactions with the millis() and delay() functions, which share the same internal timer used to generate those PWM outputs. This will be noticed mostly on low duty-cycle settings (e.g. 0 - 10) and may result in a value of 0 not fully turning off the output on pins 5 and 6.