I have 3 LEDs powered by an Arduino; each LED has its own flash rate.

Now I want it to be powered by an external 12V power source and still have the flashing function of the Arduino?

  • 1
    You will need a transistor or a MOSFET to do that (one per LED). Just google that and you'll find many examples how to do it. On Arduino.SE, there have also been many questions about this topic. – jfpoilpret Dec 4 '16 at 8:36
  • Thank you very much! I tested it and it works perfectly! :D – Austin Grant Dec 4 '16 at 8:51

Use a N-channel MOSFET, wire load to drain pin, source to (common) ground, and place a 1 kilo-ohm resistor in series with your arduino pins. Bear in mind that MOSFETs respond to voltage, not milliamps, on the gate - get one that responds well to 5V logic.

  • You do not need a series resistor with a MOSFET (although it does no harm). If using a bipolar transistor it is essential. – Milliways Dec 4 '16 at 22:38
  • @Milliways We discussed that before. Different strokes I suppose. – user400344 Dec 5 '16 at 0:12

Or you could use a relay. Many small ones available for a couple of dollars.

  • Using a relay for such circuit would be just annoying because of "clicking" on relay. – Adam Rosiek Mar 5 '17 at 0:34
  • 1
    Hmmm, I didn't read that that was a criteria, not to mention that there are small, quit, solid state relays. – nkuck Mar 5 '17 at 0:38

As has been mentioned, you could use an N Channel MOSFET, but preferably look for a Logic Level MOSFET. These are capable of being turned on by lower voltage levels such as on the pins of an Arduino.

Having said that, i have used two non logic level MOSFEt's in Arduino projects successfully. They are the IRF3205 and IRF 520 - both are readily availalable and will work OK with the Arduino output pins for your low-current-driving-an-LED requirement.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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