hi Badger33,try this:
u have #1,#2,#3,#4...and this scenario
- when pot is in the middle nothing hapends and #1 is conected to #3 ...and #2 is conected to #4
- when turn the potenciometer left u have #1 conected to #4 (but #2 is still conected to #4)
- when turn the pot right u have #2 conected to #3 (but #1 is still conected to #3)
You wil need two 5v relays for arduino(you can find them on ebay for about 4€ each),since you are working with 220 i guess
And a 10k poteciometer
the code for Arduino is somthing like this,hope u understand how it works:
void setup()
{
Serial.begin(9600); // Start Serial comunic.
pinMode(12,OUTPUT); // pin 12 = output to Relay A
pinMode(13,OUTPUT); // pin 13 = output to Relay B
}
void loop() // This Funcion keeps runing when Arduino is powerd on
{
int value = analogRead(A0); // store analog red into a variable
Serial.println(value); // Show u the potenciometer value on SerialMonitor
if (value >= 650) // if pot value is bigger/equal to 650...
{
digitalWrite(12,HIGH); //pin 12 is powerd,relay is on
}
else
{
digitalWrite(12,LOW); //pin 12 got no power,and reley is swich off
}
if (value <= 350)
{
digitalWrite(13,HIGH); //same as pin 12,but for pin 13
}
else
{
digitalWrite(13,LOW);
}
delay(100); // delay time
}
the potenciometer u need to conct like:
left pin = +
right pin = -
middle pin = analog0
u can change the value as you like,in case u dont have a 10k pot.
Good Luck Juycce