I notice the wiki says “Please don’t try yet. Waiting for SW fix.” for the IO Example 2 - AC Light Dimmer. Is that the current state of things?
I verified that I am able to set the brightness level through the web API, but I am not getting any activity out. My circuit works fine with the arduino.
You should get activity out; the issue with the “don’t try yet” is that the imp.sleep, if it’s above 20ms, it’ll flush system buffers first (which would cause jitter).
If you’re doing a 60Hz dimmer, then your max period will be 16ms so it should just work.
I am able turn the bulb on and off with the blink-o-matic code and my output circuit (e.g. the imp drives the triac). Also, I see my zero-cross detector is firing as expected on the imp input (0 and 3.3V at 120 Hz). I’m not having any luck with the actual dimming.
I wonder if maybe I need to redesign my circuit to sink less power on the zero-cross input or use an additional transistor on the triac output. I see the imp pins can sink/source 4mA max…
By my calculations it looks like the imp will be sinking 0.21mA on the zero-cross input when my signal is high ((3.3VCC-1.2V forward voltage)/10K ). And it will be sourcing 2.2 mA on the triac output ((3.3V-1.2)/1K). Both should be fine.
If it was underpowered on the output I wouldn’t expect the circuit to work with the “on/off” blink-o-matic code. So I’m thinking the zero-cross input is the problem maybe…
Thanks for any help! It would be great to look at your dimmer design if you don’t mind.
I either have a problem with my breakout board soldering or I’ve burned out a pin on my imp. I’m not able to use pin 1 as an input or output. This was preventing the circuit from working.
With pin2 for my zero cross input the dimmer works fine. When I disconnect the optocoupler I see the LED fade.
Now I need to redesign my circuit with a lower-power optocoupler: the MOC3020 I have been using to drive the triac expects 15mA typically for the trigger current, which the imp can’t do. I’m thinking of using the MOC3023 which has a much lower trigger current (5mA max).
Hi~I also try to use same circuit.
One thing I wonder if I use 50Hz for imp’s sleep timer it make jitter?
And I want to fade out AC light. is it possible?