2

Desired Behaviour

I want to send RGB values from my Arduino Uno PWM pins to an RGB LED strip.

What I've Tried

I've purchased this RGB LED strip and 12V power supply (specs below).

I'm trying to follow this adafruit tutorial but am finding the diagram references unclear.

I've mocked up a diagram but am not sure it would work:

enter image description here

( I haven't used the Vin pin before, so, just to be clear, that is the pin that is connected to the positive line on the breadboard - is that how to transfer the 12V power to the breadboard? )

Questions

01) Is the above diagram safe and sound?

02) How do I connect the power supply to the RGB LED strip?

03) Is it ok to keep the Arduino 'powered' by the USB whilst plugged in to the 12V power (so that it can keep sending the RGB values to the LED strip via the PWM pins)?

04) I've seen references to grounding the power source, how do I do that?

05) Are the MOSFETS I have from the Arduino Uno starter kit sufficient for this task?

Printed Text on MOSFET: IRF520 Y32K BE

MOSFET Datasheet: Link (IRF520NPbF)

Specifications

RGB LED Strip

  • LED type: 5050 SMD

  • Color: RGB

  • LED quantity: 300LED

  • Package: 5 Meter/REEL

  • Voltage:: 12V DC

  • Working Power: 14.4W

  • Working temperature: -20° to 50°

  • Size: ⌀180mm

  • Length : 5m

  • Life Span: 50000+hours

  • Weight: 0.3kg

Power Supply

  • Input Voltage: AC 100 - 240V

  • Output Voltage : DC 12V, 6A

  • Power : 72 Watts

  • Connector Size:

  • External Diameter: 5.5mm

  • Internal Diameter: 2.5mm

5

01) Is the above diagram safe and sound?

It looks to be OK, except one thing:

The current you can draw from the Arduino's VIN pin is limited to about 1A. That is a sixth of what your power supply can provide, and the LED strip when everything is on needs more than that (1.2A), so you could run into problems. The limit is threefold:

  • The barrel jack itself is rated at up to 1A
  • There is a protection diode with a limit of 1A
  • The header pins are rated at up to 1A

And of course the Arduino itself needs to use some of that available 1A. So you might be better off splicing your LED circuit into the power supply's wire before it enters the Arduino.

02) How do I connect the power supply to the RGB LED strip?

Power goes in (+) to the common pin of the LED strip and then out of any of the three colour pins that happen to be connected to the ground of the power supply. That is, the ground of the Arduino in your schematic since they are (as they should be) all shared.

03) Is it ok to keep the Arduino 'powered' by the USB whilst plugged in to the 12V power (so that it can keep sending the RGB values to the LED strip via the PWM pins)?

Yes. There is circuitry on the Arduino that allows both the USB and barrel jack to be plugged in together.

04) I've seen references to grounding the power source, how do I do that?

That refers to connecting the external power supply's ground and the Arduino's ground together. By using the barrel jack that is all taken care of for you.

05) Are the MOSFETS I have from the Arduino Uno starter kit sufficient for this task?

Not really. They are designed to be switched with a higher voltage than the Arduino's IO pins provide. While they will work, they may cause the LEDs to be dimmer than they should be, or the MOSFETs might get hot. Basically a MOSFET has a "threshold" voltage range which is the voltage range at which the MOSFET transitions from off to on. That is 2V - 4V for that MOSFET, which while within the range of an IO pin isn't really that great. At 4V the MOSFET still isn't completely on. You may notice from the datasheet that the "R_DS(ON)" value - that is the resistance of the MOSFET when it is on, is measured with the gate voltage at 10V. That is a voltage where the MOSFET is guaranteed to be fully on. Anything less than that and the resistance will be higher causing more losses across the MOSFET. I could see that instantly from the model number - it starts with "IRF". There is a specific range from International Rectifier which is designed to be directly driven by an IO pin - these are the "IRL" (for International Rectifier Logic-level) series. These have their R_DS(ON) values measured typically at a gate voltage of 4.5V and a threshold voltage in the region of 500mV to 1.5V. When directly driving from an Arduino these IRL (or equivalent from other manufacturers) are preferred.

  • It works! You have no idea how long I've been wanting to make this happen, thank you! Soldering iron, accessories and other MOSFET's are arriving in the mail tomorrow so I can solder header pins on the LED wires and make more secure connections to the breadboard. (These are the MOSFETS I've ordered - IRLB8721PBF - docs-asia.electrocomponents.com/webdocs/0f35/…). – user1063287 Feb 23 '16 at 14:25
  • Just curious. R_DS is 0.2ohm at 10v (GS), which is pretty insignificant. Would the R_DS be so much higher that the leds will look dimmer, even at 1.2A? – Gerben Feb 23 '16 at 14:44
  • Take a look at Fig3 of the datasheet and do the maths. At 10V V_GS and 50V V_DS, R_DS calculates at around 1.6Ω. At 5V V_GS it calculates at around 11Ω. So we're talking 10x the resistance. – Majenko Feb 23 '16 at 14:56

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.