[MAGEEC] Accuracy of the power measurement shield

Mark Kettner mark.kettner.91 at gmail.com
Wed Mar 14 17:01:41 GMT 2018


Hi Jeremy,

many thanks for the fast update!

But I discovered a bug (i guess) when using the pyenergy tool. I tried
to use a 5 Ohm resistor. Thus I changed the jumper on the board and
told the host computer tool the new resistor value (via energytool
setup). However the value seems to be ignored and I got really wrong
data (the script assumed R=1, i guess). After modifying the python
file and setting the new resistor value on my own, I still got wrong
values. I played around with Gain, and eventually got almost valid
data again (using R=5 and Gain=26). But here I misuse gain to cancel
out another error in the calculation(?)[0] I guess.

I am by far not familar with this. Did anyone already ran the python
script with different resistor settings and can reproduce this?

[0]https://github.com/jpallister/stm32f4-energy-monitor/blob/v2/pyenergy/src/pyenergy/pyenergy.py#L501
--
Mit freundlichen Gruessen / Best Regards

Mark Kettner


On Fri, Mar 9, 2018 at 3:24 PM, Jeremy Bennett
<jeremy.bennett at embecosm.com> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Hi Mark,
>
> You'll see I have updated the Wiki in line with my email. Looks like
> the ADCs are actually 12-bit.
>
> Best wishes,
>
>
> Jeremy
>
> On 06/03/18 16:48, Jeremy Bennett wrote:
>> On 06/03/18 16:26, Mark Kettner wrote:
>>> Hello everyone,
>>
>>> could someone please tell me the accuracy of the measurement
>>> shield. How can I assume really low power (milli or micro) are
>>> still valid measurements and not just noise? Or is this purely
>>> affected by the selected resistor?
>>
>> Hi Mark,
>>
>> Good to hear from you. James Pallister and Simon Hollis reckoned
>> the measurement is accurate to 1%.
>>
>> I'm out of the office at the moment, so don't have a board to look
>> at. - From memory it uses a 10 bit ADC. To measure the current, the
>> inserted resistor aims to create a maximum 50mV drop. The largest
>> resistor on the board is 5R, which would therefore be for a peak
>> current of 10mA. There is an option to insert a larger resistor if
>> you wish. Voltage range is fixed I think at 0-6V.
>>
>> The circuit was designed to sample at up to 2MHz on each sample
>> point, although at that frequency I would expect inductive and
>> capacitive affects to impact on the accuracy. The standard tool is
>> written in Python and in my experience struggles to sample at much
>> more than 10kHz. However the design is fully open, so there is no
>> problem with modifying the tool and/or the firmware to sample at
>> these higher rates. You can find the software on GitHub.
>>
>>> Unfortunately I couldn't find anything about that in the wiki.
>>
>> Since the MAGEEC work finished some time ago, I've been less
>> proactive in updating the wiki. However I'm happy to add some notes
>> about this. I'll check the facts against the board when I get
>> back.
>>
>> Best wishes,
>>
>>
>> Jeremy
>>
>>> -- Mit freundlichen Gruessen / Best Regards
>>
>>> Mark Kettner _______________________________________________
>>> mageec mailing list mageec at mageec.org
>>> http://mageec.org/cgi-bin/mailman/listinfo/mageec
>>
>>
>>
>
> - --
> Tel:     +44 (1590) 610184
> Cell:    +44 (7970) 676050
> SkypeID: jeremybennett
> Twitter: @jeremypbennett
> Email:   jeremy.bennett at embecosm.com
> Web:     www.embecosm.com
> PGP key: 1024D/BEF58172FB4754E1 2009-03-20
> -----BEGIN PGP SIGNATURE-----
>
> iGMEARECACMFAlqimQMcHGplcmVteS5iZW5uZXR0QGVtYmVjb3NtLmNvbQAKCRC+
> 9YFy+0dU4QmEAJ9YG8ywhGGXH/US6vvW0q4uoZIKPACeIcZaCr4bxf6eC/0lnjQP
> o8lTC/E=
> =FCnR
> -----END PGP SIGNATURE-----


More information about the mageec mailing list