This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

problem with ac dimmer circuit with nRF51822

hi,

i tried to make a ac dimmer circuit controlled with dc

i use nrf51822

this is my dimmer circuit

image description

aaand this one is zero crossing detector

image description

finally this is my mbed code;

DigitalOut trigger(p15);

DigitalIn zero(p14);

int main()

{

    while(1)  

    {

        if (zero==1) 

        {

            wait_us (5000);  
                
            trigger = 1;      
             
            wait_us (100);  

            trigger = 0;     

        } 

    }

}

i just want to dim my light %50, but it always blinking.

can anyone help me and tell me what is my mistake?

Parents
  • First of all, the h11aa1 symbol does not seem to be correct. h11aa1 is an AC optocoupler, as can be seen from a quick search on google.

    Second; you have connected the base of the phototransistor, this should in most cases be left open. You should connect the collector (pin 5) to the microcontroller (as can be seen in the google search). With your configuration the zero pin on nRF (p14) is always high, which means that the code will trigger the triac approximately every 5ms.

  • ty for reply. actually i made this schematics for question in a rush, and now i see that its pin config wrong, but my circuit desing on board correct, of course i made config by datasheet of h11aa1

    also i detect the zero crossing pulse correctly on a oscilloscope. so my problem on the code part.

Reply
  • ty for reply. actually i made this schematics for question in a rush, and now i see that its pin config wrong, but my circuit desing on board correct, of course i made config by datasheet of h11aa1

    also i detect the zero crossing pulse correctly on a oscilloscope. so my problem on the code part.

Children
No Data
Related