I'm trying to find a way to light an electric match with an IRF520 transistor and an Arduino, but I can't seem to get it working.

I've rigged up a 7.4 V battery to a transistor which in turn is connected to an electric match. When I turn on the transistor, the circuit is completed, and it should light the match.

I've tested this with LEDs and it works perfectly, they turn on and off as I tell them to, but when I attach the match, nothing happens.

I think it has something to do with the fact that the match has almost no resistance, but I can't figure it out. If anyone knows why this isn't working please tell me, any information helps.

Schematic (don't judge, this is the first schematic I've made): enter image description here


int match = 2;

void setup() {

void loop() {
  pinMode(match, OUTPUT);
  digitalWrite(match, LOW);

Here are photos of the actual circuitry: enter image description here enter image description here

  • \$\begingroup\$ Your battery ground and Arduino ground must be shared. Your wiring diagram does not show this. Is it connected exactly as your wiring diagram? \$\endgroup\$
    – winny
    Commented Aug 3, 2022 at 9:30
  • \$\begingroup\$ @winny I messed that up in the schematic, but battery ground is connected to Arduino ground in real life. \$\endgroup\$ Commented Aug 3, 2022 at 11:51
  • \$\begingroup\$ Please redraw it. \$\endgroup\$
    – winny
    Commented Aug 3, 2022 at 11:52

1 Answer 1


Firstly you should be outputting a high signal to activate the FET, the N channel FET requires a positive voltage from drain to source to allow current to flow.

Secondly the fet you’ve chosen is not a “logic level” FET - it prefers a much higher gate voltage than you’re using. Note the transfer function from the data sheet (snipped below), you’ll only ever get about 3 A flowing through it with Vgs = 5 V.

enter image description here

Thirdly, and possibly not real issue but a drawing issue: your fet is drawn upside down in the schematic, the source pin (pin 3) should be attached to battery minus.

enter image description here

Finally, and this is super important: you must connect battery minus to the ground or 0 V node of the Arduino.

  • \$\begingroup\$ Thanks for the quick answer! I'm sorry about the schematic; it seems to have confused more than it helped. In real life I have attached the battery ground to the Arduino ground, and the transistor if facing the correct way. As for my code where I output a "low" signal, that is what I found to work, at least with this transistor "high" seemed to open it and "low" seemed to close it. I also just tried a BC574 transistor, which did the same thing. It worked with the LED, but with the electric match it failed. \$\endgroup\$ Commented Aug 3, 2022 at 11:46
  • \$\begingroup\$ @JackNewport That's some confusing behaviour. Can you take some photos of your actual implementation and add them to your question? \$\endgroup\$
    – Bryan
    Commented Aug 3, 2022 at 15:52
  • \$\begingroup\$ @JackNewport thanks for the photos, you have that transistor connected incorrectly: you have ground on pin 1 (the gate), the gate drive gpio pin on pin 2 (the drain) and the ematch return on pin 3 (the source). Connect grounds to pin 3, gpio drive to pin 1 and the ematch to pin 2. I would also recommend a 10k resistor between pin 1 and pin 3 to make this a bit safer - once you have reliable triggering you should look at your code and layout from a fire-control-safety standpoint, because what you have right now will not be reliable. \$\endgroup\$
    – Bryan
    Commented Aug 4, 2022 at 1:59
  • \$\begingroup\$ @JackNewport thinking about this further, the "Low makes led on" behaviour is explained by the fact that the led current flowed through the body diode of the fet (from source to drain) and into the GPIO pin when it was low. The LED connection may not have damaged the GPIO pin but I am 95% sure that the GPIO pin is damaged from the ematch (no voltage drop, much lower resistance). You may even find that the whole arduino is damaged due to the high voltage that's been applied. I would recommend using a different GPIO pin for now and thoroughly testing the output with an LED. \$\endgroup\$
    – Bryan
    Commented Aug 4, 2022 at 18:10
  • \$\begingroup\$ Thanks! When I did that it worked perfectly! As far as I can tell the Arduino itself isn't damaged, but I changed the GPIO pin for safety. Thanks again! \$\endgroup\$ Commented Aug 6, 2022 at 16:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.