How do I... Power Relay for Lights?

What’s the cheapest+easiest way to setup a power relay controlled by vvvv? Specifically, to control 4 lights. I want to use a video camera to capture 4 images of a person’s face when I click the capture bang. The lights are positioned north,south,east,west of his/her head and with each picture a different light is on. Then the images will be combined to create a normal-map of the face.

I think that the brightness of the lights shouldn’t matter much, a small flashlight would be sufficient.

I would interface with an arduino. Since arduino is 5v, you might have to use a small relay to flip a bigger realy… The arduino can only flip a 5v relay so use a 12v spst relay that flips at 5v, the 12v come from 12v power supply and is also used to flip your bigger relay. You can also power your arduino from the 12v middleman board, just bump it down a bit to what arduino like to eat (5-9v 2000mA).

And control with arduino node. (or rs232 node if you has that kind of serial instead of USB)

Hmmm i was asking for an easy way to do this. You might as well be speaking in hieroglyphics (ok technically that might be impossible but you get the point). I don’t know anything about the arduino other than it’s a micro-controller board. I don’t know much about electricity. Really, you’re talking to an infant here, please be gentle.

I was thinking more a plug-n-play solution, like this?..

… really I don’t understand that either but it seems like it would be easier/cheaper than using one relay to flip another relay.

maybe go with dmx, it is supported by vvvv.

think something like this:

then there are adapters an ddrivers to connect via usb and control from within vvv.
have seen this really working with vvvv:

really interesting project, can you tell more about this?

Thanks mysterious guest, I already have the entec usb>dmx interface and the chauvet dimmer/relay you linked to in a different installation. Actually I was looking for a simpler solution that would only require one device, but so far it’s looking more like your suggestion is the way to go.

As far as the project goes, it’s pretty straight-forward. You can easily create a normal map from 4 photos, the technique is described here…

The generation of the map itself can actually be performed in an HLSL shader in vvvv quite easily…

Then I will use the normal map on my projector-mapped wall to make it look like the person’s face is literally coming out of the wall (keep in mind I’m only using the normal map to effect the geometry, I’m not actually using a picture of the face itself). The one missing piece (the reason for this post) is the ability to have a permanent installation where someone can stand in front of the camera for a moment and then have their face appear on the wall.

you could use a DMX dimmer/relay, its just more expensive than DIY solutions. I have used these relays/boards a bunch in the past: -the board and instructions (you can splice directly into a lamp power cord instead of making a plug in box…) --the relay

just run wire from digital pins to relays, and connect a common ground. You can splice into existing extension cords or lamp chords to control the power to them. I would say around $30 in parts (assuming you have a few arduinos lying around your house like I do) and the cost of 4 incandescent lamps. (dont try to get near the 30a load of the relay on that board, the board will melt around 4 amps (one light shouldn’t do that unless its a 1000w HID);)

Arduinos are lots of fun. Follow the blinky lights… use the 'duino

There are also plenty of rs232 controlled relay boards out there. Just use a USB-rs232 dongle to send commands and the board will have a logic chip to read commands and flip relays. You will need another power source for that (~12v)(arduino would need power too so you are looking at adding another wallwort/transformer somewhere…)
If you pick up USB, make sure it has drivers that work with your system (newer than XP, x64,etc…)

The use one to switch a bigger one sometimes needs to be done from a microcontroller (and optoIsolaters betweeen the two). I built a 450A breaker box control unit a few months ago with beagleboard and arduino so it’s still fresh in my head.

Thanks for the details d00gie I would like to do something with the arduino in the future. However since I don’t have any laying around right now, the $100 DMX-4 seems like the cheapest solution.

oh, ok.
thanks for the explanation and the link.
have seen such methods to create
such maps in 3d programs only. really interesting,
never thought of normal light and postprocess in PS.
what about taking it further and processing
it in realtime? i mean a 120 fps camera like ps3eye
with the shutter controlled in sync with the four lightsources?
would mean 30 fps realtime map? would that be possible?

there are cheapest solution at and you may find dmx relay card around 100$ doing 12 outputs on off…

Creating the map in realtime in vvvv would be easy. The tricky part would be controlling the lights themselves and the true frame rate of the camera. I doubt that normal incandescent lights would flash that fast. But then if the lights were flashing that fast I wonder if you’d end up giving people seizures.

But then maybe there’s a simpler way to do real time, I actually wonder if this is possible…
4 lights, each a different color, and they are always on (not flashing on/off). A single image is separated into 4 images by filtering out 3 of the colors at a time, 4 times. So you end of with 4 images which can then be recombined to produce the normal map. This process of 1 image >> 4 images >> 1 image (normal map) could be performed in realtime in an HLSL shader in vvvv. I have no idea if this would actually work, or how well. It’s just a theory.

very interesting on this topic is a polarized light approach:
Thesis PDF:

hi gilbi,
honestly, you should think of LEDs if you want to work real time, to avoid latencies of bulbs.

main trouble will be to setu up frequencies of the LEDS and shutter speed of the camera, but this doeable.

from some essais, i can say that you should look at arduino because it can be more speed than a relay card.

wasn’t there a node for controlling this cheap relais board?

damn, i double posted… :|

other question if in real time: why flashing ? maybe IR light and good filters could do it ?

Hi gilbi , i have many diferente relay solutions already tested and working with arduino , as many relays i tried in the past with arduino were not working properly due to arduino power so end up using transitor etc ,

other option if you do not really need 220volts it is using mosfets which are much much quicker than Relays and you can control up to VCC: 10~100V DC .

I have a little arduino sensor shop ,that is why i have those things still not online hope it will be one day soon ;D

just Pm or skype me if you need anything or further help with it .

i attached some picture examples .


upps no picture i upload again

i did an arduino-relais circuit a few months ago and it worked wonderfully. i used these relais (quite cheap) and this chip to drive them with an additional power source.

quite a cheap solution but probably nothing for you, as some soldering is required and you have never done something like this before. also, always be VERY careful when dealing with high currents…

and it really pays to get dirty with electronics at some point. the options you get as soon as you figured out some stuff are huge!

while i totally endorse the above statement, i’d also strongly recommend something with a little less current for starters… ;)

What is the best way to “get dirty with electronics at some point” for a total newb ?