Shop OBEX P1 Docs P2 Docs Learn Events
LED fun — Parallax Forums

LED fun

RaymanRayman Posts: 14,667
edited 2012-12-25 06:18 in Propeller 1
Here's a fun exercise with some blue LEDs and a Quickstart or Propeller Platform...

First, load up this complete but tiny (4 line) program (a favorite of DeSilva):
PUB LedFun
  Dira~~
  repeat
    outa++

Then put some blue LEDs directly between Propeller pins like this:
100_7082.jpg
100_7081.jpg


The fun part is figuring out what happens and why...

BTW: This is perfectly safe with blue LEDs like these (Digikey 160-1611-ND). It's also safe with green LEDs. But, you don't want to use red LEDs.

In case the LEDs light up (even though they have a forward voltage rating of 3.5 Volts), it's also interesting to figure out what the LED current is and why...

BTW: Here's my newest circuit board:
Xmas.jpg
1024 x 768 - 76K
1024 x 768 - 84K
1024 x 181 - 19K

Comments

  • JRetSapDoogJRetSapDoog Posts: 954
    edited 2012-12-24 15:59
    Video, for us lazy folks? Yeah, you knew some lazy slouch was going to say that, didn't you, and also probably figure we'll learn more if we actually do it for ourselves. Hmm...perhaps video won't capture the effect at 30fps. BTW, I like the font used for "Merry Christmas." It's made up of all straight line segments. I wonder what font that is; it looks kind of geeky in a good way and good on a PCB. Merry Christmas, all.
  • RaymanRayman Posts: 14,667
    edited 2012-12-25 02:29
    JRetSapDoog, Merry Christmas to you to. The circuit board was some extra space in an ExpressPCB board. I don't know what font it is, but it's the only one they have...

    Don't have a video, but here's what it looks like when you start the program: Some of the LEDs stay on, some blink, and others are off.

    When an LED is on, the current is about 6 mA. But, you'd need 2 things to figure that out. One is this curve from the datasheet:
    Led_IV.png

    The other is knowing that Propeller I/O pins each have an internal resistance of about 30 Ohms.
    226 x 265 - 8K
  • doggiedocdoggiedoc Posts: 2,243
    edited 2012-12-25 03:45
    Nice! Thanks for sharing Ray! I love simple LED programs. That one is as simple as it gets!

    Merry Christmas!!

    Paul
  • JRetSapDoogJRetSapDoog Posts: 954
    edited 2012-12-25 04:29
    Thanks for the explanation (and original post), Rayman. Almost thou persuadeth me to buy some blue LED's (holiday humor). I should, as I've never messed with any, and blue is such a "cool" color (and my favorite for fireworks). The phenomenon of differing voltage drops for different LED colors is interesting; kind of reminiscent of how different battery chemistries have differing cell voltages. I'll have to pick up some blue ones the next time I shop for parts.
  • RaymanRayman Posts: 14,667
    edited 2012-12-25 06:18
    Here's the easy way to figure out the LED current...

    First, we extend to graph down to V=0.
    Now, since we know the source voltage is 3.3 Volts and the source impedance is 30*2= 60 Ohms, we can draw the load line from the short circuit current (3.3V/60 = 55 mA) to the open circuit voltage (3.3 V).
    Where the load line crosses the device curve is where the LED will operate.
    Solution.png
    832 x 593 - 68K
Sign In or Register to comment.