Shop OBEX P1 Docs P2 Docs Learn Events
How can I control a RGB LED Strip from my BS2??? — Parallax Forums

How can I control a RGB LED Strip from my BS2???

SledgehammerSledgehammer Posts: 8
edited 2012-01-16 05:30 in Robotics
I want to make a controlled RGB LED Strip hidden light for my room! I am excited about it but I run into some problems. So here are my questions:

Q1: How can I connect the LED strip to my BS2? (Which wire goes where:tongue:I just have the boe-bot kit and will use that)
Q2: How do I control it with the PBasic language that BS2 uses? (I mean, OK, it's simple with 1 led but how do you control an entire RGB LED strip??)
Q3: BS2 uses 9VDC. LED strips 12VDC. Would it work with just 9VDC or there is a way?

I know that there are ready kits for that but I would like to build my own!

Thank you all for your time!:smile:

Comments

  • FranklinFranklin Posts: 4,747
    edited 2012-01-08 13:00
    Q1: How can I connect the LED strip to my BS2? (Which wire goes where:tongue:I just have the boe-bot kit and will use that)
    Depends on the strip but if it is just a bunch of leds hooked in parallel you would do it the same as a single led
    Q2: How do I control it with the PBasic language that BS2 uses? (I mean, OK, it's simple with 1 led but how do you control an entire RGB LED strip??)
    Again see answer 1
    Q3: BS2 uses 9VDC. LED strips 12VDC. Would it work with just 9VDC or there is a way?
    Use level shifters, transistors or MOSFETS.
  • PublisonPublison Posts: 12,366
    edited 2012-01-08 14:28
    I want to make a controlled RGB LED Strip hidden light for my room! I am excited about it but I run into some problems. So here are my questions:

    Q1: How can I connect the LED strip to my BS2? (Which wire goes where:tongue:I just have the boe-bot kit and will use that)
    Q2: How do I control it with the PBasic language that BS2 uses? (I mean, OK, it's simple with 1 led but how do you control an entire RGB LED strip??)
    Q3: BS2 uses 9VDC. LED strips 12VDC. Would it work with just 9VDC or there is a way?

    I know that there are ready kits for that but I would like to build my own!

    Thank you all for your time!:smile:

    You can you can use something like this:

    http://www.ti.com/product/tlc5940

    or this:

    http://allegromicro.com/Products/Regulators-And-Lighting/LED-Drivers-For-Backlighting/A8500.aspx

    You will have to have a good knowledge of the SHIFTOUT command or IC2 in some instances.

    Your power for the LED's would come from a completely different source, ie not the power to the BS2. You don't mention how many LED's would be powered. The Power Supply could run from 1 Amp to 10 Amps depending on how many LED''s are in the circuit.

    The grounds supplying the BS2 circuit and the LED drive would have to be comined.
  • TymkrsTymkrs Posts: 539
    edited 2012-01-08 16:46
    Hey Sledgehammer - saw you come into the tymkrs IRC a bit earlier asking about the last segment of the rgb led strip project.

    In terms of the wires: Because the LEDs are serially chained, from what I understand, there's an actual order to how the chips "receive" commands from the main chip (in our case Propeller, your case BS2). So you have to use the pins on the "butt side" of the arrows to connect to your board.

    If you can post what strip you have we can help you figure out more exactly what you need - but essentially for us, one wire went to the power rail (+5v for us), one wire went to the serial data line, one wire went to the clock line, and another went to ground - which was also connected to ground on the board.

    (And if you didn't know, I2C is the master - slave idea where the microcontroller can control a whole bunch of stuff from its serial data and clock lines). So for your LEDs, I imagine they're considered different "peripheral devices" that run on the same clock and data line coming from the microcontroller). My rudimentary understanding of it anyway.

    tumblr_lsbqig4QNf1qf00w4.gif

    http://tymkrs.tumblr.com/post/15403162286/separate-power-regulator-hooking-up-the-rgb-led <-- some pictures/descriptions you can check out. We'll go over what we did in the last video to the RGB LED project on Tuesday :)

    (And apologies, I'm not too sure about BS2 code, Roy Eltham was kind enough to have written a driver for the Prop chip which we used.) And in terms of voltage - that seems pretty high, but if we could have the datasheet for it, we could see what could be done to help.
    414 x 146 - 14K
  • SledgehammerSledgehammer Posts: 8
    edited 2012-01-08 22:30
    Thank you all guys for your answers! I will find a strip and will post it here! Since I live in Greece it will be a bit difficult to a good one cheap. As I saw they cost around 30€

    I'll find it and paste it here!

    Oh, and a big thanks to brainwagon in the tymkrs IRC chat! I hope I'll get in in a bit from my college WiFi!!!!

    EDIT: I was wondering if I can connect the data wires to the BS2 and the power to a external sourse...Not from a board but directly from a 220VAC to 5VDC converter!


    So, I found this one:
    http://www.futurehouse.gr/index.php?main_page=product_info&products_id=4918&language=en

    A bit expencive though:S And I think it's not what I want. I need a 5m strip to cut it in half to put it here:

    dsc0003cx.jpg

    and here:

    dsc0004bl.jpg

    I would be glad if you could find the excact type of strip I need!:smile:Now that I think of it,I don't mind if the LEDs can have different color each:tongue:
    800 x 600 - 57K
    800 x 600 - 61K
  • TymkrsTymkrs Posts: 539
    edited 2012-01-09 14:50
    That's what we did with our rgb led strip - We used a breadboard power supply - connected the power wires to this and the serial clock/data to the propboe board. You might be able to find some rgb led strips on ebay?
  • SledgehammerSledgehammer Posts: 8
    edited 2012-01-09 22:16
    Yea I saw your post! I was thinking of buying that converter and directly connect it with the strip!

    EDTIT:So, I've found this one:
    http://viewitem.eim.ebay.gr/5M-5050-RGB-SMD-LED-Strip-150-Leds44Key-IR-Remote-ControllerPower-Supply/380396239660/item

    What do you think of it??Plus do you know if I will be able to cut it in 2?
  • FranklinFranklin Posts: 4,747
    edited 2012-01-10 21:37
    Have you looked at this http://www.adafruit.com/products/285 ?
  • SledgehammerSledgehammer Posts: 8
    edited 2012-01-11 02:24
    That's 1 meter Framkiln and I need 5! no way to solder all these!I wanna do a fine job :) But thanks :)
  • SledgehammerSledgehammer Posts: 8
    edited 2012-01-15 22:57
    Anyone??????
  • LevLev Posts: 182
    edited 2012-01-16 05:05
    That's 1 meter Framkiln and I need 5! no way to solder all these!I wanna do a fine job :) But thanks :)

    You might want to take another look at those. The description says they are in 5 m rolls, sold by the meter.
  • SledgehammerSledgehammer Posts: 8
    edited 2012-01-16 05:30
    Which mean 80 $ :S
Sign In or Register to comment.