varying high voltage

im not completely clued up with electrical components

In that case, don't work on mains.

Try something simpler / safer.