Michael Rigby-Jones ha scritto: > Looking back through the posts in this topic I think there may be a > fundamental disconnect between Dwaynes measurement technique and what > Dario is hoping to achieve. Dwayne is rectifying and smoothing the AC, > so a box filter could be useful to get the mean DC value and reject any > ripple. This makes sense definitely :) ! > I may be wrong but I get the impression that Dario is effectively half > wave rectifying the AC waveform by clipping the negative side to ground > with a diode since there was some discussion on the dangers of not using > the PICs protection diodes for this. Since that will give one half > cycle of positive input followed by one half cycle of 0 volts it's not > surprising his box filter isn't giving zero (would be Vpeak/PI I > think?). A schematic would certainly reduce confusion here. And this too. I'll try to make up the schematic, but it is really that simple: 220V -> transformer -> one leg to GND, other to partitor -> partitor output to PIC || diode. -- Ciao, Dario -- Cyberdyne -- http://www.piclist.com PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist