Shop OBEX P1 Docs P2 Docs Learn Events
Tri Color LED project — Parallax Forums

Tri Color LED project

ShadowOpalShadowOpal Posts: 8
edited 2012-10-03 10:43 in General Discussion
Greetings all. I searched for a few days and haven't found anything that matches my needs. I'm also new to all this. So, I'm not even sure I can do this with parallax products. but, if I can, I'd love to keep to the parallax family as I use it in my other props.

So,. I build props for Halloween. I never handle the coding or the microcontroller ordering or setup. I have buddies who are smart that way. I'm not. But, I have a project that I need some help with and would like to learn how to make it happen myself. Basically, I'd like to achieve the following:
1) to make tombstones that are lit from the inside of themselves with tri color leds.
2) I'd like to have a microcontroller that I can program to pulse the tricolor leds in a heartbeat pattern with a chooseable color. For example it would pulse with purple or red or green.
3) I'd like to be able to also have the colors cycle without pulsing.
4) I want to not have the tombstones connected to a computer.

I've heard the term pulsewidth modulation. I guess that's how the color is selected. Any help or links you all can provide would be appreciated. If this can be done with parrallax products, please let me know what all I would need. Thanks for all your help and indulgence.

Comments

  • vaclav_salvaclav_sal Posts: 451
    edited 2011-05-13 18:08
    Here is one source link for your project http://www.sole-electronics.com/dc-led-5rgb/
    Be advised that they are rather spendy in comparison with single color. Shop around.
    Product selection depends on how many LEDs you will use and how you want to scare folks.

    Happy Halloween!
  • wasswass Posts: 151
    edited 2011-05-13 19:50
    You can find tri-color LEDs for much less money.

    Here's a place selling T-1 3/4 size http://www.pololu.com/catalog/product/1074
    Digikey and Mouser sell many surface mount version for much less.

    However you can do exactly what you want without programming using the BlinkM modules that Parallax and many other places carry. It can work standalone or with a micro controlling it. They are expensive but will save you a lot of time/effort developing a program.

    http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/blinkm/List/0/SortField/4/ProductID/746/Default.aspx
  • bradharperbradharper Posts: 64
    edited 2011-05-14 06:31
    ShadowOpal wrote: »
    1) to make tombstones that are lit from the inside of themselves with tri color leds.
    2) I'd like to have a microcontroller that I can program to pulse the tricolor leds in a heartbeat pattern with a chooseable color. For example it would pulse with purple or red or green.
    3) I'd like to be able to also have the colors cycle without pulsing.
    4) I want to not have the tombstones connected to a computer.

    I've heard the term pulsewidth modulation. I guess that's how the color is selected. Any help or links you all can provide would be appreciated. If this can be done with parrallax products, please let me know what all I would need. Thanks for all your help and indulgence.

    You can definitely achieve this with the Propeller. Not sure where you are in the process, but I have an RGBA (four die) LED driver that will do most - if not all - of what you mentioned. The code is not OBEX quality yet, but works, and will definitely get you started.
  • ShadowOpalShadowOpal Posts: 8
    edited 2011-05-16 08:06
    Thanks all. In answer to the posts:
    1) I actually have my tricolor leds already. But, I will check the sources provided to make sure I'm getting the best deal. So, thanks for those.
    2) So, I'm down to looking for a way to get them to slowly pulse like a heartbeat. So, I will look at the options provided. Please feel free to offer more suggestions. I'm happy with having too many choices :). Brad, where would I find the driver? I have no idea what OBEX is but, if you say it will work, I'm happy to give it a shot. I'll probably try all the methods and see what works best for me.
  • bradharperbradharper Posts: 64
    edited 2011-05-16 09:04
    Let me clean it up just a bit and I'll post.

    OBEX is an acronym for Object Exchange, which is a source code repository hosted by Parallax where functional code is posted by Parallax employees and the user community wherein you'll find code for a wide variety of application needs - including IC demos, specific hardware drivers, communication protocols, signal processing, math libraries, logical apis and more. For example, my LED driver is a derivative of this one.
  • ShadowOpalShadowOpal Posts: 8
    edited 2011-05-17 09:15
    Ah. That explains it. Thanks much.
  • ShadowOpalShadowOpal Posts: 8
    edited 2011-05-17 09:20
    wass wrote: »
    You can find tri-color LEDs for much less money.

    Here's a place selling T-1 3/4 size http://www.pololu.com/catalog/product/1074
    Digikey and Mouser sell many surface mount version for much less.

    However you can do exactly what you want without programming using the BlinkM modules that Parallax and many other places carry. It can work standalone or with a micro controlling it. They are expensive but will save you a lot of time/effort developing a program.

    http://www.parallax.com/StoreSearchResults/tabid/768/txtSearch/blinkm/List/0/SortField/4/ProductID/746/Default.aspx

    Okay. so, the description of the Blink M sounds good. But, it also sounds like it has the LED built in. I'm more looking for a device I can hook multiple TriColor LEDbulbs to and control them. Is this what the Blink M does or do I need to keep looking? If that's what it does, it sounds perfect. Thanks for the assist.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-17 09:56
    The guy in the article linked below made his own "BlinkM" units ("open source", some other claptrap, blah, blah, blah). He needed a lot of them. Perhaps such an undertaking is within your skill-set.

    http://sjalbers.nl/Atmel/BlinkM/BlinkM.htm

    BTW That house, in Holland -- Dude is loaded. That's OK, but Homey is sweating the retail for BlinkMs and making them. I've heard about the Dutch and a buck (or a guilder, whatever), but... man. Check out the rest of his site.
  • Shawn LoweShawn Lowe Posts: 635
    edited 2011-05-17 11:43
    Also, www.efx-tek.com is a great resource for prop building. They use parallax products, such as the Basic stamp 1 (they call it the prop-1).
  • wasswass Posts: 151
    edited 2011-05-17 19:08
    ShadowOpal wrote: »
    Okay. so, the description of the Blink M sounds good. But, it also sounds like it has the LED built in. I'm more looking for a device I can hook multiple TriColor LEDbulbs to and control them. Is this what the Blink M does or do I need to keep looking? If that's what it does, it sounds perfect. Thanks for the assist.

    You need the BlinkM MaxM. That's designed to handle external LED's and the high current needed to drive arrays of them.

    Here's one place that carries it: http://store.fungizmos.com/index.php?main_page=product_info&products_id=297&zenid=e4e6accda806e3a58eb12841085dae3d
  • Jorge PJorge P Posts: 385
    edited 2011-05-17 20:34
    I have some RGB LED's I baught from Radio Shack http://www.radioshack.com/product/index.jsp?productId=3020765#tabsetBasic they are quite bright. and work with the code from obex that is referanced in post #6 above.

    I created a new toplevel spin file for testing out different RGB values.

    Pin 1 is connect to P0
    Pin 2 is connect to V3.3
    Pin 3 is connect to P1
    Pin 4 is connect to P2

    here is the code as I modified it
    con
      _clkmode = xtal1 + pll16x
      _xinfreq = 5_000_000
      
      red = 254
      green = 255
      blue = 255
      
    obj
      rgb : "jm_bam_rgb"  
    
    pub main
      rgb.init(0, 2, 1)
      repeat
      
        'rgb.setrgb(rgb.ezlog(red), rgb.ezlog(green), rgb.ezlog(blue))  ' this causes the leds to remain dimly lit at a 255 value 
        rgb.setrgb(red, green, blue)
        
    

    I just change the red, green, and blue constants to test out different colors to find the values I want to use. 255 is off and 0 is full on for each color. I am still having dificulty getting yellow the way I want it. I think it should be diffused a bit more, maybee roughing up the LED with some fine sandpaper.... You could use some thick plexiglas as a light pipe by difusing it in the same manner.
  • PJAllenPJAllen Banned Posts: 5,065
    edited 2011-05-17 20:45
    Jorge P,
    Abrading LEDs didn't work out the way I figured. That eliminates the hotspot aspect, but it's like... it turns it into three sections, they don't really mix any better for it, probably worse. (OK, it sucked.)
    Get diffused LEDs.

    With clear lenses, wax paper works pretty good as a "pre-diffuser", otherwise they project separate R, G, and B patterns.
  • GarethGareth Posts: 278
    edited 2012-10-03 10:43
    bradharper wrote: »
    ... my LED driver is a derivative of this one.
    Works like a dream, after looking at the original Bi-Led and and Tri-Led version you linked .....i think i can progress it further for my 3W 4-led colour sensor (yellow being the extra led)
Sign In or Register to comment.