Sei sulla pagina 1di 7

Implementation of 8-Channel Temperature Scanner using Programmable System on Chip 3

1
5

Varun A.Patel, 2Vrushank A. Patel,3Meet H. Patel, 4Vismit K. Patel, 5Hardik P. Modi


1

Assistant Professor, Charotar University of Science and Technology,Changa-388421, Gujarat, India

modi8584@yahoo.com
II. COMPONENT DESCRIPTION

Abstract: Todays industries depend on automation on most of their operation. Many automation requires the measurement of analog signals. This makes analog to digital conversion one of the important fields in automation industries as microcontrollers which are the heart of the automation operates on digital data.In this application we are going to measure temperature from eight different channels which then can be processed to control the operation of the device based on the application. The temperature is converted to analog voltages using the temperature sensors. The processor unit we are using is Cypress PSoC3 (Programmable System on Chip 3) which is an embedded system that has on-chip 8051 microcontroller along with digital and analog peripherals. The PSoC3 has on chip Delta Sigma ADC which we are going to utilize for the conversion of analog voltage to digital voltage. The measured voltage is then converted to temperature according to the characteristics of thermocouple. This measured temperature will be then displayed on the computer screen using serial communication using RS-232. I. INTRODUCTION

This application can be expanded to 16 channel and 24 channel temperature scanner.

Table1 INTEGRATED CIRCUITS


Device Number U1 U2 U4 U5 Device Type PSoC3 MAX232 LM7805 LM 35 Device Make Cypress MAXIM National National Device Description Microcontroller For Rs232 to TTL Voltage 5 V Supply Temperature Sensor

Table 2 MISCELANOUS COMPONENTS Component Serial To USB convertor Quartz Crystal Connectors Value Description For serial interfacing Provide timing pulses

The aim of this application is to design an ambient temperature measurement circuit. The motivation for doing this application is the fact that temperature measurement has become an integral part of any control system operating in a temperature sensitive environment and the various learning outcomes associated during the implementation.Temperature is an expression denoting a physical condition of matter just as mass, dimension and time. Yet the idea of temperature is a relative one arrived at by number of conflicting theories. The classical theory depicts heat as a form of energy associated with activities of molecules of the substances. These minute particles of all matter are assumed to be in continuous motion which is sensed at heat temperature and is a measure of this heat. The temperature is sensed using temperature sensors and applied to A/D which gives us the digital word output.[1] This digital word output can be processed using microcontroller and different devices can be controlled based on the applications. We will measure temperature from 8 different channel using thermocouple and give the analog voltage to PSoC3[2] using multiplexer. The digital output word is then converted to voltage and then to temperature using software and will be send to the computer terminal. The channel will be selected using analog multiplexer DG408.

25MHz 32.768KHz For Connecting Thermocouple

III.

THEORITACAL FRAMEWORK

The Fig.1 shows the basic block diagram of the application circuit. This application is based on serial reception & transmission of data from computers serial port to UART of PSoC3 and vice versa.[7] Computers serial port works on USB standards whereas controller is TTL compatible. Therefore MAX232 is required for the conversion

Fig.1 Block Diagram PSoC3[3,4] has in-built Delta-Sigma ADC[5] which is also programmable for different configurations. The voltage signal coming from the Thermocouple is converted to binary value which is then used for cold junction compensation of Thermocouple.LM335 is used for measuring the reference junction temperature used in cold junction compensation. Initial stage of every electronic circuit is power supply system which provides required power to drive the whole system. The specification of power supply depends on the power requirement and this requirement is determined by its rating. The main components used in supply system are: A.12v Adapter/9V battery B.voltage regulator C.output filter

Fig.2 PSoC3 Top Design


PSoC3 is controller we are using in the circuit. The PSoC3 has inbuilt Delta Sigma ADC and inbuilt analog multiplexer. First of all the reference temperature is measured using the LM35 temperature sensor. Then the channel is selected using Computer terminal. We are using hyper terminal for the serial communication. After channel is selected the thermocouple voltages is measured. This voltage is then converted to temperature using the standard polynomials available for linearizing the thermocouple output voltage since the thermocouple has a nonlinear response for the temperature. This data is then send to the HyperTerminal for display.

