Go Down

Topic: RGB LED Problems... (Read 1 time) previous topic - next topic

coastersplus

I recently got the MakerShed "Getting started with Arduino" Kit.  But I can't figure out how to connect it.  It looks like this.

^ ^  ^ ^
-1-2--3-4-
Which lead is for red, which lead is for green, which lead is for blue, and which lead should go to ground?


johnwasser

To find the answer yourself, connect a 1K resistor to the 5V line of the Arduino and try connecting Ground and the other end of the resistor to various leads until something lights up.  The Ground side is the Cathode and the resistor side is the Anode.  The 1K resistor will limit the current to a few millivolts so the LED will not be damaged even is connected backward.

If nothing lights it may require more current.  Connect another 1K resistor in parallel with the first to get 1/2K (500 Ohms).
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

johnnycanuck

My son has the Makershed kit, and I believe the RGB LED he has is 'common anode'. That is, you hook up the longest pin to a 330 (or greater) resistor, then to 5V and not ground.

http://www.mbeckler.org/microcontrollers/rgb_led/

To turn on the red each LED, you connect them to ground or:

  DigitalWrite(red, LOW)


I have the Sparkfun kit and, as I recall, it includes a common cathode RGB LED, where you would hook the longest pin to the 330 ohm resistor, and then to ground. 

Common anode is more popular.

johnwasser


My son has the Makershed kit, and I believe the RGB LED he has is 'common anode'. That is, you hook up the longest pin to a 330 (or greater) resistor, then to 5V and not ground.


If you use a single resistor then the three LEDs will have to share the current through the resistor and they may not share evenly.  To get the expected results you should use a separate current-limiting resistor on each LED, not on the Common.
Send Bitcoin tips to: 1G2qoGwMRXx8az71DVP1E81jShxtbSh5Hp

saunj

I used one, common anode with resistor, for my spa thermostat (replacement - uses the 18B20 digital thermometer). There was only a  place for 1 indicator. Although the cathodes connect to 3 pins, it is my policy and experience that the best use is one color at a time. Note - equal currents do not equate to equal perceived brightness.

johnnycanuck


If you use a single resistor then the three LEDs will have to share the current through the resistor and they may not share evenly.  To get the expected results you should use a separate current-limiting resistor on each LED, not on the Common.

Thanks for the clarification. I suspected there might be issues with using a single resistor.

Go Up