Received: from PCH.mit.edu (18.7.21.50) by mail.efplus.com (192.168.0.8) with Microsoft SMTP Server (TLS) id 8.3.485.1; Wed, 12 Aug 2020 09:02:02 -0700 Received: from PCH.MIT.EDU (localhost.localdomain [127.0.0.1]) by PCH.mit.edu (8.14.7/8.12.8) with ESMTP id 07CFpYRR005779; Wed, 12 Aug 2020 11:52:09 -0400 Received: from outgoing-exchange-7.mit.edu (OUTGOING-EXCHANGE-7.MIT.EDU [18.9.28.58]) by PCH.mit.edu (8.14.7/8.12.8) with ESMTP id 07CFpWtc005776 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 12 Aug 2020 11:51:32 -0400 Received: from oc11exedge1.exchange.mit.edu (OC11EXEDGE1.EXCHANGE.MIT.EDU [18.9.3.17]) by outgoing-exchange-7.mit.edu (8.14.7/8.12.4) with ESMTP id 07CFnJbi026560 for ; Wed, 12 Aug 2020 11:49:30 -0400 Received: from w92expo22.exchange.mit.edu (18.7.74.76) by oc11exedge1.exchange.mit.edu (18.9.3.17) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Wed, 12 Aug 2020 11:51:08 -0400 Received: from oc11exhyb1.exchange.mit.edu (18.9.1.60) by w92expo22.exchange.mit.edu (18.7.74.76) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Wed, 12 Aug 2020 11:51:08 -0400 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.177) by oc11exhyb1.exchange.mit.edu (18.9.1.60) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Wed, 12 Aug 2020 11:51:08 -0400 Received: from DM5PR16CA0014.namprd16.prod.outlook.com (2603:10b6:3:c0::24) by DM6PR01MB5546.prod.exchangelabs.com (2603:10b6:5:17d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.21; Wed, 12 Aug 2020 15:51:05 +0000 Received: from DM3NAM03FT058.eop-NAM03.prod.protection.outlook.com (2603:10b6:3:c0:cafe::19) by DM5PR16CA0014.outlook.office365.com (2603:10b6:3:c0::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.16 via Frontend Transport; Wed, 12 Aug 2020 15:51:05 +0000 Received: from mail-il1-f177.google.com (209.85.166.177) by DM3NAM03FT058.mail.protection.outlook.com (10.152.82.212) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.16 via Frontend Transport; Wed, 12 Aug 2020 15:51:05 +0000 Received: by mail-il1-f177.google.com with SMTP id l7so2182430ils.2 for ; Wed, 12 Aug 2020 08:51:05 -0700 (PDT) From: David VanHorn To: Microcontroller discussion list - Public. Sender: "piclist-bounces@mit.edu" Date: Wed, 12 Aug 2020 08:50:57 -0700 Subject: Re: [EE] averaging multiple samples to reject AC interference Thread-Topic: [EE] averaging multiple samples to reject AC interference Thread-Index: AdZwwetaF7truq8AQYm/z6IhLMA4lg== Message-ID: References: <20200810131708.06a56fd6300ec2bfca6379d4e10ab8d2.bc322fe198.wbe@email27.godaddy.com> <42b31c06-4e32-b49b-0c18-3a8332eff7fe@myfairpoint.net> List-Help: List-Subscribe: , List-Unsubscribe: , In-Reply-To: <42b31c06-4e32-b49b-0c18-3a8332eff7fe@myfairpoint.net> Reply-To: Microcontroller discussion list - Public. Accept-Language: en-US X-MS-Exchange-Organization-AuthAs: Anonymous X-MS-Exchange-Organization-AuthSource: TS500.efplus4.local X-MS-Has-Attach: X-Auto-Response-Suppress: All X-MS-Exchange-Organization-SenderIdResult: Pass X-MS-Exchange-Organization-PRD: mit.edu X-MS-TNEF-Correlator: received-spf: Pass (protection.outlook.com: domain of gmail.com designates 209.85.166.177 as permitted sender) receiver=protection.outlook.com; client-ip=209.85.166.177; helo=mail-il1-f177.google.com; dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=o2vL948zt9e5q74zTBpNyueKGvVbYi4xFKu5LZeSs8Y=; b=t+PBZErFWBZK2XdyP0R1PHe/xSF3LU92FF5cL2CN8TgvdjBJrUT4mcN9N+gYkMUlJJ RsrgK873OvfWzqrCS2G4e/9N1FuLjzLicr4J6oiXwK06sj4Q0wQWRoWzu9OjU/D1sPt6 MGYHFTIgwsfe3YKIIGlhqRH6P79iNjfTkNt2+sF8fg1MBsTpj20f94zcR6GVXpD6Tabk k0rZjl/ER8d3wxw9UCwYYRTOh4ihhg/gkGfOWUyaaagJOObJVnux+A0/ovUUU2MUbD5b Lhn07SuJdvPQKNfLwhK9ElvSOn/eBMtw98p0dp/arVVruzTfEkL2xXjIfH4JcrILWtM8 JaMA== authentication-results: spf=pass (sender IP is 209.85.166.177) smtp.mailfrom=gmail.com; mit.edu; dkim=pass (signature was verified) header.d=gmail.com; mit.edu; dmarc=pass action=none header.from=gmail.com; errors-to: piclist-bounces@mit.edu list-id: "Microcontroller discussion list - Public." list-post: x-beenthere: piclist@mit.edu x-mailman-version: 2.1.6 x-received: by 2002:a92:9e48:: with SMTP id q69mr320540ili.170.1597247461672; Wed, 12 Aug 2020 08:51:01 -0700 (PDT) x-topics: [EE] x-content-filtered-by: Mailman/MimeDel 2.1.6 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 When I implemented the averaging filter it was on a Z8 running at 1 mips. Didn't notice any performance issues in our application. (MICR reader) On Tue, Aug 11, 2020 at 7:19 PM Art wrote: > That's a great idea David, but with averaging, much performance is lost. > And, even without averaging, there is a finite propagation delay (phase > error) through the electronics-whether digital or analog. > > It occurred to me that I might use a second A/D converter to quantify > the 60Hz powerline frequency and apply that correction digitally. There > will still be propagation delay and the amplitude of the 2 data streams > will never match precisly, but the sampling of the realtime data can be > delayed and sync'd by some amount by delaying the digital clock time > sampling of one of the waveforms. > > Such a practice probably improves the line frequency interference > problem, but might require lots of time to figure our whether it is usabl= e. > > I know that a similar technique is used in analog receiver inputs in > order to reduce line noise arcing, and it does work. MFJ makes the > hardware, but it takes a very long time to find the correct amount of > delay/phase/amplitude as the tuned circuit has nearly infinate > combinations of possible settings. Once the sweet spot is found, it > works well until the ambient temperature in the shack changes and > everything needs retweaking::> > > The same concept cannot be applied to very low 50 or 60 Hz interference, > there is no way to make variable inductors and capacitors to make the > concept work. > - > Aloha, > > W1ABA > > > On 8/11/20 11:59 AM, David Van Horn wrote: > > I did a filter some years back where I averaged up enough samples to ge= t > a complete cycle of the AC line, inverted it, and added it back to the > data, which worked pretty well at getting rid of line based interference. > > > > > > -- > http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive > View/change your membership options at > http://mailman.mit.edu/mailman/listinfo/piclist > --=20 http://www.piclist.com/techref/piclist PIC/SX FAQ & list archive View/change your membership options at http://mailman.mit.edu/mailman/listinfo/piclist .