Main Site Documentation

Dumb LED question


#1

OK, this may be a dumb question, but I’m going to ask it anyway. :slight_smile:

A few years back, I bought a bunch of RGB LEDs from SparkFun (these: https://www.sparkfun.com/products/retired/10390), that are just plain LEDs, no controller included.

I played around with them a bit when I bought them, but never really ended up using them for anything. I broke them out again today to see if they might be useful for a Halloween project, but it does not seem possible to light up more than one element (red, green, or blue) simultaneously. From that, I’m assuming that the only way to mix the colors would be to drive the individual LED pins via PWM.

The dumb question is, is that the correct assumption and/or the right way to do color mixing in this kind of RGB LED.

And yes, I do have a good supply of WS2811/2812 RGB LED strips…just don’t want to cut them up where a couple of the PIranha LEDs might do the trick.

Thanks in advance for any tips or pointers!


#2

Yes, that should work. You can also use SignalGenerator (aka software PWM).


#3

OK. Looks like maybe I was misunderstanding what I was seeing. I’ve got both the green and red elements wired up on a breadboard to ground through the appropriate resistors, and to power via separate momentary switches.

It looked like when I was pressing both buttons that only the red element was lighting up, but now that I look again, it appears that the green element is lighting up, but is completely overwhelmed by the intensity of the red LED element.

So I guess you’re correct that I don’t need PWM to get both elements lighting up…but it appears that I DO need PWM if I want to get finer control over the color mixing.

Thanks, gents! As always, when I post here, I learn something. :slight_smile:


#4

Right. If 7 colors is enough then no PWM. If you need more variation then you need PWM. As far as one component overwhelming the other - try different resistors.


#5

Yup…just played with that a bit, and with my wiring. Ended up moving the resistors and switches onto the positive leads, since this LED is common cathode, so trying to do the resistors on ground doesn’t work very well. :wink:

Will likely go with PWM just for the sake of easier color mixing…I’m thinking this may be a good opportunity to use one of my medusa mini boards. Or, possibly an mBuino.


#6

Oh, and in case it’s not obvious already, this is mostly about me going back to the basics, to fill in my knowledge gaps with fun projects. :slight_smile:

Been reading up on some of the concepts tutorials on learn.sparkfun.com. Good stuff, especially for those of us who come this without an EE degree…


#7

@ devhammer - mBuino should be fun to try.


#8

Looking at the datasheet, the luminous intensity of the green element is more than twice that of the red element, so in theory it should have been the other way around, especially since I used a larger resistor with the red element, based on an LED calculator using the 5v source and the 1.8v forward voltage values.

They’re cheap LEDs, so perhaps some inconsistencies are normal. :slight_smile:


#9

Hopefully more fun than the Medusa Mini. Took me a couple of hours just to get something to actually compile, and no luck actually getting any output. Can’t even get a simple Serial.println to work.

Reminds me of why I went with Gadgeteer over Arduino when I was getting started. :slight_smile:


#10

I did not play much with my Medusa Mini, but I am reasonably confident that mbed is a smoother experience.

I have not yet even bothered using an off-line compiler, the online IDE and compiler works a treat. In fact I ordered a few extra mBuinos to send to my Dad. Of everything I have tinkered with I think this is the easiest entry point, no firmware to update no software to install… It just works, at least with the mBuino. I have a few STM Nucleo boards, but I have not tried them yet.

I would be interested to hear what your experience is.


#11

I agree. mBed team did a great job. I was sceptical about the whole idea when I’ve heard about it back then. But after I tried mBuino - it was really smooth experience.

Love drag & drop deployment and no drivers.