I would like some feedback here.
I added the code that transmits a P1 ON in response to a significant increase in noise, and confirmed that was working by injecting a variable noise level from my Wavetek.
Then I plugged in that infamous Cellet cellphone charger. The meter immediately started logging bad start codes, but there was virtually no increase in indicated noise level, and the noise increase detector was not triggered.
The meter samples the powerline in three windows: just before, during, and just after the X10 transmission window. It normally displays the signal or noise level during the X10 window. Using a storage scope to capture noise from the Cellet charger, its switching regulator only pulses on in the X10 reception window a few times a second. While that is certainly enough to corrupt X10 transmissions, it is not enough to raise the average noise level significantly. Looking just during X10 reception windows, the average noise remains below 25mV. However, looking over the whole cycle, the noise gets up to almost a volt when there is a load on the charger. Yes, that is one nasty device.
To be useful, I think the meter should identify even very intermittent noise capable of causing X10 communications problems. I modified the A/D sampling routines to not only capture peak noise over an entire X10 transmission, but also peak noise during each individual X10 sample window. That does show an increase when the charger is plugged in, but still less than 100mV. However, that is certainly capable of causing bad start codes, and a serious X10 reliability problem. Maybe the best indicator is the fact that the meter is displaying a continuous stream of bad start codes whenever the charger is plugged in.
Displaying peak noise clearly works better for a device such as the Cellet charger. It will also give a good reading for constant noise, such as that produced by a wireless intercom. Noise injected from my Wavetek reads virtually the same with either an average or a peak detector. The peak detector does have a problem with very short high-energy pulses, which indicate an elevated noise level, but may not be long enough to corrupt X10 communications. My next step is to gate the max amplitude detector with pulse count, and ignore any high amplitude pulse that does not last long enough to be detected as a X10 logic "1".
One other option is to examine noise over other regions of the waveform. The Cellet charger is much more active during the mid portion of the sinewave, which is where it generates most of its noise. However, that noise has no impact at all on X10 communication. Sampling over more of the waveform could "red-flag" devices as filter candidates even though adding the filter does nothing to improve X10 system reliability. Because of this, I thought it best to focus just on the X10 reception window. The other windows are used to help isolate X10 traffic from the background noise level on either side of the X10 sample window.
Any suggestions as I continue to work this issue are welcome.
Jeff