Top goal: keep ac source at 220 volt all the time.
The "pseudo code"!!! goes like this:
Part A (The monitoring )
- sample input ac voltage, reducing it to safe level (arduino level)
- rectified dc fed to A0
- using arduino to detect UP or DOWN from a value that represents 220V
Part B ( The feedback )
- Activate dc motor RIGHT or LEFT to control the arm of a Variac.
In this early stage I wand to get green light on the concept and really do Part A. I want to build part A and see if the motor does it's thing while I vary the source around the 220 V. As a matter of fact I may develop it further to provide me with ANY ac value I feed to it.
I am ready now for the firing squad.....
By that I mean there may be an electronic solution to it . and save my self the agony of a mechanical one.