temperature logging and control with the basic … · we present here applications for measuring...

1
International Materials Institute for New Functionality in Glass Sponsored by US National Science Foundation Acknowledgement: This work has been supported by IMI-NFG, Lehigh University through National Science Foundations (NSF) Grants : DMR-0409588 and DMR-0844014 www.lehigh.edu/imi Temperature Logging and Control with the Basic Stamp Microcontroller William Heffner (IMI-NFG, Lehigh University, Bethlehem, PA) and Jordan Davis (Oakwood University, Huntsville, AL) Objective: As part of our series of lowcost experiments for students to explore glass science, we are also developing a simple, low cost platform for data logging and temperature control appropriate for the high school or college laboratory. The Parallax Basic Stamp Microcontroller provides an ideal foundation, utilizes an easy to learn Basic language for programming and hosting a variety of sensors with associated sample code. A very popular robotics platform (BOEBOT) has already has been developed around these microprocessors by Parallax Inc., but our focus is to use exploit their use in the science laboratory and classroom. We present here applications for measuring and controlling temperature, as well as logging temperature and voltage data directly into Excel. Schemes for simple “on off” and proportional control of temperature are presented, compared and applied to a home built microscope hot stage. A student built Differential Thermal Analysis (DTA) apparatus illustrates the data logging capacity and how it can enable quantitative explorations of glass and other physical sciences on a student budget. Summary : The Basic Stamp Microcontroller provides a relatively simple platform for students to collect and control temperature, enabling a wide range of experiments of their own design. Two different examples have been described which illustrate the ease of use and range of possibilities. The Basic Stamp platform has an advantage over traditional approaches by Vernier and Pascal in allowing the student open access to the hardware and software, providing more understanding of microcontrollers and greater control over their own designs. And all at a lower overall cost. Many other sensors such as humidity, light, color and pressure are available from Parallax Inc., along with excellent documentation. We have introduced this platform to students in our REU program at Lehigh University where it has generated much enthusiasm and some excellent instruments. Construction details and software code for the projects descried above are available on out website (bee below). For additional details and future updates please see our education page at: www.lehigh.edu/GlassEducation.htm Our student-built Differential Thermal Analysis (DTA) shown right (more details on our website) is an ideal application for automatic data collection. Here bath temperature and the differential temperature (ΔT) (between a test tube with the sample and one with the reference) must be recorded several times a minute while the solution is being heated. Automated data collection is especially helpful when measuring the multiple runs required for the development of a project or a new method. Keeping with our low cost, hands-on approach, we chose to build our own data logging apparatus using the MOBO platform combined with the add-on thermocouple module. The data is collected and sent to the PC over the serial (USB) line and pulled directly into an active Excel spreadsheet, where data can be plotted real-time, as it is collected. Details of design and software can be found on our website. Basic Stamp Microcontrollers - An Experimenter’s Dream Physical Setup 330Ω e.g. Pin 7 1.0 μF Protection Resistor R1 C Thermistor Simple Temp Measurement and Control with Thermistor and any Stamp Module Temperature Measurement Options Temperature Sensor Options for Microcontrollers: Thermistor advantages: simplest to implement with any Basic Stamp module via RC time constant measurement of resistance limitations: non linear with T and poor above ~ 150 C Thermocouple (TC) - advantage: good over wide range of temperature ( > 1000 C) limitation: interface device needed to measure low voltages (~ 40 μV/C) solution: DS2760 one wire accessory - simple 2 command read possible IC Temp Sensors - several types (LM 35, etc.) advantages: linear with T and calibrated ( ~ 10 mV/C) limitations: limited to below 150 C and output is analog requiring AtoD with good resolution (~10 bit) Stamp Board Capabilities for Temperature Measurement: BOE (Board of Education) – comes with BOE BOT robotics kit (with BS2 chip) easily reads resistance but requires more lengthy code for TC module MOBO (Mother Board)- lowest cost approach to powerful data logging capability Analog input (4) with 10 Bit onboard AtoD Reads TC Module ( One-Wire devices), with simple commands Instructions for Reading RC Time: HIGH 7 (pin #) RCTIME 7, 1, variable_name The resistance of the thermistor is read via the RCTIME command. It returns RC discharge time in units of 2 microseconds. Our circuit uses the reed relay to control a 10 Amp SS Relay. Proportional Control Scheme Improves Ripple Temperature Control Data Logging Application with the MOBO and TC Module (DS2760) Microscope hot stage made for two aluminum plates bolted together with an insulating wood base for bottom. Hole through the top allows transmitted light for microscope use. Holes were also drilled between the plates to embed two heating cartridges (30W each) as well as a slot for the thermocouple probe. Sample heater was ideal for studying sugar crystals growing from molten candy glass. MOBO a Low Cost, Yet Powerful Platform The MOBO package above costs under $125 (including the TC module) and is sufficient for collecting a wide range of input data from thermocouples to analog voltages or resistances, as well as many additional capabilities. We have an alternate DTA circuit which provides a higher resolution measurement of the differential temperature using an instrumentation amplifier with gain of 2000. That approach outputs an analog voltage for ΔT, utilizing both the serial and analog capabilities of the MOBO. The DS2760 Thermocouple (TC) Module

Upload: dokhanh

Post on 19-Aug-2018

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Temperature Logging and Control with the Basic … · We present here applications for measuring and controlling temperature, as well as logging temperature and voltage data directlyinto

International Materials Institute for New Functionality in GlassSponsored by US National Science Foundation

Acknowledgement: This work has been supported by IMI-NFG, Lehigh University through National Science Foundations (NSF) Grants : DMR-0409588 and DMR-0844014www.lehigh.edu/imi

Temperature Logging and Control with the Basic Stamp MicrocontrollerWilliam Heffner (IMI-NFG, Lehigh University, Bethlehem, PA) and Jordan Davis (Oakwood University, Huntsville, AL)

Objective:  As part of our series of low‐cost experiments for students to explore glass science, we are also developing a simple, low cost platform for data logging and temperature control appropriate for the high school or college laboratory. The Parallax Basic Stamp Microcontroller provides an ideal foundation, utilizes an easy to learn Basic language for programming and hosting a variety of sensors with associated sample code.  A very popular robotics platform (BOEBOT) has already has been developed around these microprocessors by Parallax Inc., but our focus is to use exploit their use in the science laboratory and classroom.  We present here applications for measuring and controlling temperature, as well as logging temperature and voltage data directly into Excel.  Schemes for simple “on off” and proportional control of temperature are presented,  compared and applied to a home built microscope hot stage.  A student built Differential Thermal Analysis (DTA) apparatus illustrates the data logging capacity and how it can enable quantitative explorations of glass and other physical sciences on a student budget.   

Summary :The Basic Stamp Microcontroller provides a relatively simple platform for students to collect and control temperature, enabling a wide range of experiments of their own design. Two different examples have been described which illustrate the ease of use and range of possibilities. The Basic Stamp platform has an advantage over traditional approaches by Vernier and Pascal in allowing the student open access to the hardware and software, providing more understanding of microcontrollers and greater control over their own designs. And all at a lower overall cost. Many other sensors such as humidity, light, color and pressure are available from Parallax Inc., along with excellent documentation. We have introduced this platform to students in our REU program at Lehigh University where it has generated much enthusiasm and some excellent instruments. Construction details and software code for the projects descried above are available on out website (bee below).

For additional details and future updates please see our education page at: www.lehigh.edu/GlassEducation.htm

Our student-built Differential Thermal Analysis (DTA) shown right (more details on our website) is an ideal application for automatic data collection. Here bath temperature and the differential temperature (ΔT) (between a test tube with the sample and one with the reference) must be recorded several times a minute while the solution is being heated. Automated data collection is especially helpful when measuring the multiple runs required for the development of a project or a newmethod. Keeping with our low cost, hands-on approach, we chose to build our own data logging apparatus using the MOBO platform combined with the add-on thermocouple module. The data is collected and sent to the PC over the serial (USB) line and pulled directly into an active Excel spreadsheet, wheredata can be plotted real-time, as it is collected. Details of design and software can be found on our website.

Basic Stamp Microcontrollers - An Experimenter’s Dream

from p 256 of Basic Stamp Manual

Physical Setup

330Ωe.g. Pin 7

1.0 μF

ProtectionResistor

R1

C

Thermistor

Simple Temp Measurement and Control with Thermistor and any Stamp Module

Temperature Measurement Options

Temperature Sensor Options for Microcontrollers:Thermistor –

advantages: simplest to implement with any Basic Stamp modulevia RC time constant measurement of resistance

limitations: non linear with T and poor above ~ 150 C Thermocouple (TC) -

advantage: good over wide range of temperature ( > 1000 C)limitation: interface device needed to measure low voltages (~ 40 μV/C)solution: DS2760 one wire accessory - simple 2 command read possible

IC Temp Sensors - several types (LM 35, etc.)advantages: linear with T and calibrated ( ~ 10 mV/C)limitations: limited to below 150 C and

output is analog requiring AtoD with good resolution (~10 bit)

Stamp Board Capabilities for Temperature Measurement:BOE (Board of Education) – comes with BOE BOT robotics kit (with BS2

chip)easily reads resistance but requires more lengthy code for TC module

MOBO (Mother Board)-lowest cost approach to powerful data logging capability

Analog input (4) with 10 Bit onboard AtoDReads TC Module ( One-Wire devices), with simple commands

Instructions for Reading RC Time:HIGH 7 (pin #)RCTIME 7, 1, variable_name

The resistance of the thermistor is read via the RCTIME command. It returns RC discharge time in units of 2 microseconds.

Our circuit uses the reed relay to control a 10 Amp SS Relay.

Proportional Control Scheme Improves Ripple

Temperature ControlData Logging Application with the MOBO and TC Module (DS2760)

Microscope hot stage made for two aluminum plates bolted together with an insulating wood base for bottom. Hole through the top allows transmitted light for microscope use. Holes were also drilled between the plates to embed two heating cartridges (30W each) aswell as a slot for the thermocouple probe. Sample heater was ideal for studying sugar crystals growing from molten candy glass.

MOBO a Low Cost, Yet Powerful Platform

The MOBO package above costs under $125 (including the TC module) and is sufficient for collecting a wide range of input data fromthermocouples to analog voltages or resistances, as well as manyadditional capabilities.

We have an alternate DTA circuit which provides a higher resolution measurement of the differential temperature using an instrumentation amplifier with gain of 2000. That approach outputs an analog voltage for ΔT, utilizing both the serial and analog capabilities of the MOBO.

The DS2760 Thermocouple (TC) Module