r5697 - in developers/werner: . bl-pwr
werner at docs.openmoko.org
werner at docs.openmoko.org
Mon Oct 19 18:36:24 CEST 2009
Author: werner
Date: 2009-10-19 18:36:24 +0200 (Mon, 19 Oct 2009)
New Revision: 5697
Added:
developers/werner/bl-pwr/
developers/werner/bl-pwr/bl
developers/werner/bl-pwr/led.py
Log:
Backlight power efficiency measurements.
Added: developers/werner/bl-pwr/bl
===================================================================
--- developers/werner/bl-pwr/bl (rev 0)
+++ developers/werner/bl-pwr/bl 2009-10-19 16:36:24 UTC (rev 5697)
@@ -0,0 +1,65 @@
+!LEDOUT Vbat Ibat Pbat Vledout Vledfb (V) Isense Vled Pled
+! (V) (mA) (mW) (V) nominal meas. (mA) (V) (mW)
+0x01 4.174 92 383.966 10.041 0.003 0.004 0.097 10.037 0.975
+0x02 4.173 92 383.946 10.151 0.006 0.007 0.161 10.144 1.633
+0x03 4.173 92 383.909 10.267 0.009 0.012 0.276 10.255 2.827
+0x04 4.173 93 388.076 10.308 0.012 0.014 0.334 10.294 3.441
+0x05 4.173 93 388.094 10.343 0.016 0.017 0.394 10.327 4.067
+0x06 4.173 93 388.080 10.400 0.020 0.021 0.509 10.379 5.280
+0x07 4.173 94 392.270 10.451 0.023 0.027 0.630 10.424 6.568
+0x08 4.173 94 392.258 10.475 0.028 0.029 0.691 10.446 7.219
+0x09 4.173 94 392.244 10.516 0.032 0.034 0.808 10.482 8.467
+0x0a 4.173 95 396.409 10.554 0.036 0.039 0.925 10.515 9.728
+0x0b 4.172 95 396.362 10.590 0.041 0.044 1.046 10.546 11.028
+0x0c 4.172 96 400.521 10.623 0.046 0.049 1.161 10.574 12.272
+0x0d 4.172 96 400.488 10.655 0.051 0.054 1.278 10.601 13.548
+0x0e 4.172 97 404.645 10.685 0.057 0.059 1.396 10.627 14.836
+0x0f 4.172 97 404.637 10.730 0.063 0.066 1.573 10.664 16.772
+0x10 4.172 97 404.652 10.757 0.069 0.071 1.688 10.686 18.042
+0x11 4.171 98 408.793 10.798 0.075 0.079 1.861 10.719 19.943
+0x12 4.171 98 408.788 10.824 0.082 0.083 1.978 10.741 21.241
+0x13 4.171 99 412.932 10.862 0.089 0.091 2.149 10.771 23.150
+0x14 4.171 99 412.888 10.899 0.096 0.098 2.322 10.801 25.078
+0x15 4.170 100 417.034 10.936 0.104 0.105 2.496 10.830 27.034
+0x16 4.170 101 421.166 10.983 0.112 0.115 2.727 10.868 29.638
+0x17 4.169 102 425.287 11.019 0.121 0.123 2.904 10.896 31.641
+0x18 4.169 103 429.450 11.064 0.130 0.132 3.137 10.932 34.289
+0x19 4.169 104 433.594 11.109 0.139 0.142 3.370 10.967 36.965
+0x1a 4.169 105 437.712 11.154 0.149 0.152 3.605 11.002 39.661
+0x1b 4.168 105 437.690 11.197 0.160 0.162 3.834 11.035 42.307
+0x1c 4.168 107 445.982 11.249 0.171 0.174 4.123 11.075 45.664
+0x1d 4.167 108 450.042 11.301 0.183 0.186 4.413 11.115 49.045
+0x1e 4.167 109 454.189 11.353 0.195 0.199 4.704 11.154 52.470
+0x1f 4.167 111 462.504 11.404 0.208 0.211 5.000 11.193 55.971
+0x20 4.166 111 462.473 11.454 0.221 0.223 5.288 11.231 59.387
+0x21 4.166 113 470.774 11.512 0.235 0.238 5.631 11.274 63.488
+0x22 4.165 114 474.823 11.569 0.250 0.252 5.970 11.317 67.562
+0x23 4.165 116 483.103 11.637 0.266 0.269 6.382 11.367 72.543
+0x24 4.164 118 491.397 11.701 0.283 0.286 6.779 11.415 77.385
+0x25 4.163 120 499.611 11.767 0.300 0.303 7.186 11.463 82.370
+0x26 4.162 122 507.825 11.833 0.318 0.321 7.603 11.512 87.521
+0x27 4.162 124 516.116 11.906 0.337 0.341 8.069 11.566 93.323
+0x28 4.161 126 524.345 11.979 0.358 0.360 8.536 11.618 99.178
+0x29 4.161 129 536.738 12.058 0.379 0.382 9.055 11.676 105.733
+0x2a 4.159 131 544.864 12.138 0.401 0.404 9.576 11.734 112.365
+0x2b 4.159 134 557.254 12.224 0.424 0.428 10.152 11.796 119.746
+0x2c 4.157 137 569.534 12.309 0.449 0.453 10.725 11.857 127.163
+0x2d 4.156 139 577.748 12.396 0.475 0.478 11.316 11.919 134.871
+0x2e 4.155 143 594.219 12.488 0.502 0.504 11.945 11.984 143.149
+0x2f 4.154 146 606.494 12.588 0.531 0.534 12.644 12.055 152.423
+0x30 4.153 150 622.942 12.689 0.561 0.563 13.347 12.126 161.843
+0x31 4.152 153 635.222 12.794 0.593 0.595 14.094 12.199 171.940
+0x32 4.150 158 655.698 12.907 0.626 0.629 14.898 12.278 182.916
+0x33 4.149 162 672.094 13.018 0.661 0.663 15.702 12.356 194.006
+0x34 4.146 166 688.291 13.136 0.698 0.699 16.560 12.437 205.958
+0x35 4.145 171 708.828 13.263 0.736 0.738 17.496 12.525 219.135
+0x36 4.143 176 729.192 13.395 0.777 0.780 18.472 12.616 233.031
+0x37 4.141 181 749.535 13.527 0.819 0.821 19.461 12.706 247.268
+0x38 4.139 187 773.950 13.665 0.864 0.865 20.504 12.800 262.457
+0x39 4.136 194 802.465 13.818 0.912 0.914 21.661 12.904 279.502
+0x3a 4.134 201 830.921 13.966 0.961 0.962 22.803 13.004 296.526
+0x3b 4.131 208 859.321 14.125 1.013 1.014 24.031 13.110 315.054
+0x3c 4.128 217 895.840 14.294 1.068 1.070 25.354 13.224 335.284
+0x3d 4.125 225 928.140 14.462 1.126 1.126 26.675 13.337 355.761
+0x3e 4.121 234 964.339 14.644 1.186 1.187 28.118 13.458 378.409
+0x3f 4.117 244 1004.608 14.834 1.250 1.250 29.631 13.584 402.503
Added: developers/werner/bl-pwr/led.py
===================================================================
--- developers/werner/bl-pwr/led.py (rev 0)
+++ developers/werner/bl-pwr/led.py 2009-10-19 16:36:24 UTC (rev 5697)
@@ -0,0 +1,76 @@
+#!/usr/bin/python
+
+from tmc.meter import picotest_m3500a
+from tmc.power import leaptronix_mpp3040d
+from math import exp
+from os import system
+from time import sleep
+
+p = leaptronix_mpp3040d("/dev/ttyUSB0")
+p.debug = False
+
+m = picotest_m3500a()
+m.debug = False
+#print m.chan
+#stop
+
+
+def measure():
+ global ibat, bat, led, sense
+ ibat = p.i()
+ m.v()
+ m.chan = 1
+ bat = m.sample()
+ m.chan = 3
+ led = m.sample()
+ m.chan = 4
+ sense = m.sample()
+
+def results():
+ i_sense = sense/r_sense
+ v_led = led-sense
+
+ print "0x%02x " % n,
+ print "%7.3f" % bat,
+ print "%7d" % (ibat*1000),
+ print "%7.3f" % (bat*ibat*1000),
+ print "%7.3f" % led,
+ print "%7.3f" % (1.25*(exp(n/20.0)-1)/(exp(63/20.0)-1)),
+ print "%7.3f" % sense,
+ print "%7.3f" % (i_sense*1000),
+ print "%7.3f" % v_led,
+ print "%7.3f" % (i_sense*v_led*1000)
+
+
+r_sense = 42.2
+
+print "%-7s" % "LEDOUT",
+print "%-7s" % "Vbat",
+print "%-7s" % "Ibat",
+print "%-7s" % "Pbat",
+print "%-7s" % "Vledout",
+print "%-7s" % "Vledfb",
+print "%-7s" % "(V)",
+print "%-7s" % "Isense",
+print "%-7s" % "Vled",
+print "%-7s" % "Pled"
+
+print "%-7s" % "",
+print "%-7s" % "(V)",
+print "%-7s" % "(mA)",
+print "%-7s" % "(mW)",
+print "%-7s" % "(V)",
+print "%-7s" % "nominal",
+print "%-7s" % "meas.",
+print "%-7s" % "(mA)",
+print "%-7s" % "(V)",
+print "%-7s" % "(mW)"
+
+for n in range(1, 0x40):
+# system("echo imw 73 28 "+("%02x" % n)+" >/dev/ttyACM0");
+# sleep(0.1)
+# system("echo imd 73 28 1 >/dev/ttyACM1");
+ system("echo pmu 0x28=0x"+("%02x" % n)+" >/dev/ttyUSB2");
+ sleep(1) # wait for adjustment
+ measure()
+ results()
Property changes on: developers/werner/bl-pwr/led.py
___________________________________________________________________
Name: svn:executable
+ *
More information about the commitlog
mailing list