Open RehabAbdAllah opened 4 weeks ago
Hello @RehabAbdAllah Please try the suggestion posted here: https://github.com/IRNAS/ppk2-api-python/issues/36#issuecomment-1708123098
Please report your findings.
Hi @NejcKle Thank you for your reply . I used the suggested fix . but I see a gradual increase to the total samples because the read samples are again unrealistic after a certain amount of time . I cannot add all the samples but this are the samples after 12 seconds and after 599 seconds.
After 12 seconds
Average of 10000 samples is: 1.0613972225712949mA
[12.643112897872925]Average current: 2.5463548116633516mA
[12.648344993591309]Average current: 2.5463548116633516mA
[12.653423070907593]Average current: 2.5463548116633516mA
[12.658760070800781]Average current: 2.5463548116633516mA
[12.663992881774902]Average current: 2.5463548116633516mA
[12.669111013412476]Average current: 2.5463548116633516mA
[12.674423933029175]Average current: 2.5463548116633516mA
[12.67964792251587]Average current: 2.5463548116633516mA
[12.685637950897217]Average current: 2.5463548116633516mA
[12.691624879837036]Average current: 2.5463548116633516mA
[12.698649883270264]Average current: 2.5463548116633516mA
[12.704917907714844]Average current: 2.5463548116633516mA
[12.710555076599121]Average current: 2.5463548116633516mA
[12.71591591835022]Average current: 2.5463548116633516mA
[12.725473880767822]Average current: 2.5463548116633516mA
[12.744505882263184]Average current: 2.5463548116633516mA
[12.756057024002075]Average current: 2.5463548116633516mA
Average of 10000 samples is: 0.8791979206356576mA
[12.769118785858154]Average current: 2.533227592048855mA
[12.77507996559143]Average current: 2.533227592048855mA
[12.780687093734741]Average current: 2.533227592048855mA
[12.786417007446289]Average current: 2.533227592048855mA
[12.791770935058594]Average current: 2.533227592048855mA
[12.797851085662842]Average current: 2.533227592048855mA
[12.803261756896973]Average current: 2.533227592048855mA
[12.810301065444946]Average current: 2.533227592048855mA
[12.822291851043701]Average current: 2.533227592048855mA
[12.831923961639404]Average current: 2.533227592048855mA
[12.842575073242188]Average current: 2.533227592048855mA
Average of 10000 samples is: 1.0778059890655785mA
After 599 seconds
[599.2935330867767]Average current: 7164.5617474398705mA
[599.3699128627777]Average current: 7167.4175782322545mA
[599.4410929679871]Average current: 7167.4175782322545mA
[599.5158860683441]Average current: 7167.4175782322545mA
[599.5906610488892]Average current: 7167.4175782322545mA
[599.6636469364166]Average current: 7167.4175782322545mA
Average of 10000 samples is: 6816.917575591368mA
[599.7597930431366]Average current: 7167.266500644936mA
[599.8310089111328]Average current: 7167.266500644936mA
[599.903904914856]Average current: 7167.266500644936mA
[599.9753179550171]Average current: 7167.266500644936m
Have you tried with the official software and confirmed that is behaving correctly?
yes it works fine on GUI application on my Mac and the python scripts works well on Raspberry pi . I can only see this problem with python scripts on Mac M1 . I am asumming it is something to do with the USB ports on Mac but I am not sure . for now I am using RPI to measure the current consumption with PPK2 .
Hi .. I am running PPK2 GUI and it works as expected . trying to automate the current consumption measurement using ppk2-api but after few samples I get unrealistic measurements . I know nothing is wrong with the connections as I get the expected measurement from PPK2 GUI .
My tests takes a long(ish) time as I want to measure consumption as different states . I notice after ~ 20 minutes the samples looks unrealistic giving ~ 933333333 mA .
I set delay_between_samples_in_sec to 1 sec . measurment logic runs in a thread and prints samples
Script I run to automate measurement - I save all the samples in a csv file to post process it later
Unrealistic output that I get after sometime