Connect with us

LED Setup

Discussion in 'LEDs and Optoelectronics' started by FuzzyWombatSoup, Jan 11, 2015.

Scroll to continue with content
  1. FuzzyWombatSoup

    FuzzyWombatSoup

    35
    1
    Nov 18, 2014
    I want to get 2 or 3 of http://www.mpja.com/RGB-10W-High-Brightness-LED-Common-Cathode/productinfo/31518 OP/ for room lighting. I will be using an Arduino to control/dim them. I'm also aware I'd cook my Arduino powering them directly, so that leaves me with the following.

    • The forward voltages are listed at 6,10,10 for RGB, respectively. Let's say my power source is 12 volts, what sort of resistors will I need(resistance and power dissipation).
    • Would an LED driver be better than resistors? Ifso, what one should I be looking at?
    • I don't plan to need to control each module separately. There would be up to 3 LED modules, I'm assuming I'd need to wire them in parallel due to the voltage drop?
     
  2. KJ6EAD

    KJ6EAD

    1,114
    157
    Aug 13, 2011
  3. FuzzyWombatSoup

    FuzzyWombatSoup

    35
    1
    Nov 18, 2014
    Thanks! I've read over this and got the gist of it. I'm just wondering if my math sounds right for required resistance values of 3watt resistors @ 6.8 and 18 ohms per color per module?
     
  4. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,267
    Nov 28, 2011
    First let's assume you will be using PWM to control the brightness. That simplifies things a lot; when each LED is enabled by the control signal from the Arduino, you will be feeding a constant, known current into it.

    With common cathode LEDs, you will need to switch the positive supply to the anodes, and connect the common cathodes to 0V. This requires a "high side switch", which can be as simple as a PNP transistor or P-channel MOSFET with its emitter/source connected to +12V and its base/gate driven from an open collector/drain driver that's driven from the Arduino.

    Yes you will have to drive the LEDs in parallel, but not directly in parallel, because their forward voltages will vary too much to give reliable current balancing. The simple solution is to use a separate current setting resistor for each LED element. Here's my suggestion.

    272191.001.GIF

    The values for RR, RG and RB depend on the maximum current you want through each LED element at 100% duty cycle. For ~330 mA per LED, RR will be (12 - 6) / 0.33 = 18Ω and RG and RB will each be (12 - 10) / 0.33 = 6Ω.

    The dissipation in each resistor can be calculated using the power formula: P = V × I, where P is power in watts, V is the voltage across the resistor in volts, and I is the current through the resistor in amps. RR will dissipate 2W, and RG and RB will each dissipate 2/3W.

    Use resistors rated for at least twice the maximum expected dissipation, i.e. 5W for each RR and 2W for each RG and each RB. Or you could make each RG and each RB from two 12Ω 1W resistors in parallel.

    Since the total current needed by each element is much less than 1A, the MOSFETs I've specified will be fine, and they won't need heatsinks. But the maximum total current will be 3A, so choose the power supply to suit!

    I've shown a 78L05/7805 regulator in the design; this is just to show you that the Arduino's 5V rail could be powered from the 12V power supply via a regulator, and that the 0V rail of the circuit must be commoned with the 0V rail of the Arduino.

    The three control signals are all active-high PWM.
     
    FuzzyWombatSoup and hevans1944 like this.
  5. FuzzyWombatSoup

    FuzzyWombatSoup

    35
    1
    Nov 18, 2014
    Thanks a ton for the details and guidance! I'll order my goodies now and see what I can whip up.
     
  6. FuzzyWombatSoup

    FuzzyWombatSoup

    35
    1
    Nov 18, 2014
    I can't seem to get this working..

    Here are the readings:
    0V: PWM, 2N3904 Base, Emitter
    12V: NTD Source, Gate, 2N3904 Collector

    I only see about 40mA which is just the micro. If I bypass the circuit and just connect a shunt to the resistors, the LEDs light up, so I've ruled out bad LEDs. Here's a photo of my setup(the red is disconnected). The green wires from the 2N go to the respective RGB channels from the micro. I've also tested other RGB LEDs on the micro to confirm that's working.

    :confused::confused::confused:
     

    Attached Files:

  7. KrisBlueNZ

    KrisBlueNZ Sadly passed away in 2015

    8,393
    1,267
    Nov 28, 2011
    If you measure 0V on the PWM inputs to the driver circuit, and on the bases of the 2N3904s, that means the Arduino isn't generating any PWM signals.

    Disconnect the circuit's inputs from the Arduino's PWM outputs and connect them to +5V, one at a time. Each one will cause the corresponding colour in the LEDs to light, if the circuit is working properly. If that works, you need to look into your Arduino code to figure out why it is not generating PWM control pulses.
     
  8. FuzzyWombatSoup

    FuzzyWombatSoup

    35
    1
    Nov 18, 2014
    It seems there's a short when I do that. I can't figure out why/where, though. Good thing I bought a handful of those transistors:)
     
  9. BobK

    BobK

    7,671
    1,681
    Jan 5, 2010
    Did you put 5V directly to the base? That would be a bad idea, it must go to through a resistor.

    How about supplying a schematic and showing us what you have tried.

    Bob
     
  10. FuzzyWombatSoup

    FuzzyWombatSoup

    35
    1
    Nov 18, 2014
    Here's the schematic of a single color channel I'm trying. I did indeed connect directly to base on that attempt. I retried with the resistors and no lights light up.
     

    Attached Files:

  11. FuzzyWombatSoup

    FuzzyWombatSoup

    35
    1
    Nov 18, 2014
    Apparently I can't read datasheets, I mixed up the gate/drain. It works!
     
    Last edited: Jan 22, 2015
    KrisBlueNZ likes this.
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-