Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wrong temperature scaling, wrong MIN_AMPS_IN (maybe ?) #6

Open
vankxr opened this issue Oct 4, 2020 · 2 comments
Open

Wrong temperature scaling, wrong MIN_AMPS_IN (maybe ?) #6

vankxr opened this issue Oct 4, 2020 · 2 comments

Comments

@vankxr
Copy link

vankxr commented Oct 4, 2020

Hello,
I recently got my hands in two HSTNS-PL18 (750W version of the PSU) and started reading out data and experimenting with this code.
First thing I noticed is that the register named MIN_AMPS_IN should in fact be MAX_AMPS_IN. I guess you should have suspected it since the other two (power in & out) are also the maximum, and it makes no sense (for me) to keep track of the minimum input current.
The second thing I noticed was the temperature scaling. 32 did not cut it for me, even interpreting the result as degrees Fahrenheit, it was reporting freezing temperatures (~10 C) which is way off. One can easily find the correct scaling factor by taking a close look at the disassembly. here you can see the variable that holds the temperature being multiplied by 0x40 (64) before being copied to the RAM location that corresponds to the temperature register. If you read the register and divide by 64 you will get the temperature in Celsius, which makes much more sense! (25.9 C intake temperature)

I also noticed a couple of other small things, like wrong current and power scaling, but I have yet to confirm those by attaching a big known load to the supply. With the provided input power scaling factor I was getting 25 W quiescent which sounds like a lot for a PSU of this quality, and also did not match with the value I got when dividing the Watt-second energy value by the uptime register value (I get 12.25 W, which is very suspect, close to 25/2), but then again, the scaling for the Watt-second could also be wrong. By, once again, looking at the disassembly we can see that the input power is capped to a minimum of 0x32 (50), I don't know why. Also, I am pretty sure that surprise_more_flags, bit 2 is set when the input power is < 50 and is cleared when > 50, so it may indicate that the supply is not loaded (?). The output power seems to be capped too, at 36, but there isn't a flag to signal that.

Also, since I prefer using NodeJS than Python, I ported the essentials out of this code and uploaded a gist, if anyone is interested https://gist.github.com/vankxr/a7acad10b0ddfe273724b21b2dd46c1d

@raplin
Copy link
Owner

raplin commented Oct 23, 2020

Good stuff! Thanks

@vankxr
Copy link
Author

vankxr commented Oct 23, 2020

Hi, in the meantime I also figured that the LSB value of register ON_SECONDS is actually 2s, so an additional /2 is needed to get seconds.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants