RGB Controller Project: Hardware Suggestions?

Go To Last Post
16 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hello all!

I'm currently working on a design for a set of outdoor, full colour, architectural lights.

The aim is to use three arrays of Power LEDs (one of Red, Green and Blue) behind a diffuser, and use PWM to alter the percieved colour. I plan to use MOSFETs to scale up the signal to power a number of LEDs as required.

The interesting part is I'd like to control them over Ethernet, possibly UDP, and use that medium to provide timing and settings.

First of all, I'm wondering what AVR might be most suited to providing 3 PWM channels as well as accepting input from an Ethernet device. Since size is going to be an issue (in the first instance I want to put this into some small halogen uplighters which are about 60mm diameter), perhaps a Tiny is the way to go, but I'm not entirely sure what capabilities I'm looking for. If hardware PWM is available, I'd like to use it - although I've implemented simple PWM in software before and know what it entails so I'm not ruling that option out either.

Also, there seem to be a number of Ethernet devices out there - like the Easy Ethernet AVR among others. I don't fancy reinventing the wheel, so if there is a boxed solution that'll deal with the gorey details of Ethernet communication (having studied Ethernet at degree level, I know first hand that it's a pain to deal with), then I'm willing to take it. I don't *really* need DHCP/BOOTP support.

I'd like to have full-duplex communication (so I could send status packets from each device, as well as device discovery).

If anyone has any advice on any of these points, I'd be most greatful to hear them! Thanks!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You could use the Microchip ENC28J60, which is an Ethernet controller that you connect to the uC via SPI. All that's needed is a few caps, resistors, a crystal and a RJ45 connector with integrated magnetics.

On the software side you could use uIP, which is a very simple low resource TCP/UDP/IP stack.

I breadboarded a simple webserver with this combo.

See here for another example.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Isnt this a slight variation of existing networked concert/disco lighting instrumets? Do you plan to compete on features or price?

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, the existing solutions are usually based on DMX or something of that ilk. The only ones I've seen that use Ethernet for control have been expensive (£400 and up). My logic is that a building is more likely to already have a Ethernet capable wiring network than a DMX network, making the installation costs cheaper.

To be fair, I will probably not be doing this for commercial gain, more for experience in solving this kind of problem - that and to make my garden look pretty!

I also have other plans to design a standard Ethernet based protocol for talking to any sort of device used in the Events and entertainment industries for remote management - which seems to be at the moment very hetrogenous (for example lights will use it's own protocol, which is entirely different from the protocol used for operating motors, which is different to protocols used to automate sound equipment ...) - even though all of these things essentially perform the same task (triggering an event at a specific time).

Anyway, that's a long way down the line :)

Oh and thanks for your replies :)

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I have an X10 RS232 interface around somewhere thats about 20 years old. I actually wrote some silly program to adjust the dimmimg levels on red, green and blue garden floodlites shining up against the outside wall. A 'poor geeks' Christmas display. X10 is real crappy for real time dimming control. It takes a lot of bytes at 600 baud to adjust one channel up or down one click. Your idea sounds much more practical.

Imagecraft compiler user

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You may want to take a look at RDM, which is an extension of DMX. It has also been extended to operate over ethernet. The nice thing is that it's an accepted standard, which means equipment already exists to work with it. While I admire your approach to create an entirely new protocol, it will be proprietary, and the only equipment that will use it will be your own. (this is fine for a one-off project, but stick with the standards if you want to get into the theatrical control systems)

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:
I also have other plans to design a standard Ethernet based protocol for talking to any sort of device used in the Events and entertainment industries for remote management - which seems to be at the moment very hetrogenous (for example lights will use it's own protocol, which is entirely different from the protocol used for operating motors, which is different to protocols used to automate sound equipment ...) - even though all of these things essentially perform the same task (triggering an event at a specific time).

as the other Avrfreak mentioned...that wheel has already been reinvented several times unless of course its just for your own use

http://www.esta.org/tsp/documents/published_docs.php

as far as the "Microchip ENC28J60" why stop there? may as well get the Microchip PIC with the builtin ethernet and free stack/source!!! the dev board is even on special for about US $125

time to duck into the trench!

edit: BTW that if you plan to offer commercially a color mixing led pwm controller and depending on the market segment, you had better do your homework on patents that have already been issued (not to mention the ones in the que), otherwise you will be in for a nasty surprise $$$!
..of course if you have no money "THEY" may not care too much!

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Shameless link to my own efforts to make an Ethernet PWM LED lamp:

http://www.mcternan.co.uk/MAD/

There's a description, plenty of links and the firmware available on that site, which I hope may help you.

Mike

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Nice one Mike. I meant to cite that for reference early on in the thread but forgot where I found it.

I also have my own RGB fairly light project on the go at the moment. 128 x RGB LEDs on each of 3 USART/485 buses - I must be mad!
I'll consider posting in when its complete.

Steve

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the great replies!

As for reinventing the wheel - notice that the majority of the published and open protocols are not generic. For instance, DMX is designed from the start to be for lighting, not rigging. There are some exceptions but they have ended up being inadiqute for the job.

Also it would only be proriatory until someone else uses it. I have no plans to keep it a secret.

Starting off a design from scratch which isn't at all encumbered by past designs, would help new innovations in theater (for example the new CyberHoist/InMotion3D, MoveCat rigging systems) be controled in the same fashion. I know that the developers of these systems (because I've talked to them myself) would love to use standardised protocols and do whenever they can.

ANYWAY! That is all just a distant aim for some of the information that I get from this project.

MichaelMcTernan : thanks for that info! Just what I needed.

bobgardner : Yeah, the house these are going in has X10 which I've had to mess with before. It's horribly slow and very clunky.

glitch : Yeah I've seen RDM mentioned before, I might look deeper into it.

schtevo : that sounds like great fun :)

