hi,
i tried to make a ac dimmer circuit controlled with dc
i use nrf51822
this is my dimmer circuit
aaand this one is zero crossing detector
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?