Hello,
I am currently building a universal calibrator using Nano/Uno which is capable of delivering millivolts, milliamps and rtd resistance. It is also able to sink it. Sources are given by an external circuit which i have built.
The display which I am using is 16x2 LCD. I have interfaced external ADC MCP3421 so that I am able to get 16 uV step for accurate reading. Everything else works fine now. Just a bit of fine tuning is left.
The problems which I am facing.
- I am displaying millivolts in this format. eg. 100.000 mv. Now if it goes to 2 digits, it becomes 99.0000 mv. How do i set it to 3 decimals only. I have currently stated it as :
lcd.print(vin,3);
When i start, i get 0.000 and it goes properly till 250.000 which is my max range. While reducing, as the digits are reduced, decimal place is increased by a digit. eg. while reducing it from 250.000 to 0, final value I get is 0.00000, which should be 0.000. It returns to normal after I reset the arduino. How to define it to 3 decimal places only?
- I want to add RTD lookup table in the program and if possible thermocouple also. How should i go about that? Like after I convert the resistance to equivalent voltage, it should take the reference adc value and display the temperature according to the table.
Your comments and suggestions are valuable to me.
Thank You