JizzaDaMan
Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Controlling many lights individually

Tue Aug 20, 2013 11:47 am

I am the lighting technician for a school play this Christmas. My ambitious director told me he wants 200 individually controlled golf ball lights (Yes I know; Ambitious!). He wants various effects like 'explosions' of light from a single point, or a sort of wave of light travelling around the ring of bulbs (I think the lights will be hung from the ceiling in a ring over a circular stage). The type of effects he wants is really neither here nor there however, as once I have them individually controlled, I can program to do what I want.

So I was planning to control them with my raspberry pi, as I can easily program it, and it is nice and small and portable.

Obviously I'll need to multiplex in some form, since the pi obviously can't control each light individually (Plus the obvious weight of the wiring would be rediculous.)

My first thoughts were about the various interfaces on the Pi GPIO, I2C for example. I'm not entirely sure how any of these interfaces work, and I'm not even sure what all of them are, but would any of these be suitable for controlling the 200 lights, and if so, how would I go about it?

After a bit of research I also found out about the CAN bus. Could this possibly work? Again, if so, how would I go about it.

I've already assumed that I'll need a transistor and probably a relay for each light (transistor to control the relay to control the light). Presumably I'll also need some sort of chip with each light to give it it's own ID and to receive data (either from the can bus or directly from the pi) which would then control the transistor.

I wouldn't worry too much about the fact that this will draw enormous power, as it will be in a professional theatre.

The only other consideration is that will ordinary golf ball lights be durable enough to flash quickly?

Thanks for any help, I've tried to make everything as clear as possible, sorry if it's confusing.

JizzaDaMan
Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Re: Controlling many lights individually

Tue Aug 20, 2013 12:13 pm

By the way if any of you guys have any ideas that might work I'd be more than glad to see them :)

User avatar
richiepp
Posts: 129
Joined: Wed Dec 19, 2012 4:56 pm

Re: Controlling many lights individually

Tue Aug 20, 2013 12:20 pm

Not sure what a golf ball light is. I would try to use LEDs as they draw way less power and can be controlled with a transistor, you wouldn't need relays.

Sounds like a fun project.

Good Luck!
Rich

User avatar
redhawk
Posts: 3465
Joined: Sun Mar 04, 2012 2:13 pm
Location: ::1

Re: Controlling many lights individually

Tue Aug 20, 2013 12:32 pm

This is not going to be a easy task, however if I was to control 200 lights digitally I would do it something like this:

The 200 lights be would split into 13 controller boxes with 16 lights per box (roughly 200 / 16).
Each box would have a programmable 16 bit counter so that when a number is stored bit0 or bit1 would represent a light off or light on.
The Pi would need to first connect to the desired controller box and then a new 16bit number is programmed to change the lighting pattern.
As for controlling the lamps themselves relays will work but you could also use opto isolated triac which would be a lot smaller and require less power.

Personally I would start experimenting with building a programmable counter circuit only then will you know whether this project is feasible or not to continue.

Richard S.
Last edited by redhawk on Tue Aug 20, 2013 12:58 pm, edited 2 times in total.

JizzaDaMan
Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Re: Controlling many lights individually

Tue Aug 20, 2013 12:51 pm

richiepp: The director specifically asked for golf ball lamps, I don't think LEDs would have quite the same effect. They're basically just fairly small, rounded, incandescent light bulbs.

redhak:

I didn't think to use a triac, that's definitely a good idea. In fact I think I have a whole bunch of those for which I haven't yet had any use :)

So would I communicate with the controller boxes using an interface like I2C, or via another method? How would I do that?

Also would that mean that from each controller box I would have 16 wires, one for each light? Depending on whether the controller box could be suspended with the lights, I think that may lead to excessive wiring. Also where could I find and buy a controller box?

Those questions answered, that's a good idea :) Thank you :)

PiGraham
Posts: 3568
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Controlling many lights individually

Tue Aug 20, 2013 12:53 pm

Do you need more than LEDs? AdaFruit, and others, have strips of addressable RGB LEDs. Watch out for drive timing requirements. Some may not be directly controllable from RasPi because of tight timing control.

These are strings of shift registers with PWM drive output. To address one LED you write data to them all with the data for the one modified. The electronics for each node is simple and cheap.

You could use 74HCT595 8 bit shift registers. Search the forum for posts on those, and similar.

The standard method on stage is, I believe, to use DMX controllable stage lights. I think DMX is like MIDI, a serial protocol, but aimed at lighting rather than sound. 200 lights is going to be expensive.

I guess that for a school production you have a rather limited budget to buy 200 bright controllable lights.

You could also consider USB relay boards. USB provides an extendible addressable bus. The relay board typically appears as a serial port.

There are lots of 8 channel relay boards out there (e.g. this) which should be viable and will cost about <£5 per channel, including USB hubs & cables, excluding lights and power.

