Sense a light signal

Hello all…

I have been tasked with creating a “thing” that will sense when a light is turned on. Upon the light coming on I want to simply run a web page.

Wires currently run from a unit to a light. The unit makes the light come on at times. I want to come off of the 2 wires running to the light and hit a web page when a signal is detected.

The web page, as an FYI, will either sent text or emails.

I have never worked with an Arduino. Which package from Amazon would I want to obtain to do this?

Thank you!

First things first: what’s in the wires?

What voltage and is it AC or DC?

If it’s mains, step away. And I don’t mean from the wires (well I do actually) but from the project. (Or sense the light by means other than “come off the 2 wires”)

neiklot... I don't understand "what's in the wires" or "If it's mains". The current sensor, home grown, is powered via AC.

I meant is the light say 5V hobby kind of stuff or 220V lethal municipal supply.

You have a -lot- to learn yet have a home-made AC sensor?

The Arduino site has a lot of learning material to go over. Where you don't understand terms, that is your signal to study into what you don't know until you do before going forward.

flame sensor, eBay, chump change
photocell, eBay, Radio Shack - chump change

Turns out that the sensor is 24 v DC

classnet:
Turns out that the sensor is 24 v DC

Then you can opto-couple it to an Arduino.

Your 24V in on the left, right hand side arrow to an Arduino input with pullup to 5V enabled.

classnet:
Turns out that the sensor is 24 v DC

24V DC what?

24V DC operating? 24V DC detecting? 24V DC output?

You know for 10 cents or less you can get a light sensor that wires direct to Arduino?

neiklot:
Your 24V in on the left, right hand side arrow to an Arduino input with pullup to 5V enabled.

With INPUT_PULLUP enabled the 10k pull-up is unnecessary and the input resistor can be 10k instead.

Note the left hand ground is not ground, but the negative wire of the lamp otherwise isolation is meaningless. 24 V sounds unusual for a LED table lamp - all the ones I have here are 12 V.

Hi All,
Can we use a photocell to sense the brightness of the light?
What if the power is switched on but the bulb is burned out?
I thought the question was "Is the light on or off?"
Herb

herbschwarz:
Can we use a photocell to sense the brightness of the light?
What if the power is switched on but the bulb is burned out?
I thought the question was "Is the light on or off?"

And all that is true except that the OP does say:

classnet:
Wires currently run from a unit to a light. The unit makes the light come on at times. I want to come off of the 2 wires running to the light and hit a web page when a signal is detected.

So rather than the obvious application of a LDR, we have followed his wishes and discussed the optocoupler. :sunglasses:

Now if you used a LDR. you would have to shield it from the ambient light to avoid false sensing. You would basically have to mount it within the light fixture itself.

24 V does sound like a LED luminaire. LEDs in this application are not supposed to burn out, so this was probably not part of the initial concern. :grinning:

Paul__B:
With INPUT_PULLUP enabled the 10k pull-up is unnecessary and the input resistor can be 10k instead.

Note the left hand ground is not ground, but the negative wire of the lamp otherwise isolation is meaningless.

Here's a new pic that shows all that:

4n25 isolation.GIF

4n25 isolation.GIF