On Sun, 18 Mar 2001 15:50:48 +1100 Roman Black writes: > > > Thanks for that Harold. I enjoyed reading that. > It's a pretty sophisticated light dimmer you > have there! ;o) It's sold to dentists for curing composites used to fill teeth! > > So here's the questions! > Did you get any phase shift problems measuring > zero cross at the isolated secondary of the > transformer? No problem. Recall that we're detecting a negative edge on the RB0 input, so we're a little before zerocross. I've also used this technique in another product (the Shoebox dimmer at http://www.dovesystems.com). What about when the triac switches > and current is drawn from the transformer, (the > trias is after the transformer??). To reduce transformer size, it's an autotransformer. The lamp is driven thru the triac off the 30V tap on the primary. A separate isolated secondary powers the PIC and allows detection of zero cross and measurement of RMS. > > Your zero cross circuit is just a current limit > resistor? You have about 8v to 10v peak there > probably? > Yes, and yes, thereabouts. The secondary is 18Vct with the centertap grounded. So, the peak voltage is about 9*sqrt(2). > With the instantaneous voltage values are you > doing root mean square? Yes. Squaring A/D after each conversion (8 bits up to 16 bits), then adding into a 24 bit sum. If the line voltage > changes you might get one "dim" cycle and then > by the next cycle it would be corrected by triac > duration? Yes, the reaction time is a little slow since we have to wait a half cycle to measure the RMS. Also, I'm using a pure integral control system. If the measured RMS is low, I decrement the high half of the CCPR register, turning on the triac earlier. If the RMS is high, I increment the CCPR turning the triac on later. > > Sorry to fire questions at you! :o) > -Roman > > -- No problem! Harold > http://www.piclist.com hint: To leave the PICList > mailto:piclist-unsubscribe-request@mitvma.mit.edu > > ________________________________________________________________ GET INTERNET ACCESS FROM JUNO! Juno offers FREE or PREMIUM Internet access for less! Join Juno today! For your FREE software, visit: http://dl.www.juno.com/get/tagj. -- http://www.piclist.com hint: The list server can filter out subtopics (like ads or off topics) for you. See http://www.piclist.com/#topics