I believe USB 2.0 can support 127 devices, so if we count hubs, and 8 channel relay boards you can have one 7 port hub feeding seven 7 port hubs from each port = 49 ports for relay boards = 392 lights with 57 USB devices.

I don't know if Raspbian=Pi will support 49 serial ports, but you could use more than one Pi.

I would go for the LED strips if possible (bright enough). You could fit split ping-pong balls over the LEDs to make your 'golfball-sized' lights.

JizzaDaMan
Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Re: Controlling many lights individually

Tue Aug 20, 2013 1:34 pm

Thanks for your advice Pigraham. I will talk to the director about the possibility of LEDs with ping pong balls on as it will significantly reduce power, cost, weight, wiring, everything! :D

Let's say I have to use golf ball lights, does this plan sound reasonably feasible?:

From the pi, I control 25 SIPO 8 bit shift registers. I'll connect them in fours (leaving one 8 bit register), effectively giving me spread out 32 bit shift registers (This should keep wiring to a minimum and reduce the number of GPIO pins needed). They can share a clock line, ground line, power line, and latch line. Each of the parallel outputs controls a triac controlling a light.

Alternatively, I could use 16 bit shift registers connected in pairs, which might reduce the work required. (Soldering etc.) All these wires can be really light, except for the power and ground lines for the lights. Also, for powering the chips, would you recommend I use the 5V/3.3V and ground supply from the pi, or should I use the power and ground lines for the lights (I could step down the voltage using a zener diode tied to ground)

JizzaDaMan
Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Re: Controlling many lights individually

Tue Aug 20, 2013 2:03 pm

And considering the vast array, I would probably control each half with one pi each

PiGraham
Posts: 3568
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Controlling many lights individually

Tue Aug 20, 2013 2:28 pm

Your scheme with shift registers and triacs seems reasonable to me (you don;t want to control brightness or colour, just on and off).

If the shift registers are specified to work with 3.3V logic on a 5V supply you can do that, or you can power them from 3.3V. In either case I suggest you use a regulator near each shift register so that you don't have problems with cable voltage drops. Don't use the Pi voltage outputs. Linear regulators would do for those low power chips.

Consider using opto isolators between low voltage and high voltage circuits.

Do you know what you are doing with mains wiring? Wiring regulations may apply. You may need to get the rig inspected by a qualified electrician for public liability and insurance purposes. If you stick to low voltage things should be a bit simpler on that front, but watch out for fire risks!

User avatar
Mortimer
Posts: 923
Joined: Sun Jun 10, 2012 3:57 pm

Re: Controlling many lights individually

Tue Aug 20, 2013 3:12 pm

I would seriously consider the LED route. Without knowing the precise nature of what you are trying to achieve, it would be difficult to be certain, but I would have though LEDs would be bright enough. If it is the shape you are after... ping pong balls! ;)
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

PiGraham
Posts: 3568
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Controlling many lights individually

Tue Aug 20, 2013 3:17 pm

I take it this is to be a lighting on a stage. If the idea is to make a display LEDs would be good enough. If the idea is to illuminate the scene on stage it probably needs more power than can be got with individual LEDs. There are LED stage light, of course, but 200 commercial stage lights of any kind will cost a lot.

AJB2K3
Posts: 215
Joined: Sun Aug 11, 2013 3:25 pm

Re: Controlling many lights individually

Tue Aug 20, 2013 5:33 pm

Why not use something like the Slice of Pi/o using the MCP23017 driver chip?
Each chip communicates over i2c and can be individually addressed and each of its ports can also be accessed !
Back in the old days, we were smarter then the technology.
Nowadays technology makes us look like villages fools in front of the children!

PiGraham
Posts: 3568
Joined: Fri Jun 07, 2013 12:37 pm
Location: Waterlooville

Re: Controlling many lights individually

Tue Aug 20, 2013 6:01 pm

AJB2K3 wrote:Why not use something like the Slice of Pi/o using the MCP23017 driver chip?
Each chip communicates over i2c and can be individually addressed and each of its ports can also be accessed !
A possibility. See here http://www.raspberrypi.org/phpBB3/viewt ... 4&p=157033 for issues of long cables and voltage isolation.

JizzaDaMan
Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Re: Controlling many lights individually

Tue Aug 20, 2013 8:08 pm

A possibility. See here viewtopic.php?t=14524&p=157033 for issues of long cables and voltage isolation
Will I too need protection because of interference? Will opto couplers be sufficient if I do?

waterfield
Posts: 7
Joined: Thu Feb 14, 2013 9:02 am
Location: Cardiff

Re: Controlling many lights individually

Wed Aug 21, 2013 7:18 am

