I've purchased a RobotDyn zero-cross detector, which I suspect is defective. Before I toss it (and $10), I want to check my testing procedure and make sure I'm not just thinking about this wrong.
My wiring is: AC power cord .> AC-IN, 110V lamp -> LOAD, Uno 5V -> VCC (I've also tried Uno 3.3V with same results), Uno gnd -> GND, Uno D2 -> Z-C (unused in my test sketch), Uno D3 -> PWM
My sketch is:
int AC_LOAD = 3;
void setup()
{
pinMode(AC_LOAD, OUTPUT);
}
void loop() {
digitalWrite(AC_LOAD, HIGH);
delay(1000);
digitalWrite(AC_LOAD, LOW);
delay(1000);
}
I expect the 110V lamp to blink off and on. What I'm seeing is the blue LED on the RobotDyn board blink off and on, but the 110V lamp is steady on at full brightness. Help?