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

Over/under current limit not settable #4

Open
magpern opened this issue Sep 2, 2021 · 7 comments
Open

Over/under current limit not settable #4

magpern opened this issue Sep 2, 2021 · 7 comments

Comments

@magpern
Copy link

magpern commented Sep 2, 2021

My system can pass over 180 amps. But I cannot set the over/under current limits to more than 127, and if I do, they become -127.
127+127 = 0xFF = one byte. Is the field too small?

image

@stuartpittaway
Copy link
Owner

stuartpittaway commented Sep 2, 2021

What are the shunt amps and MV rating? That determines the maximum.

Those settings only control the relay on the shunt itself, not the controller.

@magpern
Copy link
Author

magpern commented Sep 2, 2021

What are the shunt amps and MV rating? That determines the maximum.

Those settings only control the relay on the shunt itself, not the controller.

I know. But still

image

@stuartpittaway
Copy link
Owner

stuartpittaway commented Sep 2, 2021

Ok, the maximum should be higher than that. I'll take a look at the code.

The max should be

Total shunt amp rating * (40.96/50mV)

So about 163 amps. The shunt is a bit under rated for 180amps

@magpern
Copy link
Author

magpern commented Sep 3, 2021

If I type a value within "total amp rating * (40.96/50)" the value sticks. Like if I type 163, it will save 163. But if I type 165, it will be -159 when saved (over current limit)

@stuartpittaway
Copy link
Owner

stuartpittaway commented Sep 3, 2021

Ok, in which case this is correct.

This is how the INA228 chip works. given you are trying to use 180amps through a 200amp shunt, I believe the shunt is under rated.

You should have a shunt with at least 25% overhead - or about 225amps (probably 250amp shunt would have been better).

I have pointed this out in the documentation here - https://github.com/stuartpittaway/diyBMS-CurrentShunt#shunt

@magpern
Copy link
Author

magpern commented Sep 3, 2021

Highly unlikely that I personally would use 163 amps, I will be around 130 amps max. But regardless. If you type 180 in the field, it accepts it, but changes it to some negative number instead.

@stuartpittaway
Copy link
Owner

Ok, the controller doesn't calculate what is a correct or incorrect value, its simply passing it to the code on the current monitor board, and that then accepts/rejects the value and applies a default if its out of range.

I probably need to make that a little clearer on the screen.

The negative/positive numbers relate to the different limits you can have for charge or discharge.

The "Over current limit" is positive (used for discharge of the battery), the "Under current limit" will be negative (used for charging the battery).

Normally most people will set these to be the same - or just ignore that section completely if they are not using the relay on the current monitor board.

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