Automated LED for shop

Also do I need one Arduino for each light or is thee a way to run 16 lights individually from one Arduino? Seems like the biggest issue is the high power requirements.

You need an Arduino at every light.

Controlling leds with PWM can be done with a logic level power mosfet.
The problem is the power supply for the leds. They should be able to handle the PWM signal, and I don'w know if led drivers can do that.

I see this scenario: Everything seems to work so well that the lamps are mass produced and are selling good. When it is dark a person is in the shop, and the lights near him or her are on. That person uses a flashlight and switched it shortly on towards the lights above him or her. Those lights will dim, causing the lights further away in the shop to turn on. This starts a never ending wave of oscillation lights across the whole town.

Yes interior light sensing is more challenging. I was hoping to be able to do something like the following

If presence detected in direct area light set to 35 lumens per SF (or adjustable)
If presence detected in another zone but not this zone dim to 20 lumens per SF
If no presence detected in all areas all lights off

I will have a few zonal areas like the main shop the paint booth, the shipping department and other areas. So I will need to program say 5 zones with similar functionality but not interdependence. In other words if no presence detected in the paint booth all lights off in the paint booth, regardless if all sensors detect people in all other zones.

I hope to be able to find light sensors that can detect specific light values and control the lighting dependent on that... otherwise I will not be able to control lighting dynamically. As you mentioned normal light sensors sold in hardware stores turn on or off lights at a dusk like setting so the lights turn on then the sensor sees the light bouncing off the walls and turn off the light, then the sensors see that there is no light and it turns on the light and so on. I was at a store when a customer was arguing an employee about how the lights with a photocell should work inside because it works outside, it actually got heated bless the employee for his efforts but the customer just did not get that the light bounces around inside and outside it does not (laymen explanation).

So the big questions;
Which sensors give a specific value of light input to the Arduino board
How do you control a single 34V 1.6A led with dimming capabilities (or without for that matter)

How do you program this functionality.

If you want to compensate for ambient light, you are making an oscillator. Because the ambient light is also the light of the nearby lamp.

Take a look at the ABC guide, http://www.pighixxx.com/abc-arduino-basic-connections/
For example the mosfet on the bottom-left of "Card 3". Click on "Set 1 (Card 1,2,3)" to open the pdf.

This is a mosfet that can switch it, N-Channel MOSFET 60V 30A - COM-10213 - SparkFun Electronics
Never mind that it is able to switch 30A. A mosfet of 30A is perfect to switch 1.6A.

There are so many light sensors.
You could connect an LDR and a resistor to an Arduino analog input (ABC guide, card 1, lower-right), 20 for 2 dollars on Ebay.
Or photodiode, 2 dollars on Ebay.
Or an expensive lux sensor.

For programming, start with the examples that come with the Arduino IDE.

How do you want to detect if a person is present ?
A PIR sensor only senses motion.
Perhaps ultrasonic ? But what if someone places a tall box under a lamp ?

Thank you for the link I will need to study that for a bit.

As you can tell I am trying to learn all of this so thank you very much for taking your time and hopefully in time I will get it all.

Honestly I still do not understand how to control the MOFSET from the Arduino and or how to wire it all up but given the correct layout I can solder like a mad man. I have tried projects for years now and I am getting better.

I am thinking of using this Light to Frequency Converter - TSL235R - SEN-09768 - SparkFun Electronics to sense the light it seems to have good control and variability.

So the Arduino can control many outputs, why can I not use one board, control 16 lights, have 16 photo sensors and, some number of proximity sensors?

New construction so wiring is not a big deal.

Sure, that is possible.
The wiring (and the costs to put them in place) could be more expensive than the Arduinos.
With long wires, the Arduino must have more protection against electrical spikes. Perhaps even optocouplers.

If you have a working module, you can make 16 of them. That is not hard.
An Arduino Pro Mini clone costs about 5 dollars on Ebay.
Making the modules to talk with each other, increases the complexity a lot.

On the other hand, having a single unit, will make it a lot easier to take all light sensors into account.
There is not need for the modules to talk with each other, since you have all the information in one Arduino.

I'm still curious, what kind of proximity sensors ?

Sorry I thought I had the link for the PIR sensor

that is just one option.

I was seeing the Arduino boards for around $25 so that is one of the reasons I was looking to reduce the number of boards. Realistically I am doing my own wiring and wire is not that expensive especially when you consider that the shop is only around 2,500 SF so even the farthest out light is only around 60 feet away (at most). I already have tons of cat5e wire which should work for data, power conversion can be done at the light.

