DigitalShoestringSolutions / PowerMonitoring

GNU General Public License v3.0
0 stars 1 forks source link

Feature/Support for Gravity direct current sensor #44

Closed tobyaharris closed 4 weeks ago

tobyaharris commented 1 month ago

If we are preparing a DC current power monitoring solution for SMDH, we may as well keep the code. Even if we don't want to keep it long term, I'm uncomfortable shipping an untagged, let alone untracked, version.

This PR adds toml config files for DC current sensing. The solution otherwise works for DC, only the assumed DC voltage needs to be set matching the machine name in analysis/config/user_config.toml It also adds DC support for an ADC previously unused for Power Monitoring, the ADS1115.

All ADCs can use 3V3. Although the ADS1115 supports 5V input, I propose to keep it on 3V3 for consistency. In testing (with a 3V3 logic supply) up to 7A, I have found amps in : volt out to always be ~15, hence the sensor has linear range for 1.65*15 = ±24.75A, in excess of the sensor's ±20A rating.

The consequences I don't like:

tobyaharris commented 1 month ago

Greg would like this to happen, will support edits to calibration system

tobyaharris commented 1 month ago

How users will tune the parameters of their won't be something the user can guess - will be like the extra paragraphs we have come up with before to change the i2caddress, sample rate and sample count.