lpcware

AC Dimmer + lpc1114

Discussion created by lpcware Employee on Jun 15, 2016
Latest reply on Jun 15, 2016 by lpcware
Content originally posted in LPCWare by hcanova on Sun Sep 01 18:26:15 MST 2013
Dear,

I'm trying to use the lpcxpresso 1114 to make an simple AC dimmer (in future I want to control it with CAN), basic I have an zero cross circuit connected to an interruption, this interruption will wait some time (to achieve the desired phase angle) and active an triac for certain amount of time, usually one pulse with few microseconds, my code for test is very simple, I'm trying to use the 32 bit timer to obtain the microsecond delay, but the ac load (in this case a light bulb), only blinks without fade effect, some one can share experiences whit this kind of circuit?



void PIOINT2_IRQHandler(void)
{
  uint32_t regVal;
  regVal = GPIOIntStatus( PORT2, 1 );
  if ( regVal )
  {
GPIOIntClear( PORT2, 1 );
  }

    delay32Ms(5000); // time to achieve the angle // 180º = 8333 microseconds // 60 hz
    GPIOSetValue( TRIAC_PORT, TRIAC_BIT, 1 );
    delay32Ms(10); // hit the triac for 10 microseconds
    GPIOSetValue( TRIAC_PORT, TRIAC_BIT,  0);

  return;
}

Regards,
HCanova 

Outcomes