Showing posts with label TRIAC. Show all posts
Showing posts with label TRIAC. Show all posts

Thursday, December 31, 2015

Building an AC Power Switch Development Board

Ever want to create a design that automates turning on or off an AC powered device such as a light or a heating system? Well this video is for you! In this video we look at how to create a development board for switching on and off AC power. The switch is implemented with a TRIAC which is a semiconductor device so no moving parts like a relay based design. You can access the Eagle PCB layout files from this link https://github.com/ForceTronics/AC-Switch-Proto-Board/tree/master or you can purchase this development board from www.forcetronics.com


Download Eagles files from GitHub: https://github.com/ForceTronics/AC-Switch-Proto-Board

*********************************Arduino code shown in the video********
//This sketch is used to control Thyristor that is used as a switch to turn on and off an AC line powered light. //This code is free for all to use
int8_t dig = 0; //default is high for light off

void setup() {
  //for controlling Thyristor
  pinMode(7, OUTPUT); //set pin to output so it can sink current from optoisolator
  digitalWrite(7, HIGH); //when high the thyristor is off or open
}

void loop() {
  delay(3000); //light turns on / off every 2 seconds
  togLight(); //call function to turn light on / off using digital pin
}

void togLight() {
  if(dig) { 
     digitalWrite(7, HIGH); //turn off light
     dig = 0; //toggle dig value
  }
  else {  
     digitalWrite(7, LOW); //turn light on
     dig = 1; 
   }
}



Friday, July 25, 2014

Building a Smart Thermostat Part 1

In this project we will build a smart thermostat with features such as high accuracy temperature measurements, customized user interface, and, best of all, wireless control from an Android device. Since this is a big project it will be presented in three parts. This is part one where we will cover the basic design and get to a working prototype. To download the Arduino code follow the GitHub link below. Please share your comments!

Arduino code from GitHub



Smart Thermstat Part 1 (prototype)


Sunday, June 1, 2014

Switching AC Line Power with a Thyristor (TRIAC)

In this video we look at how to use a Thyristor (TRIAC) as an AC line power switch. Great tool to use in home automation projects for turning on or off a light or building your own thermostat.


Thyristor Example Circuit


//This sketch is used to control Thyristor that is used as a switch to turn on and off an AC line powered light. //This code is free for all to use
int8_t dig = 1; //default is high for light off

void setup() {
  //for controlling Thyristor
  pinMode(3, OUTPUT); //set pin to output so it can sink current from optoisolator
  digitalWrite(3, HIGH); //when high the thyristor is off or open
}

void loop() {
  delay(2000); //light turns on / off every 2 seconds
  togLight(); //call function to turn light on / off using digital pin
}

void togLight() {
  if(dig) { 
     digitalWrite(3, HIGH); //turn off light
     dig = 0; //toggle dig value
  }
  else {  
     digitalWrite(3, LOW); //turn light on
     dig = 1; 
   }
}