tirithen
- 4th September 2008, 01:15
I found this site with a real simple circuit for a light dimmer (http://www.radiolocman.com/shem/schematics.html?di=34004) that I built and it works but I'm having problems figuring out how to do the zero crossing detection with this 1M resistor connected directly to the pic12f675 gpio.2 pin. Since he connects it to gpio.2 pin my first guess was that he used INTE to trigger the interrupt but I have failed to make it work, it seemes that an other method is required to detect the change in the sine wave. I need to find how he has slowed it as this limits the components and obviously works. Via A/D?
If anyone is interested in my app so far here it is (it's not working so far). The idea is to make a dimmer that is connected between the ac line and the lamp with an ir-reciver and lightsensor (LED used as sensor). Then a central ir-transmitter with a clock sends a signal for timed control or a remote control for direct control or ir-diode connected to a computer for control via internet or possibly voice... haha, depending on how far I get.
For now I need to find the zero crossing with only a resistor between the ac line and the gpio2 pin. Any ideas?
If anyone is interested in my app so far here it is (it's not working so far). The idea is to make a dimmer that is connected between the ac line and the lamp with an ir-reciver and lightsensor (LED used as sensor). Then a central ir-transmitter with a clock sends a signal for timed control or a remote control for direct control or ir-diode connected to a computer for control via internet or possibly voice... haha, depending on how far I get.
For now I need to find the zero crossing with only a resistor between the ac line and the gpio2 pin. Any ideas?