Pages

Monday 25 May 2015

Serial 3Channel AC 230V SSR and Dimmer. Part-2



FIRING ANGLE

Phase angle of applied voltage at which the Thyristor conduct
 

CONNECTING  230V AC DIMMER WITH ELECTRONIC GADGETS



UART INPUT FOR LOADS
A=load1
B=load2
C=load3
S=ALL OFF (LOAD1=OFF,LOAD2=OFF,LOAD3=OFF)
N=ALL ON (LOAD1=100%, LOAD2=100%, LOAD3=100%)

Example
A100= load1 at 100% dimmer level.
A026=load1 at 26% dimmer level.
B065=load2 at 65% dimmer level.
C089=load3 at 89% dimmer level.

LOAD1

LOAD2




LOAD3


All ON and All OFF


CONNECTING WITH  PIC  PROJECT  BOARD


CONNECTION DIAGRAM

 

WORKING

  • Make the connections as shown in diagram
  • Connect PC  and USB to TTL through USB cable
  • Connect TX pin of Dimmer to RX of  USB to TTL
  • Connect RX pin of Dimmer to TX of  USB to TTL
  • Connect bulb to the Load 1
  • Connect AC IN of Dimmer to power supply

 

CONNECTING 230V AC SSR & DIMMER WITH ARDUINO

 



ARDUINO CODE

int s1=8;                  //connect switch1 to pin 2 of arduino
int s2=9;                  //connect switch2 to pin 3 of arduino
int s3=10;                  //connect switch3 to pin 4 of arduino
int s4=11;                 //connect switch4 to pin 5 of arduino
int s5=12;                 //connect switch5 to pin 6 of arduino
int s6=13;

 

void setup()
{
  Serial.begin(9600);      // initialize the serial communications
  pinMode(s1,INPUT);
  pinMode(s2,INPUT);
  pinMode(s3,INPUT);
  pinMode(s4,INPUT);
  pinMode(s5,INPUT);
  pinMode(s6,INPUT);
}

void loop()
{
  unsigned char LOAD1=0,LOAD2=0,LOAD3=0;
   if(s1==LOW)                 
   {
     if(LOAD1<100)
     LOAD1++;
     Serial.write('A');
     CONVERT_DISPLAY(LOAD1);     
     delay(500);                    
     }
   
    if(s2==LOW)                 
     {
       if(LOAD1>0)
        LOAD1--;
       Serial.write('A');
       CONVERT_DISPLAY(LOAD1);   
       delay(500);                  
      }
  
   if(s3==LOW)                 
   {
     if(LOAD2<100)
     LOAD2++;
     Serial.write('B');
     CONVERT_DISPLAY(LOAD2);     
     delay(500);                    
     }
    
     if(s4==LOW)                
     {
       if(LOAD2>0)
        LOAD2--;
       Serial.write('B');
       CONVERT_DISPLAY(LOAD2);   
       delay(500);                  
      }
 
  if(s5==LOW)           
   {
     if(LOAD3<100)
     LOAD3++;
     Serial.write('C');
     CONVERT_DISPLAY(LOAD3);     
     delay(500);                     
     }
   
     if(s6==LOW)                
     {
       if(LOAD3>0)
        LOAD3--;
       Serial.write('C');
       CONVERT_DISPLAY(LOAD3);   
       delay(500);                  
      }
}
 
 
void CONVERT_DISPLAY(unsigned int d)
{
   unsigned char dig1,dig2,dig3,dig[3];
   unsigned char x;
   unsigned char temp;
   temp=d;
   temp=temp/10;
   dig1=d%10;
   dig2=temp%10;
   dig3=temp/10;
       
        dig[0]=dig3;
       dig[1]=dig2;
       dig[2]=dig1;

       for(x=0;x<3;x++)
       {
           temp=dig[x]|0x30;
           Serial.write(temp);          
    }                                                              
}         



NOTE: Since this module working with live 230V AC, while experimenting user has to take proper safety precautions.