On Tue, 20 Oct 1998 09:03:00 -0400 Joe Little writes: > I just built ten dimmerpacks, and had an unexpected problem. >Slight variances in the Zero detect components caused the PIC to decide >zero crossing at slightly different times. When you try to trigger >close to full brightness, and the zero detect announces crossing a little >early... You trigger before the crossing, and then zero crossing actually >happens and the triac goes back off. So instead of real bright, you get half >bright. > > This I learn after I program the 10 PICS. $ouch. > > Right now the zero crossing detector announces a crossing when >the voltage falls to about 1 volt, and when rising voltage rises to about 1 >volt. Therefore it announces a falling crossing a little early, and >rising crossings a little late. I'm considering full wave rectifying the >AC before it goes into the zero crossing detector, so it will always >announce crossings slightly early. This way, If my timing is off, it will >only fail when I'm at minimum brightness, and it will only fail dimmer. >The problem may still be there, but I won't get caught. > > Also: The exact timing of the negative-going edge of the trigger >pulse becomes important when it gets close to the zero crossing. If you >un-trigger too late, that triac stays fired for the next half >cycle too. > In my project I triggered on the negative edge, which detects the zero cross a little early. I then TIMED to the positive zero crossing. I think that next time I'd full wave rectify prior to driving the INT pin on the PIC. I'm already FW rectifying for the power supply, so I could add a diode between the cathodes of the two power supply diodes and the filter capacitor and add a pulldown resistor. This'd keep the capacitor from holding up the junction of the two diodes. I could then run a current limit resistor to the INT pin on the PIC and detect both positive and negative zero crosses a little early using the negative edge detect. Harold Harold Hallikainen harold@hallikainen.com Hallikainen & Friends, Inc. See the FCC Rules at http://hallikainen.com/FccRules and comments filed in LPFM proceeding at http://hallikainen.com/lpfm ___________________________________________________________________ You don't need to buy Internet access to use free Internet e-mail. Get completely free e-mail from Juno at http://www.juno.com or call Juno at (800) 654-JUNO [654-5866]