my voice activated appliance controller

magnatro

New Member

it works off a PC, really what i got to do was to just say the device and it will come on/off accordingly..
 
planned to share but the code is too complex to post.. it's based on adaptive algorithm. i'll try
uc is basically an atmega 8 programmed by using an arduino.
uc program: it's actually quite simple
Code:
/*
////////////////////////////////////
 //////////Magnatron/////////////////
 ////////////////////////////////////
 ////magnatronelectronics@gmail.com//
 ////////////////////////////////////
 ////////////////////////////////////
 */
int val = 0;       // variable to store the data from the serial port
int rlyPin1 = 13;
int rlyPin2 = 12;
int rlyPin3 = 11;
int rlyPin4 = 10;
void setup()
{
  pinMode(rlyPin1,OUTPUT); //Declare relayPINs
  pinMode(rlyPin2,OUTPUT); //Declare relayPINs
  pinMode(rlyPin3,OUTPUT); //Declare relayPINs
  pinMode(rlyPin4,OUTPUT); //Declare relayPINs
  Serial.begin(9600);  
  Serial.print("Magnatron Technologies");
  delay(1000);
  Serial.print("Device Status : Initializing");
  for (int i=0; i <= 4; i++)
  {
    Serial.print('.');
    delay(10);      
  } 
  Serial.print("System check: OK");
  delay(500);
}

void loop () 
{

  while(Serial.available() > 0)
  {
    val = Serial.read();
    switch ( val) 
    {   
    case 10 :    
      Serial.print("device 1 Status : OFF");
      rlyPin1=LOW;
      break;

    case 11:    
      Serial.print("device 1 Status : ON");
      rlyPin1=HIGH;
      break;

    case 20:    
      Serial.print("device 2 Status : ON");
      rlyPin2=LOW;
      break;  
    case 21:    
      Serial.print("device 2 Status : ON");
      rlyPin2=HIGH;
      break;

    case 30:    
      Serial.print("device 3 Status : ON");
      rlyPin3=LOW;
      break;  
    case 31:    
      Serial.print("device 3 Status : ON");
      rlyPin3=HIGH;
      break;

    case 40:    
      Serial.print("device 4 Status : ON");
      rlyPin4=LOW;
      break;  
    case 41:    
      Serial.print("device 4 Status : ON");
      rlyPin4=HIGH;
      break;   

    case 00:
      {
        Serial.print("device * Status : OFF");
        rlyPin1=LOW;
        rlyPin2=LOW;
        rlyPin3=LOW;
        rlyPin4=LOW;

      }
    case 44:
      {
        Serial.print("device * Status : ON");
        rlyPin1=HIGH;
        rlyPin2=HIGH;
        rlyPin3=HIGH;
        rlyPin4=HIGH;    
      }
    default:
      Serial.print("Error: Unrecognized character");

    }
  }
}
 
Last edited:
No pressure, just curious about the intent of your post. I figured you'd have more pictures or details to share about your project, maybe you hadn't gotten around to posting them yet.
 
yeah, i'll post the video of it working after a day
 
schematic


the schematic of serial controller
 
Students simply make a "clapper" circuit.
They say, "Turn on TV" and the TV turns on.
They say, "TV off" and the TV turns off.
Then the dog barks 3 times and their TV turns on and two things are dropped on the floor and the TV turns off.
 
Students simply make a "clapper" circuit.
They say, "Turn on TV" and the TV turns on.
They say, "TV off" and the TV turns off.
Then the dog barks 3 times and their TV turns on and two things are dropped on the floor and the TV turns off.
he.. he.. everyone is student for life...
right?
 
there's a serial link to the PC (central server) it has got an array of microphones in each room. according to where the user is present, the mic is turned ON/OFF. the processing is done in PC. the resultant vector will be 11,10,20,21 so on.. 11= turn 1st appliance ON, 10 OFF and so on..
 
Last edited:
So how do you overcome the problem of it reacting to words being used in common conversation?
 
it has got a key word for starting command acquisition.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…