Wanting to start a project - RGB LED Ethernet Controller

Discussion to talk about hardware related topics only.
Post Reply
mattchristenson
Posts: 2
Joined: Fri May 22, 2009 6:21 pm

Wanting to start a project - RGB LED Ethernet Controller

Post by mattchristenson »

I am doing some initial research into creating some computer controlled lighting for my house. I will be working with Red / Blue / Green LEDs and will have a number of different "circuits" that would be controlled independantly via computer.

Because many lights will be in different areas of the house, I want the control to be ethernet based. I have found many plans for a CMOS Serial RGB controller. Here is just one of them: http://www.rgbled.org/RGBLED/index.html

I want to create an ethernet interface where I connect to an IP on a certain port, and send blocks of bytes that get sent to the serial device which controls the LEDs...

I want to try to keep the cost of these as low as possible, as while I'll only be starting out with 4, after I've written the control software I may be creating 10+ of them for some cool effects.

I have not been in the electronics world for 10 years. I am a software developer by trade and have done a lot of medium to high level programming in a dozen plus languages. This is a hobby project to challenge my mind a bit...

I am trying to figure out which of the NetBurner boards I should look into using for my project... Do I want an ethernet to serial board, and if so - which one... or would it be better to skip the serial portion and get an ethernet board with a programmable chip that can output the pulse-width-modified output to each of the 3 LED color channels?

If one of these boards can be programmed to do what I'm looking for - what about a board that would support 6, 9, or more (multiples of three) color channels so that multiple lights could be controlled thought the same circuits?

Any advice would be greatly apprectated. I plan on blogging about the entire project and I'll be sure to mention you and any email/url that you ask to be named in the online blog when it's finished.

Thanks!

Matt
User avatar
Chris Ruff
Posts: 222
Joined: Thu Apr 24, 2008 4:09 pm
Location: topsail island, nc
Contact:

Re: Wanting to start a project - RGB LED Ethernet Controller

Post by Chris Ruff »

Matt:

Are you gonna run wires? Do you want to go wireless? Do you want to go carrier current (X-10,etc.)?

One way would be carrier current. A little wierd, since the dimmer modules expect a load, but maybe you can get them to work if you use a load resistor or enough LEDs or...You would need to get a carrier current transmitter that you can talk to using RS-232 to control the devices. This would be NB5272EX to RS232 to the module

A hard wired way is to use an NB module, say the MOD5270 module, connect the lower datalines on the interface connector to a few ULN2003 darlington driver chips (pins 1-7), drive the pins with code like this:

// drive the pin high
sim.gpio.ppdsdr_datal |= 0x40;

// drive the pin low
sim.gpio.podr_datal &= ~0x40;

and you can run the ULN2003 open collector outputs all over the place to drive current limited LED (say, 120 ohms at 5V) cathodes and the anodes to 5V. You can also run the LEDs at the 20 volts from the power supply XFMR with a bigger resistor. Calculate LED loads at 10-20mA and the formula is volts = current x resistance. or 250 ohms = 5.0 volts / .02 amps.


The wireless method would require somebody's RF modules, they are all over the place, see Circuit Cellar mag. You would use the NB module to go from ethernet to serial to the module


..


You can chain LEDs in series with one current resistor, but each LED eats up maybe 1-2 volts, depending. That is how the LED christmas chains can be so long and series connected, 120 volts can support tens of them in series.

Chris
Real Programmers don't comment their code. If it was hard to write, it should be hard to understand
User avatar
lgitlitz
Posts: 331
Joined: Wed Apr 23, 2008 11:43 am
Location: San Diego, CA
Contact:

Re: Wanting to start a project - RGB LED Ethernet Controller

Post by lgitlitz »

Hi,

There are a few options... The first thing you need to figure out is how you want to send data to the RGB devices. It sounds like you want each RGB to be on your Ethernet network. I would then probably go with a MOD5270LC kit, it is cheap ($99) plus it has a ton of I/O available. If you want an enclosed box you might want to look at the PK70. The PK70 is nice because it allows you half the box to put in your own hardware, such as your LED drivers and your possible RGB controller.

