I need turn off and turn on component from an Arduino UNO.

Block diagram showing the power source, the component and the Arduino

How can I do that? I am thinking about some transistor (IRF 530N) but I am not sure about it.

Please give me a beginner advice how to implement such a switch.

EDIT: Is this realy good for my problem? enter image description here


2 Answers 2


A relay, as pictured, is a good choice. It provides complete galvanic isolation and switches the power properly.

Another option is to use a MOSFET that can handle enough current (an N-channel switching the ground as a low side switch, or a P-channel switching the power which is itself switched by an N-channel, as a high side switch).

  • Upvoted, but the OP should be aware that a flyback diode across the relay coil may be needed, especially if they use a relay that isn't in a ready-made module. Dec 25, 2016 at 19:56
  • You only need that if you are wiring it yourself, in which case you would be following a tutorial. With a module like the one pictured it is all splayed and there is no need for more components.
    – Majenko
    Dec 25, 2016 at 19:58
  • A simpler relay board than that shown might be better. The one shown in question is constantly powered by 12 VDC on the DC+, DC- lines. It is toggled by pressing the button or by a contact-closure on the pins of the white connector. Amazon and ebay links: amazon.com/Wrisky-Channel-Latching-Bistable-Control/dp/… ebay.com/itm/… Dec 25, 2016 at 20:12
  • Yeah, on closer inspection that one looks odd. You want one of the simpler ones. Sainsmart make some good ones.
    – Majenko
    Dec 25, 2016 at 20:13

I've just bought a few STP16NF06L fets for this very purpose, N channel MOSFET.

The key part of that part number is the L at the end. This indicates low (or Logic) gate threshold, which means it will switch on fully at 5v gate drive, unlike most fets which are sort of conducting at 5v but need 10v to reach their specification (like an IRF530N).

The 16 and the 06 are 16 amps and 60 volts respectively.

You can get about 25 of them for the same price as a UNO, depending on supplier, in the UK here for instance

  • I think you mean STP16NF06L About one third the price of a UNO clone.
    – Jasen
    Dec 25, 2016 at 20:08
  • @Jasen No, see the link in the answer
    – Neil_UK
    Dec 25, 2016 at 21:12
  • you wrote '60' in your text but the part number is '06'.
    – Jasen
    Dec 25, 2016 at 21:36
  • @Jasen, why so I did! Thanks. I get cross-eyed with long part numbers, especially when the voltage part drops the trailing 0.
    – Neil_UK
    Dec 26, 2016 at 8:27

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.