Some new stuff
  1. Arduino Park Control
  2. Arduino USB2serial programming the bare bone
  3. Arduino Projects Videos added
  4. Arduino Xbee projects
  5. Arduino dB Meter 
  6. Trying to get the IOIO going. 
  7. IOIO is going....bluetooth
  8. Attiny 2313 bluetooth bee RC car
  9. Compass and temperature added
  10. AVR programmer
  11. USB2Serial and Ethernet POE
  12. Arduino LPG Sensor
  13. Program the Arduino Mini 05
  14. Lipo Rider Pro in action
  15. EZ Robot Builder kit arrived 10 Nov 2012
  16. Arduino VA Meter!
  17. 05 Nov 2012 Project Sentry Gun.
  18. Attiny85 PIR Sensor 10 Dec 2012 
  19. 0-30VDC3A and 2-28VDC10A bench PSU's
  20. 19 Dec 2012 Arduino Voltmeter LCD
  21. 29 Dec 2012 Arduino Tachometer&Speedometer LCD
  22. 03 Jan 2013 Arduino AC Phase Control. 
  23. 18 Jan 2013 Arduino Distance Meter
  24. 22 Jan 2013 Arduino Digital Clock and Date
  25. 31 Jan 2013 Arduino Digital Clock and Date 8x2 LCD
  26. Feb 2013 LCD and Backpack
  27. Feb 2013 7 Segment Serial Clock Sparkfun. Distance Sensor with "newping" library
  28. Feb 2013 Lelo Remote
  29. 01/03/2013 Arduino Adafruit 7 Seg Digital Clock with RTC and backpack 
  30. Arduino Frequency Meter 26/03/2013
  31. Another RC  Car controlled by Arduino 06/04/2013
  32. My quadcopter project update 25 April 2013
  33. My Aqua Quad Copter Flying 26 April 2013enlightened
  34. Another monster RC truck;strong one! 11July2013cool
  35. X-Frame Quad Copter 31 July 2013cool
  36. Arduino GSM Sheild added.28/8/2013
  37. 1.8inch TFT screen 13/09/2013cool
  38. 04/11/2014 added PID Soldering Iron Control
  39. Added bluetooth servo control 04/11/2014
  40. ESP8266 first try.16/03/2015
  41. Arduino Uno Quadcopter 19 May 2015
  42. IOT WemosD1 Amp Meter

 

 




AC Phase Control Arduino.JPG

Arduino AC Phase Control by Bristolwatch 


Arduino AC Lamp Control Bristolwatch.docx

 Arduino AC Lamp Control Bristolwatch..

Recognition:

www.bristolwatch.com

Arduino AC phase control, but this time for AC lamp control or AC motor.

01 Jan 2013:

I have available a hair dryer ac motor to experiment with this code. I would like to see the result because the rpm of this ac motor is high and to be able to control the speed/rpm would be desirable.

I hope to learn and understand zero crossing.

The code from Bristol.com here which I am going to put together on breadboard.

// LED must be connected between digital pin and ground

#define triac_control 5

#define powerIndicator 12 // indicator

#define sensorPin 0 // potentiometer 

#define irq_Pin 2 

#define powerOn 4

// when using values in the main routine and IRQ routine must be volatile value

volatile byte flag_bit1 = LOW; // declare IRQ flag

int analogValue = 0;

// HIGH = 1, LOW = 0

void setup()  {

  pinMode(triac_control, OUTPUT);  

  pinMode(powerIndicator, OUTPUT);

  digitalWrite(triac_control, 0); // LED off

  digitalWrite(powerIndicator, 0); // LED off

  pinMode(irq_Pin, INPUT);

  pinMode(powerOn, INPUT);

  digitalWrite(irq_Pin, 1); // pull up on

  digitalWrite(powerOn, 1); // pull up on

  attachInterrupt(0, flag1, FALLING);  // interrupt 0 digital pin 2 connected ZC circuit

}

void loop() {

  if (!digitalRead(powerOn)) digitalWrite(powerIndicator, 1); 

  else digitalWrite(powerIndicator, 0);  

  if ((flag_bit1 == 1) && (digitalRead(powerOn)== 0)) {

    analogValue = analogRead(sensorPin) + 1;

    delayMicroseconds(analogValue * 7);

    digitalWrite(triac_control, 1); //triac on

    delayMicroseconds(100); 

    digitalWrite(triac_control, 0);  //triac off

    flag_bit1 = 0; // clear flag

  } 

} // end loop

void flag1() // set bit

{

  flag_bit1 = 1; 

}

03 Jan 2013:

The circuit works excellent!

Make sure to trigger the TRIAC from MT2 side and not from MT1 side. This issue took me a day to resolve


A video of the working circuit on bread board can also be viewed HERE

Next time building this circuit, I would like to connect a "AC LED LAMP" to see what is going to happen.

Here is the circuit from Bristolwatch.com:

You can download the circuit from top of page.


Back Back to top