COMPREHENSIVE ELUCIDATION

A. MICROCONTROLLER
With its unique array of configurable blocks, PSoC3 is a true system level solution providing MCU, memory, analog, and digital peripheral functions in a single chip. The CY8C38 families provide configurable blocks of analog, digital, and interconnect circuitry around a CPU subsystem. The combination of a CPU with a flexible analog subsystem, digital subsystem, routing, and I/O enables high level of integration in a wide variety of consumer, industrial, and medical applications.[4] The major components of the CY8C38 family are: 8051 CPU subsystem Nonvolatile subsystem Programming, debug, and test subsystem Inputs and outputs Clocking Power Digital subsystem

A.12vAdapter or 9V battery
The main source of our supply is a 12v adapter or a 9v battery.12v adapter are available in market and provides 12v from the AC supply .

B. Voltage Regulator:
Regulator is a device which provides constant output voltage with varying input voltage. There are two types of regulators(a) Fixed voltage regulator (b) Adjustable regulator We have used fixed voltage regulator LM78XX last two digits signify output voltage. The voltage for our system is 5V that is why we have used 7805 regulator which provides 5V from 12V dc.

C. Output filter:
It is used to filter out output ripple if any.

IV.

DESIGN AND IMPLEMENTATION

Analog subsystem

PSoCs 8051 CPU subsystem is built around a single cycle pipelined 8051 8-bit processor running at up to 67 MHz. [8].The CPU subsystem includes a programmable nested vector interrupt controller, DMA controller, and RAM.[6]

C. DELTA SIGMA ANALOG TO DIGITAL CONVERTER


Sigma-Delta modulation based analog-to digital (A/D) conversion technology is a cost effective alternative for high resolution (greater than 12 bits) converters which can be ultimately integrated on digital signal processor ICs. A requirement of analog-to-digital (A/D) interfaces is compatibility with VLSI technology, in order to provide for monolithic integration of both the analog and digital sections on a single die. Since the A/D converters are based on digital filtering techniques, almost 90% of the die is implemented in digital circuitry which enhances the prospect of compatibility. Conventional high-resolution A/D converters, such as successive approximation and flash type converters, operating at the Nyquist rate often do not make use of exceptionally high speeds achieved with a scaled VLSI technology. These Nyquist samplers require a complicated analog low pass filter (often called an antialiasing filter) to limit the maximum frequency input to the A/D, and sample-and hold circuitry. On the other hand, delta sigma A/D converters use a low resolution A/D converter (1-bit quantizer), noise shaping, and a very high oversampling.[5,10] D. SERIAL DRIVER(MAX 232 & RS 232)

Fig.3 100-Pin TQFP Part Pinout

B.

TEMPERATURE SENSOR(LM335)

For measuring the temperature, the choice of sensor is of utmost importance. The sensors are used in many fields includes Thermocouples, Resistive temperature devices (RTDs and Thermistors) and bimetallic devices. The factors for the selection of sensor that we take into account includes the inherent accuracy for durability, range of operation, susceptibility to external noise influences, ease of maintenance and installation, handling during installation (delicacy), ease of calibration, and type of environment it will be used in. [11]

Serial RS-232 (V.24) communication works with voltages -15V to +15V for high and low. On the other hand, TTL logic operates between 0V and +5V. Modern low power consumption logic operates in the range of 0V and +3.3V or even lower. Thus the RS-232 signal levels are far too high TTL electronics, and the negative RS-232 voltage for high cant be handled at all by computer logic. To receive serial data from an RS-232 interface the voltage has to be reduced. Also the low and high voltage level has to be inverted. The MAX232 from Maxim was the first IC which in one package contains the necessary drivers and receivers to adapt the RS-232 signal voltage levels to TTL logic.

E.

DB9 CONNECTOR

