Using arduino to monitor external power supply

I would like to use arduino to monitor a piece of equipment as to whether it is powered on or off
i have 3 voltages to choose from

120 VAC (would rather not use since the end users kill themselfs hooking it up with power on)

13vdc
24vdc

i figure if i can connect the arduino to either the 13vdc or the 24vdc (with protection circuitry) but i am not sure what the circuitry should be.

basically i want arduino to tell me if there is or is not power. i know how to code it just not wire it
i will be using an UNO R3
the second part of this is as follows

i can turn on power to these devices with a momentary switch (momentary-off-momentary)
there are two additoanl leads , one to each side of switch that can be connected to an external device to also power on or off device i have tested and touching the leads to the chasis ground will activate to power on and off

so it works like follows
switch momentary press to on will turn on machine
switch momentary press to off will turn off machine
lead 1 (connected to ON side of switch) touched to ground and removed will turn on machine
lead 2 (connected to OFF side of switch) touched to ground and removed will turn off machine
what i want to do is connect these leads to an UNO and be able to turn on and off the machine via program ( a pulse to the correspnding lead)

once both of these are connected to the UNO i can have the UNO attempt to power on the machine if it detects it as turned off, and can also via software force a turnoff remotely if an emergency arises

I'm a little bit confused about your description of momentary switches being pressed on and pressed off - that sounds to me more like a latching switch - but I assume you are OK with that part of the problem anyway.

I also assume that your Arduino has a power source independent from the device you're planning to monitor.

If you can connect your Arduino power source ground to the ground of your device power source, then you can use a pair of resistors as a voltage divider to bring one of the DC voltage sources down to the 0 - 5V range that the Arduino can measure.

Note that you would need to understand the electrics of all your power sources to understand whether the grounds were already connected, or whether it was safe to connect them together. If the circuits are such that the two grounds are at different potentials, then connecting them together would be a very bad idea. In that case you would need to provide an isolated connection to the Arduino - you could either use an optoisolator, or just a relay.

PeterH:
I'm a little bit confused about your description of momentary switches being pressed on and pressed off - that sounds to me more like a latching switch - but I assume you are OK with that part of the problem anyway.

I also assume that your Arduino has a power source independent from the device you're planning to monitor.

If you can connect your Arduino power source ground to the ground of your device power source, then you can use a pair of resistors as a voltage divider to bring one of the DC voltage sources down to the 0 - 5V range that the Arduino can measure.

Note that you would need to understand the electrics of all your power sources to understand whether the grounds were already connected, or whether it was safe to connect them together. If the circuits are such that the two grounds are at different potentials, then connecting them together would be a very bad idea. In that case you would need to provide an isolated connection to the Arduino - you could either use an optoisolator, or just a relay.

the switch is tied to a latching relay to turn on the machine. that way if power is lost to machine it will return to the state it was in when power was lost (on or off)

the arduino uses a separate power source than the machine. the relay to power on device also uses separate power source but I can use the same source (9vdc) so that the ground will be the same for the power on/off.

since the power switch that activates the relay is connected to chasis ground, and AC coming to machine is also connected to chassis ground. (and with power off and testing with a meter ut aooears grounds are all tied together.

itss been awhile since i did my basic electricity and electronics(1984) so i will need to read up on a voltage divider with the resistors