130v AC as digital input

hello. I have a machine with 130v bulb on it which lights up when machine is running. I'd like to monitor of it's status by wiring it to arduino digital inputs. can I use ac-dc adapter to reduce voltage to 5v and wire positive terminal to one digital input and the negative terminal to arduino's ground. I don't want to fry my setup.

Point a photo diode at the light. When the light lights the photo diode detects and sends signal to Arduino. No need to connect 100's of volts to a thingy to reduce it to Arduino size.

Idahowalker:
Point a photo diode at the light. When the light lights the photo diode detects and sends signal to Arduino. No need to connect 100's of volts to a thingy to reduce it to Arduino size.

Yes my first thought was that, I tried that but lightsource has 360 degree transparent glass on it and photo diode confuses when all the lights are on in the area. we need to see that light also so no way to cover it to protect from other light sources.

kowalski_61:
hello. I have a machine with 130v bulb on it which lights up when machine is running. I'd like to monitor of it's status by wiring it to arduino digital inputs. can I use ac-dc adapter to reduce voltage to 5v and wire positive terminal to one digital input and the negative terminal to arduino's ground. I don't want to fry my setup.

That will work if you are REALLY SURE the voltage never goes over 5 volts. Otherwise it will fry.
Paul

A shied over the photo detector that allows only the light from the bulb to reach the detector.

A shied over the phot detector that allows only the light from the bulb to reach the detector.

I agree. A photo sensor over the bulb is the safest way to monitor it.

I would say an opto-coupler.

raschemmel:
I agree. A photo sensor over the bulb is the safest way to monitor it.

There are also acrylic light pipes that can be used.
Paul

This application note from Microchip describes how to read an AC mains signal directly with a digital input, using only series resistors to limit the current into the 328’s protection diodes.

Or maybe using a 130Vac relay connected in parallel to the lamp then sense its switched contact with an Auìrduino digital port.
Bye

Professor_Chaos:
This application note from Microchip describes how to read an AC mains signal directly with a digital input, using only series resistors to limit the current into the 328's protection diodes.

But essentially, totally irrelevant to this discussion.

Why?

Because that would require that the Arduino be part of the equipment connected to the power mains and in a double-insulated housing with no outside connections.


The danger of using a power supply as the monitor is that it may provide power when the primary Arduino power is turned off.

Can't find a ready-built module which would be nice, but a PC814 - AC - optocoupler is the most practical way. Mind you, the suitably shrouded LDR and possible light pipe is a pretty good approach too. Connect between a digital or analog input and ground using pinMode of INPUT_PULLUP.

thank you all. I think I’m going to try to use a 130v AC to 5V dc adaptor to power 5v dc relay and use relay’s ac output as dc switch for arduino’s digital input (so basically arduio gets pin power from itself, I believe ac switch can act as low power dc switch). so a voltage increase or powered off arduino can’t be damaged. what is the proper way to feed digital input on arduio?

You could also use the optoisolated approach.
Pin 6 connects to an input with pullup resistor turned on, goes Low when there is good AC across pins 1 and 4. Be sure to use the current limit resistors so you don't blow up the internal LEDs the AC goes across.
https://www.mouser.com/Optoelectronics/Optocouplers-Photocouplers/Logic-Output-Optocouplers/_/N-6x5jnZ1yzvvqx?Keyword=HCPL-3700&FS=True&bws=1

See page 5, 6 and figures 8-9-10 of the application note for more details.

HCPL-3700 Avago Application Note.pdf (130 KB)

I have a FOD814A300 in series with 120k to sense my furnace burner blower motor. They are simple and work great.

The output can go directly into a digital input (with the pull up enabled)

You'll need a cap on the output so the output doesn't go low every 120 hz a 0.1 should do it.

Note this opto has an input setup for A/C. with the two input diodes the output is nearly the whole cycle.

Just connect a relay to the lamps supply and use the contacts .

hello. I'd like to know what is the best approach to determine blinking led as input to arduino. I have a machine has a bulb on it, when it is working bulb is continuously turned on, when it is not working bulb starts to blink. so what should I consider to get correct status of the machine?

Does this differ from https://forum.arduino.cc/index.php?topic=727749.0 ?

Another LED?

The relay turn on time is probably the same as the ac period.

Does this differ from https://forum.arduino.cc/index.php?topic=727749.0 ?

@ kowalaski_61
Are you saying that you can now reliably detect the light on or off using some method developed from the original post, but you now need to detect blinking?

If so, please let us know your current hardware and the program to read it?