RS232 is the most widely used serial I/O interfacing standard, in which input and output voltage levels are not TTL compatible. In RS232 BIT_1 is represented by -3to 25 V, BIT_0 is represented by +3 to +25 V and -3 to +3 is undefined to connectRS232 to a microcontroller system must use voltage converters such as MAX232 to convert the TTL logic levels to the RS232 voltage levels, and vice versa MAX232 IC chips are commonly referred to as line drivers.

Fig. 4 Basic Temperature Sensor

Fig.6 Seebeck Effect Fig. 5 DB9 Connector F. DG408 Thermocouples are widely used for temperature measurement in a range of settings, even though these devices are not always well understood. A thermocouple is made by connecting together two wires made of different materials. By choosing materials that have different Seebeck voltages, a measureable voltage will be created that depends on the temperature difference between TX and TREF as shown in fig.7. [12,13]

The DG408 Single 8-Channel and DG409 Differential 4-Channel monolithic CMOS analog multiplexers are dropin replacements for the popular DG508A and DG509A series devices. They each include an array of eight analog Switches, a TTL/CMOS compatible digital decode circuit for channel selection, a voltage reference for logic thresholds and an ENABLE input for device selection when several multiplexers are present.

Fig.7 Temperature Diffrence at TX and TREF

VI SOFTWARE IMPLEMENTATION

Fig.6 DG 408 pin outs G. THERMOCOUPLE

Thermocouple basically operates on the principle of SEEBECK effect. Thomas Johann Seebeck discovered that a heated metal bar would create a voltage across the length of the bar, as shown in Fig. 6. This voltage is therefore known as the Seebeck voltage, and it differs for various combinations of metals or metal alloys. It can be seen that if you measure two bars (or wires) of the same material with the same temperature differential, the wires would have the same voltage created; thus, there would be 0V between the open ends at TA. If different metals are used, however, there is a voltage created between the wires that is proportional to the temperature differences (see Fig. 6). Fig.8 Flow Chart In this application two software are used for two different programs.

A. B.

PSoC Creator Orcad 10

4. Place components, route signals. 5. Generate machining (Gerber) files for PCB plant.[15,16]

A. PSoC CREATOR
PSoC Creator is a state-of-the-art software development IDE combined with a revolutionary graphical design editor to form a uniquely powerful hardware/software co-design environment. PSoC Creator offers a unique combination of hardware configuration and software development in a single, unified tool. This co-design approach is revolutionary. It frees embedded designers from the innovation-killing division between hardware design and software development. Gone is the time-consuming, inflexible dogma of hardware respins and software hacks. Unlike fixed function microcontrollers, PSoC allows you to choose exactly the on-chip peripherals you need. Instead of settling for a part that has most of what you need and a lot of what you don't, with PSoC you simply configure the device with your chosen functionality. And the configuration process couldn't be easier. You choose peripherals from a catalog of pre-defined and pre-tested components and simply drag them into your design schematic. Then choose your clock frequencies, connect peripheral I/O to pins, and you're done. The built-in configuration tools map your design into the device and calculate the clock setup and routing automatically. The programming of the PSoC 3 is done using PSoC Creator and the Mini Prog 3 Debugging header.

Fig.10 PCB Layout

VII. TEST AND DISCUSSION

Sr No.

Junction Temperature T (C) 22.45 33.63 37.66 78.34 103.40 135.78 218.04

1 2 3 4 5 6 7

Measured Temperature Them (C) 58.1 69.28 73.31 113.99 139.05 171.43 253.69

The reference temperature is the temperature of cold junction and the measured temperature is temperature of that is to be measured and is obtained from the junction temperature using cold junction compensation. Here the reference temperature is room temperature which is 35.65 C degree Celcius. The accuracy of the measured temperature is around 2 degree Celcius.

Fig.9 PSoC Creator Workspace B. ORCAD Steps to PCB design using Orcad
1. Design circuit using schematic entry package (Capture). 2. Generate netlist for PCB package. 3. Import netlist into PCB package (LayoutPlus). Let ADC reference voltage is Vref. Let Thermocouple output voltage is Vthem. Let LM35 output voltage Vamb. Let output of ADC is adcresult. Let ADC resolution is N. Then any input analog voltage to ADC is converted to digital output with respect to Vref.