bluegoo : I'm not sure on patents, but so many people use PWM in their lighting ...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Oh one more thing... (more on the architectural lighting side) While yes, a building is more likely going to have Cat5/Ethernet infrastructure, that infrastructure likely won't be run in parallel with the electrical & lighting systems, especially outdoors.

Another protocol to look at is DALI. (And Atmel makes a few nice AVR's with DALI UARTS, and extra PWM channels specifically for lighting applications)

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Quote:

Another protocol to look at is DALI.

Goodbye RDM, and "Hello, DALI!".

Lee

You can put lipstick on a pig, but it is still a pig.

I've never met a pig I didn't like, as long as you have some salt and pepper.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hmm, yes, that is a point.

I have to say, in my experience of the entertainment/events industry, most of the time a new infrastructure of cabling is pulled in for each "gig". It's a horribly messy job (having pulled in 15-pair multicore cable into theaters before). I don't know of many jobs where a production company has actually used the infrastructure that already exists in a venue, with the exception of minimal am mounts of power distros that just happen to be there.

With Ethernet, however, you're slightly more likely to trust it than you would than, say, a bunch of analog audio cabling which has probably been eaten by mice since it's been installed.

I'll look into DALI, though it seems to be along the lines of X10 or similar. I'm wondering how responsive it might be. Though if there are AVRs which support it well, I'll definitely look into it.

The main gripe I have with current standards is that they're based on a different sort of control method. They simply send out a message for what the device should do, and it will then do it. I would rather have a set of prearranged "cues" and a simple GO message to make it go to the next cue. With modern LED/DLP based lighting and digital sound equipment, this is entirely possible, but old standards based around analog devices are still being used - even with the limitations that it imposes.

I know of equipment that *does* use the cue-based control methods, but the protocols they use (if any!) are propriatry and closed.

At the moment I'm writing a couple of C++ OpenGL applications to test out the protocol in software. It simply renders a cube with the colour the "light" is set to, and listens using UDP for a change.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

My comment about Cat5 was purly for the architectural lighting. Theatrical lighting is almost always re-pulled to suit the configuration required. Theatrical lighting could benefit from something like ethernet, however more ruggedized connectors will be required... RJ-45 connectors are not designed for too many insertions, and do not handle vibration or stress well. (there are ruggedized versions of the RJ-45 connector, but they tend to be very expensive.)

I wouldn't try to come up with a single solution that works for both situations (architectural vs theatrical), as they are quite different in environment, even though the end action virtually the same.

Writing code is like having sex.... make one little mistake, and you're supporting it for life.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Well, there's no law saying that Ethernet needs to use RJ45's, or any kind of crimp-down connector for that matter. You could very easily use a different sort of connector - the hardware would be the same except for that. (I'm thinking of a cisco switch with 8-pin DIM connectors as well as RJ45 connectors !)

But, that said, I've seen plenty of theatrical applications that use RJ45's and work just fine. As long as you're sensible when you pull the cable in, vibtration, stress and such isn't a problem.

Outdoor applcations might be a little tricky, but there are plenty of solutions to protect delicate kit exposed to the elements.

Architechtureal lighting is, in terms of the actions, is the same as theatrical lighting except slower and is left there for longer - or at least that's how I see it. I've seen lighting companies use the same kit for a theater/event as they do for architechtural installations - albeit temporary ones.

Oh and another nice thing - lights need power right? Why not use an already developed technology, Ethernet over Power, to control them? It'd sure beat the heck out of X10's power line control codes! You could even build it into the light itself ...

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

http://www.avcable.com/Merchant2...

There's an example of "rugged" RJ45 connectors - I've seen these used in a number of stage equipment. It's basically a standard RJ45 connector in a nice, locking, outer enclosure. They're used on CyberHoists, which are fully safety compliant in Europe - so I guess that they'd work just fine :)