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; Mon, 10 Aug 2020 13:25:09 -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 07AKHo23028842; Mon, 10 Aug 2020 16:17:52 -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 07AKHnRR028839 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 10 Aug 2020 16:17:49 -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 07AKG01d009399 for ; Mon, 10 Aug 2020 16:16:17 -0400 Received: from w92expo14.exchange.mit.edu (18.7.74.68) by oc11exedge1.exchange.mit.edu (18.9.3.17) with Microsoft SMTP Server (TLS) id 15.0.1293.2; Mon, 10 Aug 2020 16:16:56 -0400 Received: from oc11exhyb2.exchange.mit.edu (18.9.1.98) by w92expo14.exchange.mit.edu (18.7.74.68) with Microsoft SMTP Server (TLS) id 15.0.1365.1; Mon, 10 Aug 2020 16:17:44 -0400 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.41) by oc11exhyb2.exchange.mit.edu (18.9.1.98) with Microsoft SMTP Server (TLS) id 15.0.1395.4 via Frontend Transport; Mon, 10 Aug 2020 16:17:43 -0400 Received: from DM5PR20CA0038.namprd20.prod.outlook.com (2603:10b6:3:13d::24) by CO2PR01MB2069.prod.exchangelabs.com (2603:10b6:102:8::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3239.19; Mon, 10 Aug 2020 20:17:42 +0000 Received: from DM3NAM03FT031.eop-NAM03.prod.protection.outlook.com (2603:10b6:3:13d:cafe::f1) by DM5PR20CA0038.outlook.office365.com (2603:10b6:3:13d::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.19 via Frontend Transport; Mon, 10 Aug 2020 20:17:42 +0000 Received: from p3plwbeout27-05.prod.phx3.secureserver.net (216.69.139.54) by DM3NAM03FT031.mail.protection.outlook.com (10.152.82.199) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3261.16 via Frontend Transport; Mon, 10 Aug 2020 20:17:41 +0000 Received: from p3plgemwbe27-07.prod.phx3.secureserver.net ([10.36.136.37]) by :WBEOUT: with SMTP id 5EEIk1JatjyHU5EEIkj3Ij; Mon, 10 Aug 2020 13:17:10 -0700 Received: (qmail 29570 invoked by uid 99); 10 Aug 2020 20:17:10 -0000 From: Jim To: Microcontroller discussion list - Public. Sender: "piclist-bounces@mit.edu" Date: Mon, 10 Aug 2020 13:17:08 -0700 Subject: RE: [EE] averaging multiple samples to reject AC interference Thread-Topic: [EE] averaging multiple samples to reject AC interference Thread-Index: AdZvVFh4D9ApIpoTSXuTc8DyVSsOxQ== Message-ID: <20200810131708.06a56fd6300ec2bfca6379d4e10ab8d2.bc322fe198.wbe@email27.godaddy.com> List-Help: List-Subscribe: , List-Unsubscribe: , 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: None (protection.outlook.com: jpes.com does not designate permitted sender hosts) dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mitprod.onmicrosoft.com; s=selector2-mitprod-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AhBCIst2L/Ce66ZmgN7CBmySt0ZnDl//sC1Cp/KUdUg=; b=TNtwRfkADhmUAJfPBdqA78dWHz0AwTPqqeC+WtjOjbht0P9JLPNDulYzEhFLK109YX6OT2dDEjp5L7ZUqGpS+DUtg9pEV+5q7mIcCobO/jzsfefZ/KGQldUM0Q8IwNBB0QjQGCdQ5xrlRSO5pdVmvsM5VPY8NmxQ0bGtRl2Z6Vc= authentication-results: spf=none (sender IP is 216.69.139.54) smtp.mailfrom=jpes.com; mit.edu; dkim=none (message not signed) header.d=none;mit.edu; dmarc=none action=none header.from=jpes.com; x-originating-ip: 76.31.74.251 user-agent: Workspace Webmail 6.11.8 x-cmae-analysis: v=2.3 cv=QaoYQfTv c=1 sm=1 tr=0 a=FpUxR7vi4NZN2gwTsY7ujg==:117 a=Q8JqakWpEWwA:10 a=1ApPbfYrYNAA:10 a=IkcTkHD0fZMA:10 a=y4yBn9ojGxQA:10 a=UqCG9HQmAAAA:8 a=F07sB3KiAAAA:8 a=Gz7s5_CCAAAA:8 a=a0I1QPCoUSRhISE0mnkA:9 a=QEXdDO2ut3YA:10 a=8rYrM0obaTRgCqsvCuYq:22 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-sid: 5EEIk1JatjyHU x-topics: [EE] x-mime-autoconverted: from quoted-printable to 8bit by PCH.mit.edu id 07AKHnRR028839 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 A .1 second worth of samples is 30 samples at a 1/300 sampling period.=20 If my calculations are correct, 30 samples, at a 1/300 second sampling period, that would reduce interference below about 5 Hz, if I am thinking correctly about the Nyquist theory.=20 If the interference is low frequency, this method should provide some degree of reduction. If the interference is higher frequency than that, there may be little to no reduction. The best way to find the answer is probably to just write the code to implement the algorithm, and test it under actual conditions. Regards, Jim > -------- Original Message -------- > Subject: [EE] averaging multiple samples to reject AC interference > From: Bob Blick > Date: Mon, August 10, 2020 2:44 pm > To: "piclist@mit.edu" >=20 >=20 > I have sensors that feed an instrumentation amplifier running a voltage g= ain of 10 before going into the A/D converter of a microcontroller. >=20 > There is AC line interference. It is small, but if I can reduce the effec= t, that would be good. I'm in the 60 Hertz part of the world, but ultimatel= y this will be used in both 50Hz and 60Hz locations. Battery operated, this= is not conducted interference or power supply ripple. Shielding is not pos= sible. I only need to process the signal about 4 or 5 times per second. The= signal is changing, so long-term averaging is bad. Actually any averaging = will result in a tradeoff between response time and accuracy that I will ne= ed to evaluate. >=20 > These sensors are multiplexed with others and I can't sample continuously= .. >=20 > If I average multiple samples taken at 1/300 second intervals over a 1/10= second period, that should give some improvement at 50Hz and 60Hz without = getting too involved, correct? This would fit into my existing multiplexing= constraints. >=20 > I seem to recall being in this situation before but forget what I did at = the time. >=20 > Thanks for any suggestions. > Bob > --=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 --=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 .