Using a trimmer pot to output a percentage of voltage
I took the liberty of fleshing out @PeterBennett's idea a bit here. I've used half an LM358 dual op-amp as a comparator. The R1, R2, R3 provide a voltage of half the average of the two inputs, which keeps the input voltage within the common-mode limits of the LM358. 

R4 provides some hysteresis- if you have chattering, reduce it somewhat. 







simulate this circuit &ndash; Schematic created using CircuitLab