Dear Harold Thanks for your prompt posting to the PIClist following my request for help. It appears that you have done what I am trying to do (except I am not controlling relative brightness but 6,000 amps NDT equipment) If possible, could I please get a copy of the GE article/formula - unfortunately I have not seen the book here in UK. Would it be possible to get the 256 entry table? Many thanks Stephen Stephen H Alsop email: steve@s.ssystems.easynet.co.uk S&S Systems Ltd www: http://easyweb.easynet.co.uk/~s.ssystems Tel: 01909 773399 * Fax: 01909 773645 * Mobile: 0973 305527 ---------- : From: Harold M Hallikainen : To: PICLIST@MITVMA.MIT.EDU : Subject: Re: Power calcs with phase control : Date: 06 September 1997 17:37 : : I did something similar for a light dimming system, only there I : had to take the nonlinearity of the perceived brightness vs RMS voltage : into account along with the time delay into a cycle vs RMS voltage. I : ended up using the shareware Calculus Calculator to make a 7th order : Taylor series to do the brightness (DMX) code to RMS voltage, then the : standard RMS calculation (square root of the mean of the squares of the : instantaneous voltages, the mean calculated using the integral over the : time of a half cycle) for the portion of the cycle the power was on to : determine the RMS voltage for various firing angles. These two equations : functions for RMS voltage were set equal to each other, then the Calculus : Calculator set to work to solve it, giving a time delay for each DMX : value. : Finally, the General Electric Thyristor Handbook (at work, I'm at : home) has a formula relating firing angle to RMS voltage. I'll see if I : can dig it up next time I'm in there. : In our application, we used a 256 entry table (actually two : tables, one returns the high byte, the other returns the low byte) to : take the incoming code and convert it into timer clicks. We reset the : timer on zero-crossings and then used the capture/compare register to : generate an interrupt where we then turned on the triac. : You can see the finished product (the DM406 Shoebox dimmer) at : http://www.dovesystems.com : : : Harold