@rocketbay001
I did a project to monitor AC and frequency using the Ardiuno. My technique is a bit "different" Check here in the tread. -->
http://arduino.cc/forum/index.php/topic,93205.0.html 1. I did look at the link James C45 give you. I simply don't like the circuit. Look simple... yes... Is it going to work ? That, I simply don't know. I did not test the circuit, yet ... And with no protection - like a zener diode at the analog input to make sure it is not going over 5 V or under 0.
2. I build my monitor using a transformer to reduce the volatge input. ( my circuit use about 10 Vac at the secondary ), you can use a low voltage wall power adapter ( wall wart ), took it apart and you have just a transformer.
3. My circuit use op-amps, a input resistors network to reduce the voltage to about 3 V ac. The circuit is a peak detector and a buffer. My reference is : "Op-Amps and Linear Integrated Circuit, second edition, by Ramakant A. Gayakwad"
4. The output have a zener diode for protection, the signal is at 3 V dc ==> 120 Vac rms. And when the Arduino ADC read this voltage, you have a value of 614. As long the voltage at Avref is 5, but in most case, it is not. So you measured it, you place in the code, and you measure the Main AC - 120 with a DMM at AC mode. Mark that reading. Measure the output and mark that reading. Calculated the ratio and place in the code.
5. Program you code to take into account the ADC value that represent your AC measurment.
6. code your Arduino to do what you want when the value go up or down.
7. If you have experience in electronics, you will have no problem doing my circuit. The op-amp need a + side and a - side and the Arduino need 5 V for power or use the + side to power the Arduino via 5 V regulator. And ground properly.
8. You power up the circuit in this sequence : Arduino , op-amp circuit and the ac in. If you do not do in the proper order, you may damage the circuit and the Arduino. To power down : AC , op-amp and the Arduino