Sampling rate

Post Reply
Memo
Posts: 2
Joined: Tue Jul 03, 2018 2:07 am
languages_spoken: english,brazilian-portuguese
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Sampling rate

Unread post by Memo » Tue Jul 03, 2018 2:14 am

Good day!

I am interested in acquiring a couple of SmartPower2 devices to use with my ODROID XU4 to obtain energy consumption of an execution that may take a few hundred milliseconds.

I heard the default sampling rate is 1 Hz, which is too coarse for what I need. I also heard you can increase it to up to 20 Hz, which is still far from perfect, but much more viable.

I would like to know 2 things:

1 - How much can I increase the sampling, and what accuracy will the energy value that is reported have?
2 - Can I obtain the output via UART (with a USB cable connected to a computer) in a way that the computer is not required to connect to a different network? I plan on hooking it up to a server, so I can run my benchmarks (remotely) in the datacenter the computer is in.

Thank you for your time to read and respond to my questions. I hope the SmartPower2 is the adequate solution for my problem.
Cheers!

User avatar
odroid
Site Admin
Posts: 30625
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 13 times
Been thanked: 89 times
Contact:

Re: Sampling rate

Unread post by odroid » Tue Jul 03, 2018 7:57 am

Try the latest firmware v1.4 for UART access.
viewtopic.php?f=86&t=30870#p224167
https://wiki.odroid.com/accessory/power ... ousb_cable

BTW, could you build the SmartPower2 firmware?
https://wiki.odroid.com/accessory/power ... d_firmware
If yes, we will try to let you know which code should be changed to adjust the sample rate.

Memo
Posts: 2
Joined: Tue Jul 03, 2018 2:07 am
languages_spoken: english,brazilian-portuguese
ODROIDs: XU4
Has thanked: 0
Been thanked: 0
Contact:

Re: Sampling rate

Unread post by Memo » Tue Jul 03, 2018 12:34 pm

I believe so, given that I use Ubuntu 16 LTS.

But before I get to that, I need to consider my alternatives regarding sampling rate and achievable accuracy. Could you clarify how accurate the energy consumption metric is, and how high I can get the sampling rate without sacrificing accuracy?

Thank you.

User avatar
odroid
Site Admin
Posts: 30625
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English
ODROIDs: ODROID
Has thanked: 13 times
Been thanked: 89 times
Contact:

Re: Sampling rate

Unread post by odroid » Tue Jul 03, 2018 2:03 pm

Read the INA231 datasheet page 14 and let me know your estimated error rate in 20Hz(~4.7ms) sampling rate.
http://www.ti.com/lit/ds/symlink/ina231.pdf

raditya160053
Posts: 4
Joined: Wed May 15, 2019 7:02 am
languages_spoken: english
ODROIDs: Odroid XU4, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: Sampling rate

Unread post by raditya160053 » Thu May 16, 2019 1:00 am

odroid wrote:
Tue Jul 03, 2018 7:57 am
Try the latest firmware v1.4 for UART access.
viewtopic.php?f=86&t=30870#p224167
https://wiki.odroid.com/accessory/power ... ousb_cable

BTW, could you build the SmartPower2 firmware?
https://wiki.odroid.com/accessory/power ... d_firmware
If yes, we will try to let you know which code should be changed to adjust the sample rate.
Hi, I already have v1.4 firmware on my smartpower 2, but I'm not able to build the firmware using platformio.
I downloaded the firmware from github, but on github they only have v1.1. I created an issue for this on the platformio community forum as well: https://community.platformio.org/t/floa ... umped/7797

Please let me know how I can fix that and how I can increase the sampling rate.

lsc1117
Posts: 116
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 0
Contact:

Re: Sampling rate

Unread post by lsc1117 » Thu May 16, 2019 6:30 pm

I have uploaded the v1.4 firmware.
https://github.com/hardkernel/smartpower2/releases

And because of the build issue, we changed the build platform from "platformio" to "Arduino IDE".
You should get a new arduino branch for building on Arduino IDE. The folder structure has changed slightly.
https://github.com/hardkernel/smartpower2

Please refer this wiki page.
https://wiki.odroid.com/accessory/power ... d_firmware

raditya160053
Posts: 4
Joined: Wed May 15, 2019 7:02 am
languages_spoken: english
ODROIDs: Odroid XU4, SmartPower2
Has thanked: 0
Been thanked: 0
Contact:

Re: Sampling rate

Unread post by raditya160053 » Fri May 17, 2019 5:00 am

Hi @lsc1117, I tried it with the instructions above and it's working, I'm able to build and upload it. Thanks for that.
I'll make a complete report about how to increase the sampling rate for smartpower2 and post it here.

Thanks a lot!

lsc1117
Posts: 116
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 0
Contact:

Re: Sampling rate

Unread post by lsc1117 » Fri May 17, 2019 4:56 pm

You can also use the platformio now.

We fix the build_flags parameter on smartpower2 v1.5.
https://github.com/hardkernel/smartpowe ... 1c9bf58f63

Post Reply

Return to “Smart Power”

Who is online

Users browsing this forum: No registered users and 1 guest