Closed SJThomas29 closed 1 year ago
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.
Memory usage change @ 61ae6f3d5020dcb1d1ddc165071190272eff1283
Board | flash | % | RAM for global variables | % |
---|---|---|---|---|
arduino:mbed_portenta:envie_m7 | :green_heart: -64 - 0 | -0.01 - 0.0 | 0 - 0 | 0.0 - 0.0 |
@SJThomas29 thanks for the PR! I'd only add an overload for the function call without parameters so older sketches will not break (and examples will not need to be changed). @Rocketct can you test the functionality in the meantime?
@SJThomas29 thanks for the PR! I'd only add an overload for the function call without parameters so older sketches will not break (and examples will not need to be changed). @Rocketct can you test the functionality in the meantime?
No problem! Good idea, that will work better. Have reverted the example changes and added the overload when no input is given.
Memory usage change @ 287fd644a746d70fc65f4d87ef98d0fdc76dcfa0
Board | flash | % | RAM for global variables | % |
---|---|---|---|---|
arduino:mbed_portenta:envie_m7 | 0 - 0 | 0.0 - 0.0 | 0 - 0 | 0.0 - 0.0 |
Please can this PR be progressed. I really need this feature and the documentation (Updated 08/05//2023) clearly states:
"Each channel is SW configurable to be: 0-10V input 4-20mA input NTC input..."
I am happy to help in any way I can. Many thanks
Friends, A big vote for this PR to become finalized and added to the docs. Needing it for a project. Thanks for all you are doing!
@manchoz would you mind to give this a spin ?
As the CLA has not been signed would anyone object to me re-factoring @SJThomas29 code and creating a new PR?
Hi @SJThomas29, Thank you for proposing this change. We've decided not to implement it. The reason for this decision is our concern for hardware safety. Incorrect management could potentially damage the board.
@leonardocavagnis, This functionality is still cited in the data sheet dated 21/09/23 on Page 12:
"There are three independent analog input channels available. Each of them has an analog switch TS12A44514PWR which is switching between three modes: 0-10V: The input is connected to a 100 kΩ and 39 kΩ resistor divider. A 0-10V input is scaled down to 0-2.8V. The input impedance is approximately 28 kΩ. 4-20mA: The input is connected to a 120Ω resistor. Having 4-20mA current input for a 0.48V-2.4V voltage. NTC: The input is connected to a 3V voltage reference (REF3330AIRSER) with a 100 kΩ resistor in series, becoming part of a resistor divider powered by the voltage reference."
Are you going to update the documentation to align with your decision?
Please can you detail the potential damage you are sighting. I am using this code in my project to monitor 0-10V and 4..20mA sources and have not experienced any problems for 4 months.
Hi @MDBInd, For example, potential damage arises in your case if you accidentally reverse the voltage reading sensor with the current reading sensor, breaking the analog input port. We prefer not to offer the user the option to select different types of readings to prevent potential issues. Feel free to use this PR at your own risk.
Changed the analog_in.set... functions so they take a channel input. Allowing channel modes to be set individually. I.e. measure current on AI0 and voltage on AI1. Also updated analog in examples with this functionality with a link to warning in full-pinout documentation.