How can I control a RGB LED Strip from my BS2???
Sledgehammer
Posts: 8
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 whereI 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!
Q1: How can I connect the LED strip to my BS2? (Which wire goes whereI 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!
Comments
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.
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.
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.
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.
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:
and here:
I would be glad if you could find the excact type of strip I need!Now that I think of it,I don't mind if the LEDs can have different color each
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?
You might want to take another look at those. The description says they are in 5 m rolls, sold by the meter.