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 15:20:46 -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 07CM9dqu031487; Wed, 12 Aug 2020 18:09:57 -0400 Received: from outgoing-exchange-1.mit.edu (OUTGOING-EXCHANGE-1.MIT.EDU [18.9.28.15]) by PCH.mit.edu (8.14.7/8.12.8) with ESMTP id 07CM9c3S031468 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Wed, 12 Aug 2020 18:09:38 -0400 Received: from oc11exedge1.exchange.mit.edu (OC11EXEDGE1.EXCHANGE.MIT.EDU [18.9.3.17]) by outgoing-exchange-1.mit.edu (8.14.7/8.12.4) with ESMTP id 07CM82Qv028782 for ; Wed, 12 Aug 2020 18:08:04 -0400 Received: from w92expo28.exchange.mit.edu (18.7.74.34) by oc11exedge1.exchange.mit.edu (18.9.3.17) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Wed, 12 Aug 2020 18:09:36 -0400 Received: from oc11exhyb6.exchange.mit.edu (18.9.1.111) by w92expo28.exchange.mit.edu (18.7.74.34) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Wed, 12 Aug 2020 18:09:36 -0400 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.174) by oc11exhyb6.exchange.mit.edu (18.9.1.111) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Wed, 12 Aug 2020 18:09:36 -0400 Received: from DM5PR19CA0063.namprd19.prod.outlook.com (2603:10b6:3:116::25) by DM6PR01MB4364.prod.exchangelabs.com (2603:10b6:5:32::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.19; Wed, 12 Aug 2020 22:09:35 +0000 Received: from DM3NAM03FT026.eop-NAM03.prod.protection.outlook.com (2603:10b6:3:116:cafe::3d) by DM5PR19CA0063.outlook.office365.com (2603:10b6:3:116::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3283.15 via Frontend Transport; Wed, 12 Aug 2020 22:09:35 +0000 Received: from mail-io1-f46.google.com (209.85.166.46) by DM3NAM03FT026.mail.protection.outlook.com (10.152.82.185) 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 22:09:35 +0000 Received: by mail-io1-f46.google.com with SMTP id q75so4798263iod.1 for ; Wed, 12 Aug 2020 15:09:35 -0700 (PDT) From: David VanHorn To: Microcontroller discussion list - Public. Sender: "piclist-bounces@mit.edu" Date: Wed, 12 Aug 2020 15:09:29 -0700 Subject: Re: [EE] averaging multiple samples to reject AC interference Thread-Topic: [EE] averaging multiple samples to reject AC interference Thread-Index: AdZw9tPp6T2npRszQbaJ/8A+C+9Bdw== 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: 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.46 as permitted sender) receiver=protection.outlook.com; client-ip=209.85.166.46; helo=mail-io1-f46.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=lS9JXysrO6CtfrKB/QLTuIXv0rOXtQJEkGZI/VJT98w=; b=JNlvF2xB4m8CinAmnPVxGNo2hS30TmU5XBrs9F5LIfxLibvtOvMBTScBMu+FCACqla pVQymUzIFFnNbVDHLGKHTk5gVXaX7OMAAJ+pt14SKIprOTX7MHiUNK2h1jsjcdGaCAR9 bmD9Gbkr157YuwUUO8vsRmMjG98cODFa1LPqA5o8a1E40B9h6C0nvG7Gq0/3ir988g0A dSk22+19F5M63LUzzNc8WPmttD49yjvQSaAAnyMdLSuYcMf2Net36HGQcSHX3pLBPMOS 3fDkqGNF9VFufzImQl9zfXuFjzCH6nCAb47BcjCM+FoRLLqGdu+Q1inkb8fbEMxouxQA HUmw== authentication-results: spf=pass (sender IP is 209.85.166.46) 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:a5d:80cb:: with SMTP id h11mr1857932ior.189.1597270174471; Wed, 12 Aug 2020 15:09:34 -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 " assuming the time it takes to aquire a sample is constant, how about taking 3 readings A, B, C such that A and C are from the signal to be measured and B is from the mains reference then the adjusted signal becomes:" is the shape of the AC line frequency what you're actually trying to remove= ? Or is it a line frequency interference signal which is locked to the line but not the same shape as the line waveform? On Wed, Aug 12, 2020 at 3:25 PM sergio wrote: > > > On Tue, 11 Aug 2020, 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.? > > assuming the time it takes to aquire a sample is constant, how about > taking 3 readings A, B, C such that A and C are from the signal to be > measured and B is from the mains reference then the adjusted signal > becomes: > > S =3D (A+C)/2 - B > > Since (A+B)/2 should correspond to the time when B was aquired > > Regards > Sergio Masci > -- > 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 .