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

[WIP] Added TI ina226 I2C power monitor #11755

Merged
merged 1 commit into from
May 17, 2019
Merged

[WIP] Added TI ina226 I2C power monitor #11755

merged 1 commit into from
May 17, 2019

Conversation

davids5
Copy link
Member

@davids5 davids5 commented Apr 1, 2019

@dagar - prelim for discussion on how to factor in this part and finally refactor the batery_status system_power.

There is extra raw values as debug code in the msg for now.

@dagar
Copy link
Member

dagar commented Apr 2, 2019

What are the desired use cases?

  • how should a system with both analog power bricks and ina226 power monitors be configured?
  • multiple ina226 power monitors?

@davids5
Copy link
Member Author

davids5 commented Apr 2, 2019

@dagar Long term analog will go away. This will replace that function. 1 per brick on separate buses.

@davids5
Copy link
Member Author

davids5 commented May 2, 2019

Address changed to 0x41 to match latest HW. Re based on master

@bys1123
Copy link
Contributor

bys1123 commented May 11, 2019

I brought one, glad to test this driver later, my module have a R100(0.1ohm) regsister on it, looks like it's too big for drone, I need to change it. Happy to see there is a shunt parameter for this sensor.

@bys1123
Copy link
Contributor

bys1123 commented May 12, 2019

image
R100 is dead.

@bys1123
Copy link
Contributor

bys1123 commented May 12, 2019

I used a wrong formula earlier. Right way to calculate the power of this resistor is P=I²R

@davids5 davids5 requested review from dagar and removed request for dagar May 17, 2019 17:23
@davids5
Copy link
Member Author

davids5 commented May 17, 2019

@dagar were you going to merge this?

@dagar dagar merged commit ed8c601 into master May 17, 2019
@dagar dagar deleted the master_ina226 branch May 17, 2019 17:33
@bys1123
Copy link
Contributor

bys1123 commented May 17, 2019

  1. Looks like it's not working
    image

image
Parameters shows up, but

  1. the shunt value can't set below “0.001”
  2. They are not showing in Sensors group.

@davids5
Copy link
Member Author

davids5 commented May 18, 2019

@bys1123 What flight controller and what connector did you plug it into?

@bys1123
Copy link
Contributor

bys1123 commented May 18, 2019

@davids5 It's Pixhawk4, on I2C A port.

@bys1123
Copy link
Contributor

bys1123 commented May 18, 2019

image

Looks like the default address is 0x40. 0b1000000

@davids5
Copy link
Member Author

davids5 commented May 18, 2019

The board I am testing is at 0x41, we should add a scan and a range.

@davids5
Copy link
Member Author

davids5 commented May 18, 2019

You can change this line for now

@bys1123
Copy link
Contributor

bys1123 commented May 18, 2019

OK, no problem. I'm try it later.

@bys1123
Copy link
Contributor

bys1123 commented May 18, 2019

Do you think scan this large range would cause other issue? Maybe a parameter for this address is better? Just a suggestion, let's find out.

@bys1123
Copy link
Contributor

bys1123 commented May 18, 2019

image
image
It's working (I didn't connect battery now.)

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

Successfully merging this pull request may close these issues.

3 participants