If you plan on running wires to communicate between the RGB controllers then you only need a single NetBurner, a MOD5270 or enclosed SB72-EX will work for you. I would use RS-484 as the communication between your RGB circuits. This is a mulit-point serial protocol that runs off the UARTs and can travel pretty long distances. This would be the method to use if each node is very power sensitive. A MOD5270 running Ethernet draws about 250mA@3.3V, a MOD5213 would be less then 100mA, a tiny 8-bit controller will be in the uA range. <1Watt is still pretty good power consumption for a fast embedded network controller like the MOD5270 but I would go 8-bit if you need battery powered nodes. Your LEDs will then be the largest consumer of the power.

If you want all your nodes to be wireless you can make a zigbee network and have a NetBurner as your main zigbee controller. This will be the lowest power solution for your wireless nodes, it might also allow you to use battery power on nodes. One of our customers offers an internal add-on blade board for the PK70 that will do Zigbee:
http://g-centric.com/gstore/gstore.html#
If power is not an issue then you can stick with the NetBurner at each node and use a WiFi client addapter for nodes that are not near your wired network. These are cheap (http://www.newegg.com/Product/Product.a ... 6817201523
http://www.newegg.com/Product/Product.a ... 6833124256) but do require a bunch more power then a Zigbee node.

If you plan on having a NetBurner at each node then you need to decide whether you want to design the RGB controller separately or code it into the NetBurner. You can use a single hardware timer on the NetBurner to generate an interrupt on a constant interval. Then software in your interrupt can generate a software PWM on as many IO as you need, 47 signals on the MOD5270. This will still require some circuitry to drive your LEDs and also will limit your PWM resolution since it is a software based PWM. You should be able if get at least 5KHz resolution with little effect on Ethernet performance if you code this correctly using level 7 interrupts. You could also get an RGB controller to connect to the NetBurner, this will handle the PWM and the LED drivers. There are a ton of these types of ICs available, here is one:
http://www.national.com/pf/LP/LP55281.html
This will free you from the low level RGB code development, plus you wont need to find separate LED drivers.

If you want a simple device that just allows a network connection and converts this to serial look at the SB product line. The non-development kits for these products have a built in firmware that makes serial to Ethernet pretty simple. All configurations are done via a web gui. The newest addition to this product line is very cost competitive and will probably work in this type of application:
http://www.netburner.com/products/seria ... sbl2e.html

-Larry
mattchristenson
Posts: 2
Joined: Fri May 22, 2009 6:21 pm

Re: Wanting to start a project - RGB LED Ethernet Controller

Post by mattchristenson »

Thanks for the help everyone!

To answer a few questions:

I will be using Ethernet because in some cases the control will come over an 802.11bg network, and maybe even over broadband internet. One use that I am considering is a Christmas lighting controller where I could choreograph house lighting effects to music between multiple houses… in this case either wireless or internet connectivity would be used to send instructions to each device via TCP/IP… I don’t know that I would ever actually use these to this degree… maybe if I win the lottery… but in the meantime my design requirement is that each node only needs to be provided with wired 110 VAC, and an Ethernet connection, which may be coming from an 802.11bg bridge. I will never need any battery powered nodes.

As far as the PWM goes, I had planned on generating this with software. You mentioned PWM resolution limitations when using software… I had planned on my resolution to be 256 brightness levels for each color… at what point do you think that I might run into limitations using software to generate PWM?

I think that I am leaning on trying to use the sbl2e solution that you mentioned… at $30 for the Ethernet to Serial logic… This way after adding in a project box, the Serial RGB LED Controller, and connectors… I may still be under the $60 per unit price range. The lower I can get the cost for each unit the more I can afford to make!
I am trying to talk a couple of friends into investing as well… Maybe making a website where you can upload songs and manually created “Light instruction files” to playback on a variety of light controlled networks. I could handle the website software no problem… It’s the electronics side that I’m going to be a little challenged at (ads to the fun). Or even piggy back off of some mp3 players visualization software engines to create effects that alter lighting automatically to the tempo, beats, and frequency ranges of sound inputs…
Post Reply