Then to get thermocouple or LM35 output voltage we use formula Vthem or Vamb= adcresult*Vref/2^n; To get temperature of LM35 we use the formula Tamb=Vamb/10; To get the thermocouple temperature follow this steps 1. Convert the Vthem to temperature using the formula as follows

T = a0 + a1*v + a2*v^2 + ... + an*v^n. v =Vthem, a0,a1..,an are standard coefficients which are different for different thermocouple and is available from NIST standard tables 2. Then add Tamb to T to get Them. This step is called the Cold Junction Temperature. Them=T+Tamb. Them is measured temperature of thermocouple in Degree Celcius.

[4] PSoC Development kit Guide by Cypress Semiconductor [5] Pravin Sekar Getting Started With Delta Sigma ADC CE56170 [6] Vivek Shankar Kannan Interrupt Handling in PSoC 3-AN54460 [7] Anup Mohan Simple 8-bit UART Communication-CE56061 [8] Mark Hastings PSoC 3 Pin Selection for Analog Designs - AN58304 [9] High-Performance Multiplexing with the DG408 AN201 [10] Praveen Sekar PSoC 3 / PSoC 5 - Accurate ADC Measurement- AN60263 [11] Jim Lepkowski Temperature Measurement Circuits for Embedded Applications [12] Safa Kasap Thermoelectric Effects in Metals:Thermocouples [13] Gerald Recktenwald Conversion Of Thermocouple Voltage to Temperature [14] Russell Anderson Thermocouple Measurements with Delta-Sigma ADCsSBAA134 [15] R.B.Reese OrCad Layout Plus PCB Tutorial [16] Ekarat Laohavaleeson Layout Plus Tutorial

VIII

CONCLUSION AND FUTURESCOPS BIBLIOGRAPHY

In this application, we studied the architecture of the PSoC 3 and usage of some of its on-chip peripherals .By using PSoC 3 ,we implemented 8 channel temperature scanner. We used the PSoC Creator software that is used for programming of PSoC3 and also tested some of the peripherals like ADC, UART, Timer, using the Development Board. We successfully made a PCB of the design required for implementation of our application. We made a two layer PCB having plated through holes (PTH). This helped us understanding the industrial standard of PCB development. It also helped us how important it is to select the correct Footprint for a given IC. We found measurement of temperature using ADC. We connected computer with serial communication through RS232.In future, we will expand this application to more than 8channels.

Varun A. Patel is pursuing the bachelor of Engineering in Electronics and Communication from Charotar Institute of Technology. His areas of interest are Embedded Systems and Automation.

ACKNOWLEDGEMENT
We would like to thank Charotar institute of technology and Charotar University of Science and Technology for their consistent support throughout our implementation of this application.

REFERENCES
[1] Veepa Bhatia Application Based Comparison of Different Analog to Digital Convertor [2] Robert Ashby My First Five PSoC3 Designs [3] Ros M. Foster Getting Started with PSoC3AN54181

Meet H. Patel is pursuing the bachelor of Engineering in Electronics and Communication from Charotar Institute of Technology. His areas of interest are Embedded Systems and Automation.

Vrushank A. Patel is pursuing the bachelor of Engineering in Electronics and Communication from Charotar institute Of Technology. His areas of interest are Embedded Systems and Automation.

Vismit K Patel pursuing the bachelor of Engineering in Electronics and Communication from Charotar institute Of Technology. His areas of interest are Embedded Systems and Automation.

Hardik P Modi has received the B.E. degree in Electronics and Communication Engineering from Sardar Patel University and M.E. in Electronics and Communication System engineering from Dharmsinh Desai University. Presently, he is doing Ph.D. from Charotar University of Science & Technology. He is also working as Assistant Professor in Department of Electronics and Communication Engineering of Charotar University of Science & Technology, Changa, Gujarat. His research interests are in Microcontrollersapplications and Image Processing.

Potrebbero piacerti anche