0
\$\begingroup\$

We would like to connect the 3-color LED module (KY-009) to the GPIO pins of Raspberry Pi 3. We are going to use the {green, blue} LEDs only (5050 SMD LED) of the module. Because

  • the LEDs require high forward voltage V_f > 2.75 V ([ref1]), which is at the limits of the GPIO pins' output V_OH > 2.90 V ([ref2]);
  • the LEDs draw large forward current I_f reaching up to 100 mA ([ref1]), while GPIO pins can't source more than 16 mA per pin & 50 mA combined ([ref2]),

we think of using this circuit ([ref3]): KY-009 Raspberry Pi interfacing circuit

Problem is, a voltage drop of (5−V_C) V across the LED load could exceed the maximum rating of the load V_f_max = 3.40 V ([ref1]).

Could adding resistance R_x before the load help? If so, how can we calculate its value?

More generally, is this circuit appropriate to use? — we're afraid of damaging the Raspberry Pi GPIO pins & are beginners in Electronics.

\$\endgroup\$
  • 2
    \$\begingroup\$ Did you read the bit in the datasheet that says: "You need to use resistors to prevent burnout."? On top of that, it looks like these have all their cathodes connected together so need to be driven by high sided drivers. I don't think the 2N3904 is at all suitable for this. \$\endgroup\$ – DiBosco Dec 11 '17 at 12:24
  • \$\begingroup\$ The datasheet you linked to for 5050 SMD LEDs is for individual colour LEDs. You would be better off looking at a datasheet for a 5050 RGB LED. You would be even better off by reading the datasheet for the KY-009 that you linked to. \$\endgroup\$ – Andrew Morton Dec 11 '17 at 12:58
0
\$\begingroup\$

Why not save yourself some trouble and use an RGB LED driver? You could connect multiple ones to your I2C port or even bitbang over gpio. Something like the LP3944 or the LP5521

The LP3994 has eight channels and handles the current control for you. You can even DIM over I2C. They make a wide variety of these things, some with integrated boosters, controllers, etc.

enter image description here

\$\endgroup\$
  • \$\begingroup\$ It appears that the OP has a common-cathode device, so only the LP5521 from those suggestions would work. \$\endgroup\$ – Andrew Morton Dec 12 '17 at 13:46

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.