- Confirm power to thermocouple

- Obtain measurement from ADC

- Write measurement to screen

- Complete program and confirm it all works together.

- Nicolas Krause
**Posts:**161**Joined:**Fri Sep 30, 2016 11:36 pm**Real name:**Nicolas Krause**Location:**Canada-
**Contact:**

It's been awhile since I've updated this project, but I've completed my exams and have a bit of break before summer term starts. I received the updated PCB a month or so ago, and have in my spare time assembled it. I'm in the process of completing the program for the device. I just confirmed today that the connection from the LCD to the microcontroller works as I was able to write basic character values to the screen. I've completed a cable to connect to the vacuum thermocouple gauge itself. But the next few steps are as follows.

- Confirm power to thermocouple

- Obtain measurement from ADC

- Write measurement to screen

- Complete program and confirm it all works together.

- Nicolas Krause
**Posts:**161**Joined:**Fri Sep 30, 2016 11:36 pm**Real name:**Nicolas Krause**Location:**Canada-
**Contact:**

Just by way of a quick update, the program is mostly completed and written using fixed point numbers for calculations. The core conversion function is demonstrated in the code below. While testing the final elements of the program I identified an error on the circuit board that required a third revision. I've corrected the schematics and gerber files have been sent off to the boardhouse. When the replacement board arrives I can put it all together and hopefully be finally done!

Code: Select all

```
: CONVERT ( MEASUREMENT -- PRESSURE)
\ a word to convert the value from the circuit into a pressure value.
\ firstly I take the very small value from the TC Gauge, and jam it into an amplification circuit.
\ The range on the amplification circuit is 0 -> 71.2 * Vmax. Here Vmax is 14mV so max input is
\ This function currently assumes a 6343 or KJL 1518 type TC tube.
\ It implements an exponential function of the form y = 7,000,000 * x^(-2.032)
\ Where x is in the input measurement and y is the output in mTorr
s>df \ convert measurement value to fixed point
\ raise x to power -2.032
log2 2,032 f* \ take the log base 2 of x, multiply by our power
pow2 \ take the power of 2 to get rid of the log base 2
1,0 2swap f/ \ gotta divide our value into 1
7000000,0 f* \ put our scaling value for x on the stack and multiply
mfloor \ convert to integer by taking the nearest whole number
;
```