Shop OBEX P1 Docs P2 Docs Learn Events
RGB LED and Xbee Project — Parallax Forums

RGB LED and Xbee Project

chiappebchiappeb Posts: 4
edited 2014-05-06 23:36 in Robotics
I'm trying to run an RGB LED seen below using Xbee, here are the specs on it:

ED Emitter: 10W Lens Color : Water Clear
Emitted Color : RGB
DC Forward Voltage (VF) : Red 6-8V ; Green 9-12V ; Blue 9-11V
DC Forward Currect (IF) : 300 mA
Beam Angle: 140 degrees
LifeSpan Time : > 50,000 hours
Intensity Luminous (Iv): Red 120-150LM, Green 200-300LM, Blue 70-100LM





















sku_66291_1.jpg


I have an Xbee attached to my computer with an explorer board. Than what I would like to do is somehow attach a second Xbee to the LED so I can remotely control it from my computer. Can some one please help me as to how can I make this happen? Eventually what I would like to do is create a mesh network that I can control from my computer, but as long as I can get one going the rest should be no problem.
600 x 600 - 24K

Comments

  • kwinnkwinn Posts: 8,697
    edited 2014-05-05 18:23
    Post a part number or the spec sheet so we can see what is needed to make it work. It may need current limiting, or that could be included. Also a good idea to post what kind of control you want. Just on/off or variable intensity/color, etc..
  • chiappebchiappeb Posts: 4
    edited 2014-05-05 20:57
    There are multiple supplier/distributors who sale these RGB LED chips, the specs vary a little from one to the other. I found a supplier who has the specs listed on their website. The model number and link to their website were the specs can be viewed are:
    My intent is to be able to control intensity and also color. I want to be able to get any color by controlling the red,blue,and green.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-05 21:18
    chiappeb wrote: »
    There are multiple supplier/distributors who sale these RGB LED chips, the specs vary a little from one to the other. I found a supplier who has the specs listed on their website. The model number and link to their website were the specs can be viewed are: My intent is to be able to control intensity and also color. I want to be able to get any color by controlling the red,blue,and green.

    The link is to a while LED not a RGB LED.

    Is this the LED you want to control?

    If so, you'd want to learn to control it by itself before attempting to add a XBee.

    Do you want to use the XBee's PWM outputs to control the LED? Doesn't a XBee have three PWM outputs?

    You might need a microcontroller to control the LED along with appropriate drive circuit. I'm not sure if a XBee can control the LED without a microcontroller.
  • chiappebchiappeb Posts: 4
    edited 2014-05-05 21:59
    here is the link to one that is an RGB.
    http://www.aliexpress.com/item/Square-10W-High-Power-RGB-LED-Chip-for-fish-tank-light-3-Red-3-Green-3/1245087439.html
    Yes if that's possible and it will do the trick than using the PWM outputs is fine by me, I just have to learn how to set it up that way. I don't think the hookup can be done directly because the Xbee can pnly take 3.3v and the RGB LED that I'm trying to use uses 12V and a much higher current. However, I have no idea what microcontroller I would need or drive circuit for that matter?
    I could also try to use the shiftbrite LED (https://www.sparkfun.com/products/10075) which can run on 5V as opposed to the 12V. However I, believe I'm still in the same boat, because its still above the 3.3V the Xbee can handle.
  • xanaduxanadu Posts: 3,347
    edited 2014-05-05 23:02
    My XBee only has two PWM pins. Is fading the LEDs a requirement? If so you'd need a driver that can put out up to 12v at 300ma (but I'd look for something at least 500ma). The cool thing about the driver is you'd only need one XBee PWM pin to control it. The downside is that your LED is a beast, and will need lots of juice which is hard to find in a small LED driver package.

    If you don't care about fading then you can just use a 12v source for the LEDs, current limiting resistors, and some 2N2222 transistors. You'd also need to drop the 12v to 3.3v for the XBee, that's a big drop for a linear regulator, so it might be cheaper and easier to get a small switching power supply, like the little ones you can stick in breadboards with a wide input voltage range.
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-06 06:30
    It sounds like the XBee will only be used for wireless communication. The XBee itself won't be used to directly control the LED?

    If you're just using the XBee for communication, then leave the XBee aside initially, and get the LED to work the way you want first.

    You'll need to decide what microcontroller (uC) to use. I'd suggest using one you're comfortable with. I think your task would be easier if your uC had a UART to make it easier to interface with the XBee.

    I see there are lots of Instructables in using RGB LEDs. I find there's an immense about of "noise" over on Instructables; you might want to post a link here to an Instructable you think looks promising before purchasing parts. Some over here can check to see if the Instructable author gave good suggestions.

    You could also search these forums for RGB LED projects. Post #1 of my index (see signature) has a link to Rich's forum search tool (Google). I've done a few RGB LED projects but none of the LED I've used required as much current as your LEDs require.

    Once you can get a uC to control the LED, learn how to control it from your computer over a wired connection. Once you've done this, add the XBees.
  • chiappebchiappeb Posts: 4
    edited 2014-05-06 22:45
    Thank you all who have reply it been of great help. I have one more question, hopefully someone may be able to answer it. I'm going to use a Shiftbar, which the LED's will be hooked up to. The Xbee will be attached to the Shiftbar as well in order to control it. My question is were do the Data, Clock, Latch and Enable pins on the shiftbar go on the Xbee pins? I was thinking they would directly to the IO pins, say pins 20,19,18,17 on the Xbee?



    10238-04.jpg
    index.jpg

    ShiftBar Xbee
    256 x 166 - 9K
    600 x 600 - 73K
  • xanaduxanadu Posts: 3,347
    edited 2014-05-06 23:29
    Nice, I think I'll order some of those too!

    XBee aside, they will not work well with your LED. If you're going to pick out a driver you need to get something that has more power available than you need. This has much less power available.

    I haven't much experience connecting anything directly to an XBee but I don't think that will work. You have 2 PWM pins and 8 on/off I/O pins. None of them will be able to support communication because there isn't enough processing power on board the XBee.

    Back to my original question, what are your intentions with this LED? Do you need to fade each channel or just turn them on and off?
  • Duane DegnDuane Degn Posts: 10,588
    edited 2014-05-06 23:36
    chiappeb wrote: »
    My question is were do the Data, Clock, Latch and Enable pins on the shiftbar go on the Xbee pins?

    I'm pretty sure the XBee can not directly control the shiftbar. You would need a microcontroller to receive the serial data from the XBee and have the microcontroller control the shiftbar based on the data received.

    Without knowing more about the shiftbar, I wouldn't be able to tell you if it would be useful for this application even with an added microcontroller.

    People would be able to provide better answers if you provided a link to the devices you are asking about.
Sign In or Register to comment.