> From: Mike > Hi gals and guys, > > I'm looking (again) at feasability of using HC11 architecture as controller > for sine-wave inverters 48V DC in for 240V AC out 50Hz and 5000VA. > > Now after being exposed to PICs - I'm considering using a PIC with built > in A to D... > > Although I have most experience with 8051 architecture, it seems that the > HC11 with OTP would be a more viable solution in terms of usability > of programming model and level of integration - thats an option but, can > anyone care to suggest a suitable PIC for such a task ? > > There has been some discussion in various hobby magazines about 'magic > sinewaves' in 384 bit sequences - anybody know about these or the > background maths etc - I was going to look at Taylor's series etc to > produce the HC11 table constants but there might be a more efficient way ? > > I'm interested in any +ve/-ve comments/observations on this... So-called 'magic sinewaves' seem to be a pet subject of a bloke called Don Lancaster. The actual mathematics to generate the sequences is not in the public domain; however there are a few published sequences of length 384 and above - look at his web page. I'm not sure about this, but I think it is possible to patent algorithms in the US. However, you can't in Australia so if you can discover his algorithm for yourself there would be nothing to stop you commercially develping products in Oz. Basically, there are an infinite number of PWM sequences which will generate 'sine waves' with a greater or lesser harmonic content. The aim of 'magic sinewaves' is to minimise (or even zero) the first n harmonics, such that the first non-zero harmonics will be at a very high frequency and thus easy to filter using an LC low-pass power filter. The complete cycle (20ms) is divided into fixed time slots (20ms/384). Each slot is then assigned an output voltage of +V, 0 or -V. Naturally, because of the 4-fold symmetry of a sine wave only one quadrant of the sine wave needs to have table entries. The power of the fundamental (which is what you want) is proportional to the total number of +V slots (= the number of -V). The mathematical technique is based on Fourier analysis (not Taylor series, AFAIK). If you need to regulate the output, you can presumably narrow the utilisation of the +/-V slots. Thus you would aim for 50% duty cycle (of the slot) for no-load output, allowing this to rise to 100% for full load. As it so happens, I am currently designing a 6KW inverter, except that I am using rectified 3-phase as the power source (giving about 580V avg). The DC (with 4.2% ripple) is switched by a full bridge of MOSFETs using opto-isolated control. Control will be provided by a 16C74 - primarily because I have a few of these floating around. The '74 will be used to monitor voltage and current (current being crudely measured from the voltage drop across the MOSFETs Rds(on)). It will also determine frequency of operation and PWM sequencing. Might also add temperature sense. One of the most difficult things about controlling 600 odd volts at 50KHz is the tremendous dV/dt (those FETs switch fast!) which will couple through the tiniest capacitance to potentially disrupt ones delicate control circuitry. I am having to build up my own opto-isolators and isolated power supplies. Total capacitance has to be limited to 0.2pF, otherwise currents of over 1mA will be induced (6000V/us). I would be interested in your overall converter topology. Please correspond privately since this is wildly off-topic. Regards, SJH Canberra, Australia