The State of the lamp on the machine

Hi ,

Question is:

How can I check state of the lamp on the machine (Lamp voltage is 24 Volt).
It’s teh lamp is On or OFF ? (1 or 0)

I used Nodemcu card and A0 pin is not available

Could you help me regarding Arduino Code and which sensor is suitable.?

Thanks an advance.

amurat:
Hi ,

Question is:

How can I check state of the lamp on the machine (Lamp voltage is 24 Volt).
It’s teh lamp is On or OFF ? (1 or 0)

I used Nodemcu card and A0 pin is not available

Could you help me regarding Arduino Code and which sensor is suitable.?

Thanks an advance.

'Welcome to the Arduino forum. Clarification is necessary. Is the 24 volt measured to machine frame or is there a return wire from the lamp that is connected to machine frame ground? Have you actually measured it so a voltage divider can be used?

Or do you need to fasten a light sensor the light?

How far from the light will you Arduino be? Can you use wires or do you need some other way of monitoring the light?

Paul

Thanks for reply.

the 24 volt measured to machine frame or is there a return wire from the lamp that is connected to machine frame ground? -- lamp that is connected to machine the the lamp voltage is 24 V

How far from the light will you Arduino be? in body on machine.

Can you use wires or do you need some other way of monitoring the light? We need to measure the downtime of machine. when the machine is down the lamp is working. I 'II getting the data to SQL.

Due to in Nodemcu there is one pin of analog and A0 is not avaible - I can not measure it the voltage, I need to find diffrent solution.

Thanks an advance

(deleted)

The common/safe way is with an opto coupler.
Opto transistor between digital input pin and ground, with pull up enabled on the pin.
And the opto LED powered by the voltage across the lightbulb.
1mA opto LED current should already be enough.
Leo..

In this case you don't need an anlog input to read the voltage, as the voltage is either 24V or 0V. That calls for a voltage divider and a digital input.

Otherwise indeed a light sensor such as LDR mounted on top of the existing light. Choose an appropriate pull-up resistor and again you can sense the on/off using a digital pin.

The LDR/phototransistor method has the advantage that it will,tell you the lamp isn’t working - whether it’s turned off or a blown bulb.

You could add voltage sensing on the lamp supply to differentiate between whether the lamp ‘should’ be on, and if the bulb is truly dead.

Thanks for your helps

there are are few ways to think about this.
with power on the lamp, the INTENTION is that the lamp is to be ON
if the lamp is burned out. the power would say it should be on.

another way is to put a sensor on the lamp and see if it really on.

I believe that these are your best choices.

Another way that does not get discussed much is to use an R/C sensor.
the resistor charges the capacitor and then the the capacitor drains.
the frequency is dependent on voltage. this is a rudimentary analog input for a digital only micro-controller.
the pulse frequency represents the voltage.

There are more than a few add-on ADC chips. some with 4 ports and can talk to your micro-controller.

You said that your machine.... if there is power, then there may be a way to monitor the power.
I can tell what my toaster is doing by the pattern of power use.