- without isolation, you will BLOW STUFF UP. lots of stuff. It’s dangerous too. Use an optocoupler to provide isolation. Just google H11AA1 and you'll find more than you need. Typical circuit looks like this (with the input resistors at 15k each for 120v)
- the opto can provide the on and off data points as any time the ac power on the input side reaches zero volts, you get a pulse on the output side which feeds the Arduino.