I think I would look at a 'one wire' DS2413 http://www.maximintegrated.com/datashee ... vp/id/4588 or similar there are python libraries out there for 'one wire'

Paul

User avatar
penguintutor
Posts: 376
Joined: Tue May 08, 2012 9:11 am
Location: UK
Contact: Website

Re: Controlling many lights individually

Wed Aug 21, 2013 9:04 am

This is similar in concept to a project I'm working on, but your idea is a bit more ambitious than mine (at least in terms of the number of lights).

My project is using a combination of Arduino and Raspberry Pi - which allows it to run a simple Arduino only mode as well as full computer control running with the Raspberry Pi. It's very much work in progress at the moment and has been for some time.

I am using small PAR16 theatre cans http://www.penguintutor.com/electronics/discolights, but this can be done using other lights as the cans are quite expensive. My first build was based on standard 12V halogen spot lights, but they use quite a bit of power and have a noticeable latency in reaching full brightness so I've now changed to a new design that works using MR16 LED spotlight bulbs. The LED bulbs use less power (hence smaller DC transformer) and are instant so can be used to create a full strobe effect.

It's still work in progress at the moment so I've not updated my project page.

Some of the details:

To increase the number of available ports I'm using 74HC595 shift register. I am just using the 8 outputs, but could use daisy chained shift registers to control lots of lights.

When driving AC halogen bulbs I used the output from the shift register into a MOC3020 opto-isolator driving a BTA16-600b Triac.

Using lower power DC they can be switched through a MOSFET connected to the shift register
eg using IRL520NPBF MOSFETs

I'd be interested in hearing how you get along.
Are you planning to have a sound to light so that the speed of the lights varies when the tempo of the music changes?
I was originally thinking about a hardware driven sound to light, but I'm not sure how well the Arduino would cope with individual interrupts for every beat. I could convert sound to a frequency value (eg. either analogue voltage or digital signal I can read in) - but that won't mean that the lights change on the beat, it will just be at the same freq. So perhaps looking at handling the sound in software on the Pi.

User avatar
sav25
Posts: 364
Joined: Thu Aug 30, 2012 7:18 pm
Location: Southend-on-Sea, Essex, UK
Contact: Website Twitter

Re: Controlling many lights individually

Wed Aug 21, 2013 4:28 pm

Not sure how much this helps but I'm currently doing a blog on I2C controllers...specifically with the Slice of Pi/O as I need more outputs for my project than the Pi can offer.

The Slice uses the MCP23017 chip, offering 16 outputs on its own, and can be daisy chained to more of these chips for even more outputs.

My blog covers how they work, and my second episode is going up tonight/tomorrow:

http://www.averagemanvsraspberrypi.blogspot.com
Averagemaker.com

JizzaDaMan
Posts: 66
Joined: Sun Apr 07, 2013 2:14 pm

Re: Controlling many lights individually

Wed Aug 21, 2013 8:21 pm

Hopefully tomorrow I'll be able to talk to the director. I think I'm going to try and convince him to use LEDs, because looking into it it will be cheaper and a billion times easier :P I looked into the addressable RGB LEDs, and that was getting potentially a bit expensive, although certainly the simplest route should it come to it. At the moment though I'm considering (should the use of LEDs be approved) buying a long chain of super bright white LEDs wired in parallel.

Then using TTL shift registers I could drive the LEDs directly, using the power supply (for the LEDs) to supply the chips and using the power supply ground to ground the chips and LEDs. That way requires comparatively little soldering and I think I could keep the cost down to around £200 as opposed to £350 for the addressable LEDs.

DaveTheWalker
Posts: 36
Joined: Wed Jul 04, 2012 9:06 pm

Re: Controlling many lights individually

Thu Aug 22, 2013 7:15 am

Something like this might come in handy:

http://www.adafruit.com/products/1378

It seems that controlling LEDs is a common task. These chips require a stable clock source, so offloading some of the control to an Arduino might be a way forward, but you could still use to Pi to oversee the whole job and send out the right patterns to the right strings of lights.

Dave

edit: typo

Twinkletoes
Posts: 210
Joined: Fri May 25, 2012 9:44 pm

Re: Controlling many lights individually

Thu Aug 22, 2013 8:42 am

You'd need 1W LEDs to be visible in anything other than blackout conditions.

User avatar
Mortimer
Posts: 923
Joined: Sun Jun 10, 2012 3:57 pm

Re: Controlling many lights individually

Thu Aug 22, 2013 9:32 am

Twinkletoes wrote:You'd need 1W LEDs to be visible in anything other than blackout conditions.
Eh!? Better tell the chaps that make those daylight visible LED announcement signs at bus stops, or the station annunciator boards on railway platforms. No way they use 1W LEDs!
--------------
The purpose of a little toe is to ensure you keep your furniture in the right place.

Return to “Other projects”