Yes I am scared at how I am going to get 16 Arduino boards talk and listen to each other. I was thinking that was going to be the Xbee, but again I am adding cost.

After more research I am beginning to understand the use and need for the MOFSET to translate the power from the Arduino to my power supply

But still need to verify NPN or PNP for these LED's

Are you going to put the mains voltage on a cat5 cable ? I would not recommend it.

If you choose the "Light to Frequency Converter - TSL235R", you have to measure the frequency. Perhaps there is a library for that. I don't know if the frequency signal will work with the cat5 cable.

For a mosfet, most of the time a N-channel mosfet is used.
But I don't know if the led driver is capable to be used with a PWM driven load.

For a 50W led, you need a big heatsink, perhaps even a fan.
The lower the temperature of the led, the longer it lasts.
I have a led like that, but only 10W. My heatsink turned out to be too small, so I had to lower it to 5W. I read that reducing the current to half of the maximum only lowers the light intensity by 20% or 30% or so, and the led will last longer. But I can't find it right now.

A PIR sensor detects motion. If someone stands still the lights will turn off.

No only data on the Cat5 not Power.

I am thinking of the power supply at each light one Arduino board near the main entrance to the building and multiple sensors around the building.

For the UI maybe a touch pad? Smartphone? ideas?

Yes you need a HUGE active heatsink meaning a cooling fan nad large block of aluminum/ copper for these led's

Um, well there are products that can help with that...

http://arduino.cc/forum/index.php/topic,160613.0.html

So the CATkit is a shield which distributes 18 data channels over CAT5 cable. Each signal can be used for a sensor, an actuator or another device such as an LCD display. This would be very appropriate for your project with a PIR sensor and a relay board controlled by a remote Arduino for example. Local power would be provided by AC or battery to the relay and lighting of course.

(usual disclaimer - I am associated with SmartGreenHouse.org)

Thank you for the heads up on that, it is an interesting option!

Well I ordered the LED and Driver for one test. I will get that going and then try to add functionality.

rbelshee:
If no presence detected in all areas all lights off

You're happily working at your table saw. Unfortunately the nearby motion sensor has been covered in saw dust. The system does not detect any motion and turns off the lights. Plop. Your severed hand falls to the floor.

In a shop, a human brain needs to be responsible for turning off the lights.

Good point so table saws in the shop LOL

I see your point, what I do creates a ton of dust not sawdust but concrete dust the kind that destroys everything and gets everywhere.

I was also thinking of some sort of RFID access and sensors... BUT all that does add to the cost and complexity and in the end I may just have switches. I still would like to be able to individually dim and control each light as opposed to all on one switch.

The other reason I liked the presence sensing options is that I do not need to coat the switches with concrete each time I try to control something.

That makes sense.
Whatever it will turn out to be, you can control the lights from one central location.
If you make the lights with light sensors (I would choose ldr) and motion detectors, you can make the central unit as complex or as simple as you would like.

You could add a current clamp over the mains wire, to see if any electrical machine is on.
Adding a remote control would be nice.
And sending a detection alert to a sms or website, as a burglar alert.

I guess I need to get a board and start playing. Given the possible scenarios can you suggest which model to use? Other thoughts on the CatKit?

Im using a CAt kit and kitten board to run high power LED lights in my greenhouses, The distance from the leonardo is about 25Metres. It really made setting up the system simple and it has been reliable. Im a fan- (it runs fans too on some of the other pins)

rbelshee:
Other thoughts on the CatKit?

I got a CATkit and 3 kittens 3 weeks ago. Connecting everything was a breeze. The Arduino itself sits in my office with the CATkit shield attached. I'm running 30ft and 75ft CAT5 cables out to 2 kittens with sensors along a busy traffic lane in the warehouse to the loading doors. These are connected to a kitten each with a 4 channel relay that hooks to a mains powered LED light bar. I suppose plugging PIR sensors into kittens to control the the light relay would be the same idea. These are currently running on the digital pins monitoring traffic and the door activity - when a door is opened (contact switch) I sound a piezo buzzer and turn on the loading bay lights. The third kitten is running an LCD display showing the door open/closed status. This uses SPI over the analog pins.

The CATkit was pretty easy to put together and the pins were straightforward to work with. The other option I was considering to assemble the whole system was wireless, but the CATkit did the job for much cheaper and connectivity/distance/interference hasn't been an issue yet. I've got room on the kittens and plans to get creative and start adding automatic PIR light controllers for the rest of the warehouse. The intention behind this is to turn off the lights when they are not needed in the rest of the warehouse. Its been a neat project and I'm hooked on the arduino now! Looks like I need to upgrade to a Mega soon.