OpenPlotter I2C 3.x.x - INA219 settings - Printable Version +- OpenMarine (https://forum.openmarine.net) +-- Forum: OpenPlotter (https://forum.openmarine.net/forumdisplay.php?fid=1) +--- Forum: How do I...? (https://forum.openmarine.net/forumdisplay.php?fid=3) +--- Thread: OpenPlotter I2C 3.x.x - INA219 settings (/showthread.php?tid=4310) Pages:
1
2
|
RE: OpenPlotter I2C 3.x.x - INA219 settings - Sailoog - 2022-11-25 Done. The default mode is still set_calibration_32V_2A because set_calibration_16V_5A assumes a shunt resistor of 0.02 ohm and most modules have a 0.1 ohm resistor. I do not have a INA219 so this has been blind development. It is not tested, just no coding errors. Test and report please, thanks. RE: OpenPlotter I2C 3.x.x - INA219 settings - tobias.e - 2022-11-27 The new settings are visible when adding the sensor. Default Settings seem to work. Settings are not visibe when editing the sensor. Changing from RANGE_32V to RANGE_16V while adding the sensor works - at least i still get sensible readings and no debugging output. Changing the other values also does something - but i still need to figure out how to convert the values from the html-tool. how do i calculate the values for current_lsb and power_lsb from this: Best regards Tobias RE: OpenPlotter I2C 3.x.x - INA219 settings - Sailoog - 2022-11-28 These are the allowed values: current_lsb: float values allowed. cal_value: integer values allowed. power_lsb: float values allowed. bus_voltage_range: RANGE_16V RANGE_32V gain: DIV_1_40MV DIV_2_80MV DIV_4_160MV DIV_8_320MV bus_adc_resolution: ADCRES_9BIT_1S ADCRES_10BIT_1S ADCRES_11BIT_1S ADCRES_12BIT_1S ADCRES_12BIT_2S ADCRES_12BIT_4S ADCRES_12BIT_8S ADCRES_12BIT_16S ADCRES_12BIT_32S ADCRES_12BIT_64S ADCRES_12BIT_128S shunt_adc_resolution: same as bus_adc_resolution mode: POWERDOWN SVOLT_TRIGGERED BVOLT_TRIGGERED SANDBVOLT_TRIGGERED ADCOFF SVOLT_CONTINUOUS BVOLT_CONTINUOUS SANDBVOLT_CONTINUOUS You can deduce the correspondence with the result of the html tool by their names. I do not have neither a INA219 nor time to play with this, can someone help interpret this html tool? RE: OpenPlotter I2C 3.x.x - INA219 settings - RichFind - 2022-11-29 Tobias, Send a pic of the entire page of the html-tool, with the values you entered. I will be able to enter the values on my system. Sailoog, Same thing, send the entire page of the html-tool with the values you entered to set the defaults. Thank you. RE: OpenPlotter I2C 3.x.x - INA219 settings - Sailoog - 2022-11-29 I got these defaults from the code (mode "set_calibration_32V_2A"), not from the html tool. RE: OpenPlotter I2C 3.x.x - INA219 settings - tobias.e - 2022-11-29 (2022-11-29, 06:47 PM)Sailoog Wrote: I got these defaults from the code (mode "set_calibration_32V_2A"), not from the html tool. I guess i just figured it out: leaving all default values in RichFinds HTML and choosing a LSB of 100 microamps gives the default values in sailoogs screenshot. you just have to adjust for units: openpoltter expects current_lsb in milliamps (0.1mA=100uA), and power_lsb in Watt (0.002 W=2mW). update: almost. Current and voltage measurements are OK, power is off my a factor of 1000, so power_lsb is also in mW. The numbers for voltage, current and power in signalK don't line up perfectly, as they are taken at slightly different times, and my test load (the raspberry) is fluctuating a bit. RE: OpenPlotter I2C 3.x.x - INA219 settings - RichFind - 2022-11-30 That is what I thought was happing but I wanted to check with the values you were using to verify before posting. Try turning on the raw values. Just to see if they are coming out the same. You probably should increase the number of samples: ADCRES_12BIT_1S ADCRES_12BIT_2S ADCRES_12BIT_4S ADCRES_12BIT_8S ADCRES_12BIT_16S ADCRES_12BIT_32S ADCRES_12BIT_64S ADCRES_12BIT_128S Same for the bus voltage: SADCRES_12BIT_1S etc. It also bothers me that the shunt voltage = null Might be due to high current shunt with low current. RE: OpenPlotter I2C 3.x.x - INA219 settings - tobias.e - 2022-11-30 Raw Voltages are fine, raw current and power seem to be in mA and mW, respectively. for roughly half an Ampere, the Shunt voltage is 3 to 4 mV, that may well be interpreted as null. I'll try a setup with lager currents this weekend. |