Computer Control of a Water Sample

The fist half hour of our first laboratory period was dedicated to gaining a clear understanding of the task at hand, and assigning aspects of that task to the team members. Some of the parts required had been assembled in previous classes so Scott and Chris went immediately to the shop to sort out the assembly process. My particular job was to determine which control boards were functioning on our test computer. This year the lab was upgraded and some of the computers are missing the old boards, and others just don’t respond to code the way they used to. A few hours writing test programs with a generous amount of help from Dan got us a computer with a working DIO (Digital In/Out) and A to D (Analog to Digital) board.

Checking in with Scott and Chris at this time, I was impressed to see the hardware mounted nicely on a base with a variety of wires and gadgets. I informed them of my success with the boards and it was decided that we would take a two tier approach to the software development. Scott, being fond of Lab View, spent the rest of the period testing that programs compatibility with the control boards. Chris continued to get our hardware ready for testing. I began development of a C++ program and occupied myself with menu development. At the end of the period we had a completed piece of hardware without the interface circuits. We determined Lab View would not be an acceptable program; we had a working pair of control boards, and a C++ program with completed menus.

Worried about the complexity of the C++ program, and my skill at programming, I spent about half an hour with Dan outside of class time learning the graphical part of C++. I then added those modifications to my menu system and spent about an hour drawing dots and lines on the screen.

The next class was crunch time. I immediately went to work in C++. Scott setup shop beside me with the temperature probe and a multimeter. Chris started getting the control circuits squared away. The next feature to be added to the program was the sensing of temperature from Scott’s probe. This proved to be difficult as the variation in output from the probe was extremely small over our range of temperature. When class was about half over we had a program that could read and display the temperature of water on the screen in real time. I then went straight into the construction of a real time temperature graph in C++. This took the rest of the class time and worked well. At the end of class when we showed Dan our program, something was messing up the signal from the temperature probe. We decided, after careful discussion that it could have been anything, likely noise from something nearby. They began construction of the new floors earlier this month and have been playing with the schools power grid a little. That must have been it.

When I left the laboratory we had a program that could turn on the heater, turn off the heater, request a target temperature, display the current temperature, pulse the heater until the target temperature was reached, and display a moving temperature vs time graph that wrapped around on the screen.

Viewing my code this evening, I noticed a few revisions that I know nothing about. I assume Chris and Scott returned to the lab without my knowledge and modified the program. I also see Chris has numbers for the amount of heat lost at 90 deg which I again know nothing about, they must have succeeded in getting the temp probe working and completing the assignment.

The final C++ Program.

Photos taken with Scott's Cell Phone by Chris.