Return-Path: Received: from localhost (localhost [127.0.0.1]) by snowbird (Cyrus v2.2.13-Debian-2.2.13-2) with LMTPA; Tue, 26 May 2009 08:12:12 -0400 X-Sieve: CMU Sieve 2.2 Received: from mail-relay.ics.com (mail-relay.ics.com [66.238.211.190]) by mail.ics.com (Postfix) with ESMTP id D68D5540A9 for ; Tue, 26 May 2009 08:12:12 -0400 (EDT) Received: from guardian.ics.com (scrubbed@localhost [127.0.0.1]) by mail-relay.ics.com (envelope-from scrubbed@guardian.ics.com) (8.13.8/8.13.8/Debian-3) with ESMTP id n4QCC9NA021362 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Tue, 26 May 2009 08:12:09 -0400 Received: (from scrubbed@localhost) by guardian.ics.com (8.13.8/8.13.8/Submit) id n4QCC9Bb021361 for scrubbed@snowbird; Tue, 26 May 2009 08:12:09 -0400 Received: from yx-out-2122.google.com (yx-out-2122.google.com [74.125.44.25]) by mail-relay.ics.com (envelope-from grbounce-mhDLDAUAAACCWz0gcxlWH96hoF08oTo0=scrubbed=ics.com@googlegroups.com) (8.13.8/8.13.8/Debian-3) with ESMTP id n4QCC1SH021286 for ; Tue, 26 May 2009 08:12:04 -0400 Received: by yx-out-2122.google.com with SMTP id 22so414631yxm.3 for ; Tue, 26 May 2009 05:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :mime-version:content-type:content-transfer-encoding:received:date :in-reply-to:x-ip:references:user-agent:x-http-useragent:message-id :subject:from:to:x-google-approved:reply-to:sender:precedence :x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; bh=ijiZliFrXEOqaNiiY8+AeP3U6wKBUxh17VO/i5ROXic=; b=r75FUrBsKD8QFUZH7oMPaRlVsAkXQdUs6QuEXTzULLvobLA0dbV9FprUBGUffRDcF9 KZEcRQrvWl6DqdgpgM3ZVhX2I94Ao+GlRpq2l5Kz1nI4/Ag/fctPSXaqgj0YpXsUj/B5 8gTR292mYuCLtuJuN3iV89ucBrByorQO8NJ40= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:mime-version:content-type :content-transfer-encoding:date:in-reply-to:x-ip:references :user-agent:x-http-useragent:message-id:subject:from:to :x-google-approved:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; b=Zhi1JfsA1IEG7cbIhQ5Qx25lRyglDH66WvKFJQz7DX8XDQERPKuGeBgLhIsy4HAPw3 tvWUTvkdYR6w3aWHbjyJcL/zGCe4YcmlIXGOYE1vLtvPBVLjBGCn74eS0VSuN3hkpKPc d/WHaQbJlPe4KMxo53yeyn1YM449Ey55Ru/P0= Received: by 10.229.99.66 with SMTP id t2mr1116917qcn.27.1243339921593; Tue, 26 May 2009 05:12:01 -0700 (PDT) Received: by 10.230.6.42 with SMTP id 42gr10201vbx.0; Tue, 26 May 2009 05:11:54 -0700 (PDT) X-Sender: horse_dung@hotmail.com X-Apparently-To: beagleboard@googlegroups.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_4A1BDC9C.C28100BA" Content-Transfer-Encoding: quoted-printable Received: by 10.101.68.19 with SMTP id v19mr156148ank.1.1242849494798; Wed, 20 May 2009 12:58:14 -0700 (PDT) Date: Wed, 20 May 2009 12:58:14 -0700 (PDT) In-Reply-To: <49F551A5.9030606@cse.unsw.edu.au> X-IP: 86.135.200.149 References: <49F551A5.9030606@cse.unsw.edu.au> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.10) Gecko/2009042523 Ubuntu/8.10 (intrepid) Firefox/3.0.10,gzip(gfe),gzip(gfe) Message-ID: <533bb04a-1569-4d21-97bc-f81d3b3391fd@r34g2000vba.googlegroups.com> Subject: **SPAM:5.1** [beagleboard] Re: Measuring Power Consumption From: horse_dung@hotmail.com To: Beagle Board X-Google-Approved: jkridner@beagleboard.org via web at 2009-05-26 12:11:52 Reply-To: beagleboard@googlegroups.com Sender: beagleboard@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list beagleboard@googlegroups.com; contact beagleboard+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: beagleboard@googlegroups.com X-BeenThere: beagleboard@googlegroups.com X-Spam-Flag: YES X-Spam-Status: Yes, score=5.1 required=5.0 tests=AWL,BAYES_00, DATE_IN_PAST_96_XX,DKIM_SIGNED,FORGED_HOTMAIL_RCVD2,KHOP_NEWSLETTER, KHOP_NO_FULL_NAME,KHOP_SENDER_BOT,KHOP_UNSUB_LINK,RCVD_IN_JMF_YE,SPF_PASS, X_IP shortcircuit=no autolearn=no version=3.2.5 X-Spam-Level: ***** X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on guardian.ics.com X-Virus-Scanned: ClamAV 0.94.2/9393/Tue May 26 06:17:55 2009 on guardian.ics.com X-Virus-Scanned: ClamAV 0.94.2/9393/Tue May 26 06:17:55 2009 on guardian.ics.com X-Virus-Status: Clean X-Kolab-Scheduling-Message: FALSE This is a multi-part message in MIME format. ------------=_4A1BDC9C.C28100BA Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Spam detection software, running on the system "guardian.ics.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Spam detection software, running on the system "guardian.ics.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. [...] Content analysis details: (5.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.1 KHOP_SENDER_BOT Message sent from a bulk service or bot 3.2 X_IP Message has X-IP header 0.3 KHOP_NO_FULL_NAME Sender does not have both first and last names 0.0 RCVD_IN_JMF_YE RBL: JunkEmailFilter: relay in yellow list (varies) [74.125.44.25 listed in hostkarma.junkemailfilter.com] 1.7 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date -0.2 SPF_PASS SPF: sender matches SPF record 1.5 FORGED_HOTMAIL_RCVD2 hotmail.com 'From' address, but no 'Received:' 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.7 KHOP_NEWSLETTER BODY: Is a newsletter or has unsubscribe details -3.0 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.8 KHOP_UNSUB_LINK Contains a subscription management link -0.0 AWL AWL: From: address is in the auto white-list The original message was not completely plain text, and may be unsafe to open with some email clients; in particular, it may contain a virus, or confirm that your address can receive spam. If you wish to view it, it may be safer to save it to a file and open it with an editor. ------------=_4A1BDC9C.C28100BA Content-Type: message/rfc822; x-spam-type=original Content-Description: original message before SpamAssassin Content-Disposition: attachment Content-Transfer-Encoding: 8bit X-Envelope-From: X-Envelope-To: Received: from guardian.ics.com (scrubbed@localhost [127.0.0.1]) by mail-relay.ics.com (8.13.8/8.13.8/Debian-3) with ESMTP id n4QCC9NA021362 Mon, 4 May 2009 14:41:34 -0400 (envelope-from ) Received: (from scrubbed@localhost) by guardian.ics.com (8.13.8/8.13.8/Submit) id n4QCC9Bb021361 for scrubbed@snowbird; Tue, 26 May 2009 08:12:09 -0400 Received: from yx-out-2122.google.com (yx-out-2122.google.com [74.125.44.25]) by mail-relay.ics.com (envelope-from grbounce-mhDLDAUAAACCWz0gcxlWH96hoF08oTo0=scrubbed=ics.com@googlegroups.com) (8.13.8/8.13.8/Debian-3) with ESMTP id n4QCC1SH021286 for ; Tue, 26 May 2009 08:12:04 -0400 Received: by yx-out-2122.google.com with SMTP id 22so414631yxm.3 for ; Tue, 26 May 2009 05:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :mime-version:content-type:content-transfer-encoding:received:date :in-reply-to:x-ip:references:user-agent:x-http-useragent:message-id :subject:from:to:x-google-approved:reply-to:sender:precedence :x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; bh=ijiZliFrXEOqaNiiY8+AeP3U6wKBUxh17VO/i5ROXic=; b=r75FUrBsKD8QFUZH7oMPaRlVsAkXQdUs6QuEXTzULLvobLA0dbV9FprUBGUffRDcF9 KZEcRQrvWl6DqdgpgM3ZVhX2I94Ao+GlRpq2l5Kz1nI4/Ag/fctPSXaqgj0YpXsUj/B5 8gTR292mYuCLtuJuN3iV89ucBrByorQO8NJ40= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:mime-version:content-type :content-transfer-encoding:date:in-reply-to:x-ip:references :user-agent:x-http-useragent:message-id:subject:from:to :x-google-approved:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; b=Zhi1JfsA1IEG7cbIhQ5Qx25lRyglDH66WvKFJQz7DX8XDQERPKuGeBgLhIsy4HAPw3 tvWUTvkdYR6w3aWHbjyJcL/zGCe4YcmlIXGOYE1vLtvPBVLjBGCn74eS0VSuN3hkpKPc d/WHaQbJlPe4KMxo53yeyn1YM449Ey55Ru/P0= Received: by 10.229.99.66 with SMTP id t2mr1116917qcn.27.1243339921593; Tue, 26 May 2009 05:12:01 -0700 (PDT) Received: by 10.230.6.42 with SMTP id 42gr10201vbx.0; Tue, 26 May 2009 05:11:54 -0700 (PDT) X-Sender: horse_dung@hotmail.com X-Apparently-To: beagleboard@googlegroups.com Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----------=_4A1BDC99.3F5AE920" Content-Transfer-Encoding: quoted-printable Received: by 10.101.68.19 with SMTP id v19mr156148ank.1.1242849494798; Wed, 20 May 2009 12:58:14 -0700 (PDT) Date: Wed, 20 May 2009 12:58:14 -0700 (PDT) In-Reply-To: <49F551A5.9030606@cse.unsw.edu.au> X-IP: 86.135.200.149 References: <49F551A5.9030606@cse.unsw.edu.au> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.10) Gecko/2009042523 Ubuntu/8.10 (intrepid) Firefox/3.0.10,gzip(gfe),gzip(gfe) Message-ID: <533bb04a-1569-4d21-97bc-f81d3b3391fd@r34g2000vba.googlegroups.com> Subject: **SPAM:5.1** [beagleboard] Re: Measuring Power Consumption From: horse_dung@hotmail.com To: Beagle Board X-Google-Approved: jkridner@beagleboard.org via web at 2009-05-26 12:11:52 Reply-To: beagleboard@googlegroups.com Sender: beagleboard@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list beagleboard@googlegroups.com; contact beagleboard+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: beagleboard@googlegroups.com X-BeenThere: beagleboard@googlegroups.com X-Virus-Scanned: ClamAV 0.94.2/9393/Tue May 26 06:17:55 2009 on guardian.ics.com X-Virus-Status: Clean This is a multi-part message in MIME format. ------------=_4A1BDC99.3F5AE920 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit Spam detection software, running on the system "guardian.ics.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: I've been looking at the exact same thing - I've not quite got the solution working yet - but I'm pretty close... Here's my summary... If anyone can spot any mistakes in the calculations, or knows why all my ADCINs are reading 0 then please please please comment...!!! [...] Content analysis details: (5.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 0.1 KHOP_SENDER_BOT Message sent from a bulk service or bot 3.2 X_IP Message has X-IP header 0.3 KHOP_NO_FULL_NAME Sender does not have both first and last names 0.0 RCVD_IN_JMF_YE RBL: JunkEmailFilter: relay in yellow list (varies) [74.125.44.25 listed in hostkarma.junkemailfilter.com] 1.7 DATE_IN_PAST_96_XX Date: is 96 hours or more before Received: date -0.2 SPF_PASS SPF: sender matches SPF record 1.5 FORGED_HOTMAIL_RCVD2 hotmail.com 'From' address, but no 'Received:' -0.0 DKIM_VERIFIED Domain Keys Identified Mail: signature passes verification 0.0 DKIM_SIGNED Domain Keys Identified Mail: message has a signature 0.7 KHOP_NEWSLETTER BODY: Is a newsletter or has unsubscribe details -3.0 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.8 KHOP_UNSUB_LINK Contains a subscription management link ------------=_4A1BDC99.3F5AE920 Content-Type: message/rfc822; x-spam-type=original Content-Description: original message before SpamAssassin Content-Disposition: inline Content-Transfer-Encoding: 8bit X-Envelope-From: X-Envelope-To: Received: from yx-out-2122.google.com (yx-out-2122.google.com [74.125.44.25]) by mail-relay.ics.com (8.13.8/8.13.8/Debian-3) with ESMTP id n4QCC1SH021286 Tue, 26 May 2009 08:12:01 -0400 (envelope-from ) Received: by yx-out-2122.google.com with SMTP id 22so414631yxm.3 for ; Tue, 26 May 2009 05:12:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=beta; h=domainkey-signature:received:received:x-sender:x-apparently-to :mime-version:content-type:content-transfer-encoding:received:date :in-reply-to:x-ip:references:user-agent:x-http-useragent:message-id :subject:from:to:x-google-approved:reply-to:sender:precedence :x-google-loop:mailing-list:list-id:list-post:list-help :list-unsubscribe:x-beenthere-env:x-beenthere; bh=ijiZliFrXEOqaNiiY8+AeP3U6wKBUxh17VO/i5ROXic=; b=r75FUrBsKD8QFUZH7oMPaRlVsAkXQdUs6QuEXTzULLvobLA0dbV9FprUBGUffRDcF9 KZEcRQrvWl6DqdgpgM3ZVhX2I94Ao+GlRpq2l5Kz1nI4/Ag/fctPSXaqgj0YpXsUj/B5 8gTR292mYuCLtuJuN3iV89ucBrByorQO8NJ40= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlegroups.com; s=beta; h=x-sender:x-apparently-to:mime-version:content-type :content-transfer-encoding:date:in-reply-to:x-ip:references :user-agent:x-http-useragent:message-id:subject:from:to :x-google-approved:reply-to:sender:precedence:x-google-loop :mailing-list:list-id:list-post:list-help:list-unsubscribe :x-beenthere-env:x-beenthere; b=Zhi1JfsA1IEG7cbIhQ5Qx25lRyglDH66WvKFJQz7DX8XDQERPKuGeBgLhIsy4HAPw3 tvWUTvkdYR6w3aWHbjyJcL/zGCe4YcmlIXGOYE1vLtvPBVLjBGCn74eS0VSuN3hkpKPc d/WHaQbJlPe4KMxo53yeyn1YM449Ey55Ru/P0= Received: by 10.229.99.66 with SMTP id t2mr1116917qcn.27.1243339921593; Tue, 26 May 2009 05:12:01 -0700 (PDT) Received: by 10.230.6.42 with SMTP id 42gr10201vbx.0; Tue, 26 May 2009 05:11:54 -0700 (PDT) X-Sender: horse_dung@hotmail.com X-Apparently-To: beagleboard@googlegroups.com Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Received: by 10.101.68.19 with SMTP id v19mr156148ank.1.1242849494798; Wed, 20 May 2009 12:58:14 -0700 (PDT) Date: Wed, 20 May 2009 12:58:14 -0700 (PDT) In-Reply-To: <49F551A5.9030606@cse.unsw.edu.au> X-IP: 86.135.200.149 References: <49F551A5.9030606@cse.unsw.edu.au> User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (X11; U; Linux i686; en-GB; rv:1.9.0.10) Gecko/2009042523 Ubuntu/8.10 (intrepid) Firefox/3.0.10,gzip(gfe),gzip(gfe) Message-ID: <533bb04a-1569-4d21-97bc-f81d3b3391fd@r34g2000vba.googlegroups.com> Subject: [beagleboard] Re: Measuring Power Consumption From: horse_dung@hotmail.com To: Beagle Board X-Google-Approved: jkridner@beagleboard.org via web at 2009-05-26 12:11:52 Reply-To: beagleboard@googlegroups.com Sender: beagleboard@googlegroups.com Precedence: bulk X-Google-Loop: groups Mailing-List: list beagleboard@googlegroups.com; contact beagleboard+owner@googlegroups.com List-Id: List-Post: List-Help: List-Unsubscribe: , X-BeenThere-Env: beagleboard@googlegroups.com X-BeenThere: beagleboard@googlegroups.com I've been looking at the exact same thing - I've not quite got the solution working yet - but I'm pretty close... Here's my summary... If anyone can spot any mistakes in the calculations, or knows why all my ADCINs are reading 0 then please please please comment...!!! First lets look at the electronics. In the Rev. C boards there is a resistor (R6) which can be used to measure the BeagleBoard's current. R6 is 0.1 ohms which means the current going through it is 10 times the voltage drop across it. Either side of R6 is connected (using a resistor bridge) to the TWL4030's ADCIN3 and ADCIN5 pins. The resistor bridge is a 10K/12K bridge which means approx. 46% of the real voltage is seen by the TWL4030. The TWL4030's ADC is 10-bit which means 1024 distinct values from 0V to 2.5V. The TWL4030 is connected via an I2C bus to the OMAP CPU and the Multichannel ADC (MADC) component of the TWL4030 uses I2C device 0x4a. Okay, next step some mathematics. If "x" is the difference in the values measured by the ADC, then the voltage difference at the ADC input is: x*2.5/1024. Taking into account the resistor bridge, the real voltage across R6 is x*2.5/1024*(10+12)/10, which when simplified becomes x*11/2048. So, the current usage is x*110/2048 which simplifies down to x*55/1024. Okay, we've got the formula we need to use on the ADC input values as seen by the software. Now a little note on accuracy. I haven't looked up the accuracy of the resistors or the ADC's accuracy but these too will have an impact. A change in value of x by just 1 equates to a current change of around 54mA. So the accuracy of the current drawn is going to be approximate...! If the TWL's MADC is anything like others I've used then they tend to fluctuate/jitter quite a lot - so a nice idea to measure the board's current usage might end up being effectively useless... Okay, enough already, onto the linux code. There is already fairly comprehensive support for the TWL4030 in the linux kernel. There is even a module (twl4030-madc.ko) that provides an interface for the MADC functionality. However, I've not been having much luck it. I added some printk() debug statements to drivers/i2c/chips/twl4030- madc.c and the init function twl4030_madc_init() is being called, but the driver's probe function twl4030_madc_driver() is not being called...?! That said, the module has a lot of code in it that shows how to use the twl4030-core module's function to perform the I2C communication and talk to the MADC. Being somewhat impatient, I just knocked up my own kernel module... :) Now, my module fails to get any useful values from any of the ADCIN pins... everything works, but all the ADCIN come back as zero. Since R6 is pretty much at supply voltage I would have expected values at or near 1024 for both ADCIN3 and ADCIN5... :( You don't have to code I2C communications in the kernel (although for complex devices its probably a good idea) - so I installed i2c-tools and started poking the TWL4030 from userland. Again, I can't seem to get anything useful back from the MADC other than zeros. I've got the TWL4030 datasheet/manual, so I'm going to take a read of that later on... I will post back here if, no WHEN, I get it working :) On Apr 27, 7:33=A0am, Etienne Le Sueur wrote: > Hi, > > Does anyone have any linux code which can use the ADC's on the TWL4030 > to measure the power consumption of the beagleboard? > > Thanks, > Etienne Le Sueur --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "= Beagle Board" group. To post to this group, send email to discussion@beagleboard.org. To unsubscribe from this group, send email to beagleboard-unsubscribe@beagl= eboard.org For more options, visit this group at http://groups.google.com/group/beagle= board?hl=3Den -~----------~----~----~----~------~----~------~--~--- ------------=_4A1BDC99.3F5AE920-- ------------=_4A1BDC9C.C28100BA--