This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm whether you accept or reject these cookies being set.

A cookie will be stored in your browser regardless of choice to prevent you being asked this question again. You will be able to change your cookie settings at any time using the link in the footer.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
INA219 directly on i2c of Pi without ESP8266
#11
i don't know about python for a ina219. But in C you can set the device. shunt value, max amps, max main voltage, bits and sample rates. If the shunt on the module is left in place you need to calculate the total shunt value as resistors in parallel.
The ina219 module can only handle 3.2 amps.

Code:
ina219.begin();
 // setting up our configuration
 // default values are RANGE_32V, GAIN_8_320MV, ADC_12BIT, ADC_12BIT, CONT_SH_BUS
 ina219.configure(INA219::RANGE_16V, INA219::GAIN_1_40MV, INA219::ADC_128SAMP, INA219::ADC_128SAMP, INA219::CONT_SH_BUS);

 // calibrate with our values
 ina219.calibrate(SHUNT_R, SHUNT_MAX_V, BUS_MAX_V, MAX_CURRENT);
Reply


Messages In This Thread
RE: INA219 directly on i2c of Pi without ESP8266 - by ddelorme - 2020-02-10, 02:13 AM

Forum Jump:


Users browsing this thread: 2 Guest(s)