I made this dimmer circuit:
simulate this circuit – Schematic created using CircuitLab
And it does not work (no light). I have looked up other circuits that serve the same purpose and they seem to be different on a few points:
- There's a capacitor C1 (can't really tell its purpose)
- They use another TRIAC (BT136)
- The resistance at the optocoupler is less than 1kOhm
Another thing I could think of is that I wired the TRIAC wrong: I connected the optoisolator to T1 and G of the BTA16 800B
EDIT:
Several suggestions have been given in the answers. I removed the red LED, changed R2 to 500Ohm and I rewired the TRIAC. I tested the circuit with a 3.3V battery. It work, can't tell which part was the crucial solution.
Best Answer
Your Opto-Triac needs to be connected between G and A2.
More likely the reason your lamp does not light is you are placing two LEDs in series on a DIO pin that only provides 3.3 V.
Run the two LEDs in parallel with separate resistors fed by the DIO pin.