RGB Christmas Lights


Closed Thread
Results 1 to 13 of 13
  1. #1
    Join Date
    Nov 2004
    Posts
    61

    Default RGB Christmas Lights

    Hi All,

    I thought some of you might be interested in the Christmas lights I designed for the front balcony this year.

    I fabricated 32 'pixels,' each containing superflux RGB LEDs. The pixels are driven by a DMX-512 signal, which is commonly used in theatres and concert halls to control lighing equipment. It's basically a differential RS-485 protocol which runs at 250 KBaud.

    In this particular application, the source of the DMX signal is a video clip which runs at 30 frames per second. I hacked together some software bits which extract color data from an arbitrary video file and send it out the door as a DMX stream.

    That's right - the lights can be driven by iTunes visuals! Some of the color fades and washes are majestic to behold.

    It was a small batch / trial run sort of project, but I'm very pleased with the way everything turned out.

    Photos, video clips, schematics and a fairly detailed write-up of the project are here:

    www.response-box.com/lights/B1167474708/

    And yes, it's somewhat over-engineered. But it works, and it only took about 30 minutes to write & test the PBP code for the pixels. Each processor contains an 'F628 running at 20 MHz.

    Cheers,

    John

  2. #2
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    Cool idea, btw you can run more than 32 devices. Some of the newer RS-485 transceivers allow up to 128.

  3. #3
    Join Date
    Nov 2004
    Posts
    61


    Did you find this post helpful? Yes | No

    Default

    Excellent! Do you have a part number?

    32 was partly because I didn't want to load the bus too much, partly because of cost for the entire rig and partly because I only have so much balcony...

  4. #4
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    Off the top of my head the maxim MAX13442E, MAX13443E, MAX13444E should fit the bill.

    BTW are you posting your PicBasic code on the website?

  5. #5
    Join Date
    Nov 2004
    Posts
    61


    Did you find this post helpful? Yes | No

    Default

    I really should post the code, but I'd like to tweak it a bit first.

    Some thoughts -

    My design as it stands is way, way too expensive. I used a crystal per chip because I knew the circuit was stable and would work without any optimization. I'd love to move to something based on a 12F529 or similar, using an internal oscillator.

    I haven't tried it yet, but I suspect that even with some heavy assembly code, it would be a challenge to decode full-out DMX and run the PWM code at the same time.

    One solution would be to have a crystal-driven PIC receive DMX, grab data starting at the appropriate start code, and re-transmit the required channels at a lower speed.

    A string of 48 pixels spaced every 6" results in a string 25' long.

    48 pixels x 3 colors/pixel x 8 bits/color x 30 updates/second equals 34,560 bits/second. Or 4.32 KB/s. Plus some start bits and stop bits.

    And I suspect that a '529 could receive at 4800 reliably using the internal oscillator. Program the PIC to use Artistic License's BAM control scheme (google it) and the processor overhead drops tremendously. Maybe this could all fit on a 10F part...

    I'm also not sure if it's feasable to run a single-ended serial signal 48 feet and maintain signal integrity with unshielded cable and 48 hi-z taps.

    If it is, I could save even more money by eliminating the RS-485 receiver at each node.

    Anyone done something similar?

    The LEDs are still happiest at 70 mA, so direct drive is out.

    Ideally, a pixel would contain a '529, 3 x drive transistors, a decoupling capacitor and current limiting resistors.

    The current rig uses 18 gauge cable for power and ground and 1 pair+shield for the data connection.

    If I could hit $2 or even $3 per pixel, I'd be deleriously happy.

    Hmmmm...

    Anyone interested in collaborating on a project for next year?

    John

  6. #6
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    How about CAN buss or Dallas one-wire to each of the nodes? You would then have 1 master that would convert DMX to CAN buss/one-wire.

  7. #7
    Join Date
    Nov 2004
    Posts
    61


    Did you find this post helpful? Yes | No

    Default

    Interesting - I'm only slightly familiar with CAN and the one-wire protocol.

    I was thinking also of implementing a self-clocking protocol ala Manchester to handle the communication. Would be nice to run only 3 wires between each pixel.

    Synchronous serial would also be fast, but it adds an additional wire...

  8. #8
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    One-wire is super easy. You only really need messages sent when changes occur. The downfall is it is half-duplex. That being said you are basically running half-duplex now.

    The reason I suggested CAN is because it is similar to RS-485 in that it uses two wires. You then have a full duplex network.
    http://www.interfacebus.com/Design_Connector_CAN.html

    BTW what type of container did you use for each node?
    Last edited by DynamoBen; - 28th December 2005 at 19:19.

  9. #9
    Join Date
    Jun 2005
    Location
    Wisconsin
    Posts
    382


    Did you find this post helpful? Yes | No

    Default

    Although these links are not exactly what you're trying to do they might provide some inspiration or additional ideas. Enjoy.

    http://thediscobar.blogspot.com/

    http://washufloor.blogspot.com/

  10. #10
    Join Date
    Nov 2004
    Posts
    61


    Did you find this post helpful? Yes | No

    Default

    Groovy links! Thanks.

  11. #11
    Steph 77's Avatar
    Steph 77 Guest


    Did you find this post helpful? Yes | No

    Smile your project RVB

    hello, your project is very interesting and I wanted to know it you could post your basic code same if it is not finished.


    thank you


    greeting

    Steph

  12. #12
    Join Date
    Nov 2004
    Posts
    61


    Did you find this post helpful? Yes | No

    Default

    Hey Folks...

    It's been a couple years. I've updated my lights with a new design and a much bigger quantity. Currently using ~ 663 channels of DMX to drive them.

    Pictures here, video to be added when I get a decent camera.

    http://response-box.com/rgb/

    JEC

    PS: Per post #5 above, I'm very, very close to being deliriously happy...
    Last edited by JEC; - 16th December 2008 at 14:23.

  13. #13


    Did you find this post helpful? Yes | No

    Default

    I don't know if this would help, but you might be able to use portA for a second LED. That way you could get 2 pixels with a minimum cost increase. Maybe use a piece of wire (or a bicycle spoke) to hold the LEDs away from the board so you get the spacing.
    Tim Barr

Similar Threads

  1. My code for TV remote and MIBAM for RGB control
    By idtat in forum Code Examples
    Replies: 4
    Last Post: - 12th January 2013, 20:52
  2. Top christmas projects star
    By rickyD in forum mel PIC BASIC
    Replies: 1
    Last Post: - 20th July 2008, 08:55
  3. Scale 8bit ADC RGB LED voltmeter
    By Ryan7777 in forum mel PIC BASIC Pro
    Replies: 1
    Last Post: - 22nd February 2008, 03:37
  4. Happy Christmas
    By Adrian in forum mel PIC BASIC Pro
    Replies: 0
    Last Post: - 24th December 2007, 14:58
  5. Slowing Down RGB PWM Routine
    By Tissy in forum mel PIC BASIC Pro
    Replies: 5
    Last Post: - 8th March 2005, 09:22

Members who have read this thread : 1

You do not have permission to view the list of names.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts