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

Add Software Trimpots #80

Closed
DeeEmm opened this issue Aug 22, 2021 · 3 comments
Closed

Add Software Trimpots #80

DeeEmm opened this issue Aug 22, 2021 · 3 comments

Comments

@DeeEmm
Copy link
Owner

DeeEmm commented Aug 22, 2021

Conversion between 5v field devices and the 3.3v ESP will be done on the shield with signal conditioning. This should also include some form of trim pot and test point so that the input voltage can be calibrated.

This requests ads software 'trimpots' to the input channels so that the value can be further dialled in should it require it.

Each Trimpot can either be

  • A constant value within the configuration file
  • A configurable value that can be dialled in by the API / calibration

As the 5v-3.3v conversion tuff needs to be done for the ESP32. I'm adding this to the ESP32 Port project

@DeeEmm
Copy link
Owner Author

DeeEmm commented Aug 22, 2021

It should be noted that we can already view raw sensor voltage data via the API.

@DeeEmm
Copy link
Owner Author

DeeEmm commented Aug 22, 2021

For the moment I've added some definitions to the config file...

#define PREF_TRIMPOT 0.0

etc...

@DeeEmm
Copy link
Owner Author

DeeEmm commented Aug 23, 2021

Added trimpots to all input data streams within sensors class.

For example...

double mafMillivolts = (mafFlowRaw * (_hardware.getSupplyMillivolts() / 4095.0)) * 1000;
mafMillivolts += MAF_TRIMPOT;
return mafMillivolts;

Trimpot value can be determined by comparing measured sensor output voltage and calculated voltage in API. The trimport should be set to the difference to bring the calculated value in-line.

This procedure will form part of initial calibration when setting up the shield.

I may revisit this at a later stage to refine how we do this but for a one-off routine I think it is acceptable.

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

1 participant