Using AC switched outlet to determine Receiver on/off state


i have uno r3 , old yamaha audio receiver.  receiver has ac outlet on powers when turn on receiver (i.e., "switched" outlet).

i want plug 5v "wall wart" switched outlet , pin in directly uno.  positive lead wall wart go pin 8 on uno , negative gnd on uno.

of course specify "pinmode(onoffstate,input);"

my question is:  resistors necessary arrangement?  there easier way?

thank you.

rusty

just sure arduino's input pin doesn't "float-up" when power supply off, i'd add resistor in parallel power supply's output.   but, depending on power supply's design, may not necessary.   a resistor discharge power supply's capacitors 5v doesn't remain long after power turned-off.    (i'm thinking 1k - 10k).

make sure wall wart regulated (most 5v power supplies are).  if it's not regulated, go on 5v light load , damage arduino.

if me, i'd use relay (with coil rated power line voltage).    but, i'd have "package" thing idea simpler.  (and, simple!)


Arduino Forum > Using Arduino > Project Guidance > Using AC switched outlet to determine Receiver on/off state


arduino

Comments