Home

Embedded control and virtual instrument simplifies laboratory

image

Contents

1. loop delay time constant can be tuned from the VI front panel itself A sub VI can be built to automatically set the control parameters of the furnace un der connection for auto tuning facility From the on line graph one can identify the proper control function of the con troller Conclusion A simple interfacing technique using a PC for measurement and control of various physical quantities has been discussed 770 For one of the most common applications namely temperature measurement and control a miniaturized embedded control design with implementation of VI graphical language control program has been dis cussed This shows the simplest way by which any design requirement for labora tory as well as for industries can be ex ploited Any required task can be implemen ted indigenously according to the user requirement with proper selection of sen sors and its connectivity to the PC through embedded design and VI program technique This approach improves the experimental technique with good accuracy and reliability The existing trend in PC based laboratory automation involves minimal hardware and maximal support of software components With available PCs and intelligent programmable embed ded hardware and software components automation of experiments becomes sim ple reliable and inexpensive 1 Cypress Micro System Programmable System On chip User Manual www cypress com 2 National Instrument s Man
2. The recent trend in hardware design is simple and supports all required tasks by means of a programmable single chip The design is referred to as embedded anm Cid Fa Bi see Figtkh Pra gracn hierro MEC CEL Core Figure 1 design meant for any specific require ment with the common interfacing stan dard to enable interconnectivity of the system to the host As customer perform ance expectations skyrocket system design ers must take care of updating processor and communication technologies for each new project Yet the problem with system revisions is the significant learning curve necessary for becoming proficient with a new architecture and associated develop ment tools It often takes months to un cover all of the nuances and fine details of a new tool set To address these prob lems most board and silicon level vendors offer low cost evaluation or development kits that quickly demonstrate product performance and ease the transition to new hardware and software The innovative pro grammable embedded hardware like field programmable gate array FPGA appli cation specific integrated circuit ASIC programmable system on chip PSoC digital signal processor DSP and sev eral new microcontrollers are examples of the embedded design solution The con tents of a design support or evaluation kit vary depending on the featured product and the marketing approach the vendor adopts Hardware ranges from
3. a rea sonable time span in Windows environ ment Simple design with discrete components A simple example shown here is a tem perature controller widely required in laboratory industrial application Figures 2 and 3 show the temperature measurement and power control circuit diagram of a simple and novel design approach for measurement and control of temperature with minimal number of dis crete components This design uses the parallel port interface standard and con trol functions of the PC through VI soft ware program written in LabVIEW a graphical language In this design Figure 2 the thermocouple amplifier with suitable gain measures the temperature of the sys tem under investigation IC AD590 com pensates room temperature changes and the final compensated temperature ana logue information is converted to digital code by the serial 12 bit ADC MAX 187 The three pin connectivity of the ADC to the PC through the parallel port commu nicates digitized data to the PC Figure Figure 4 a PID Temperature controller in a single PSoC chip with pin diagram b PID 2 With this acquired digital data the VI temperature controller PSoC block diagram 768 CURRENT SCIENCE VOL 90 NO 6 25 MARCH 2006 TECHNICAL NOTE hhermecauple Adavane Cypress Micranstem USA A Neato Wate Joos Figure 5 PID temperature controller in PSoC way ee ee eB ee ELR Figure 6 VI front p
4. processes which are in a remote area on the PC screen Experimentors operators can visualize the on going process control automation through the PC screen VI programs provide an inexpensive yet powerful platform for control and data acquisition of process variables These programs are easy to implement with Thermo Couple rial 12 Bit graphic languages G language like Lab VIEW HP vee Bridge VIEW Agilent VIEW etc The G language implements data flow technique Usage of G lan guage VIs provides easy interfacing with PCs under the Windows environment VI programs can also be developed us ing any other text language like C C Pascal Visual Basic Visual C etc but require considerable effort to call hardware modules in the Windows environment For example building Dynamic Link Librar ies DLLs for calling hardware port ad dress in Windows environment is somewhat difficult The G language provides built in function libraries for a variety of ap plication requirements as graphic palettes which in turn support the required DLLs for functions to run under Windows en vironment Usually the G language VI programs consist of two frames viz panel diagram and functional diagram In ij F i Control Software ADC z i LabVIEW Ver 6 W Pi AX 1 eee PCs LPT port DB 25 Con Figure 2 Simple design with discrete components PCs Parallel port fare crossin
5. Parallel Port are both implementations of the parallel standard they both offer faster data transfer up to 2 Mb s and are commonly supported in modern PCs It is another simple inter face standard designated as LPT port con figured for printer connectivity on the rear side of the PC with 25 pin connector fa cility This standard permits parallel communication of eight bit data port address 0 x 378 for LPT1 five bit status port address 0 x 379 for LPT1 and four bit control port address 0 x 37A for LPT1 between the PC and a system within a distance of 1 m but faster compared to the serial interface With this interface the system has to be located near the PC USB port interface standard Anyone familiar with computers would be aware of the problems that the USB is trying to solve in the past connecting devices to computers was a difficult task For example e Printers connected to parallel printer ports and most computers only came with a single parallel port Zip drives which need high speed connection to the computer would use the parallel port as well often with limited success and not much speed e Modems used serial ports but so did some printers and other devices like palm pilots and digital cameras Most com puters have at most two serial ports and they are slow in most cases e Devices that needed faster connec tions came with their own cards which had to fit in a card slot inside the com pute
6. TECHNICAL NOTE Embedded control and virtual instrument simplifies laboratory automation J Jayapandian Personal computers PCs are playing a vital role everywhere From physics to psychology the use of PCs is increasing rapidly At present the trend in laboratory as well as industrial automation to establish on going research and development programmes is minimal hardware design and maximal support of software The software availability and the intelligent embedded hardware design configuration enable easy interfacing of systems with PCs In the field of research and development programmes PCs act as a powerful tool for measurement of data and automation of experiments through their standard interfacing techniques Virtual instrument design concept in software provides graphical user interface and enables a simple design solution with embedded controller through its standard communication interface with PCs This note describes automa tion of some simple physics experiments using PCs The advancement in solid state technology to function in all possible environmental conditions provides a clear pathway for innovation in research and development The programmable embedded design plays a major role in modern technological de velopment Visualization and implementa tion of required interface design with the intelligent programmable embedded con trols like FPGA ASIC DSP PSoC mi crocontrollers etc provides an easy means of user f
7. a simple peripheral module that one can plug into a design to a stand alone embedded sys canine bt Tr ar rai ieee es Internal block diagram of PSoC chip CURRENT SCIENCE VOL 90 NO 6 25 MARCH 2006 TECHNICAL NOTE tem with processor memory peripherals programmer and bread boarding area to test one s application circuitry Software offerings include drivers for unique sili con all the way up to a complete develop ment environment for processor products The main advantage in embedded design is that before the target hardware be comes available developers can use a soft ware processor simulator running on the host or a general purpose evaluation board in place of the target prototype At present the increasing performance requirements need more complex interface designs with stand alone components Our goal is to make the complex designs easy for automation interface designs with novel intelligent on chip programmable com ponents In this note Cypress Microsystem s PsoC based application design with vir tual instrument graphical language con trol program is described as an example Programmable system on chip PSoC TM mixed signal arrays of cy press are programmable systems on chips SOCs that integrate a microcon troller and the analogue and digital com ponents that typically surround it in an embedded system as shown in Figure 1 A single PSoC device can integrate as many as 100 peripheral
8. anel diagram for PID temperature controller control program calculates control pa rameters like programmable P integral 1 differential D etc and sets the re quired pulse width through a bit pin 10 of parallel port and controls the AC cycle in a pulse width modulated PWM firing angle sequence for the power require ment via a solid state relay SSR see Figure 3 To enable proper firing sequence the zero crossing in the AC cycle is detected by the opto coupler circuit and sensed through another bit of a parallel port pin 2 This simple design controlled by the VI program for control function provides an easy means of achieving temperature control with user required programmable control functions like ON OFF PID linear heating on sweep measurement etc A similar way of interfacing is possible with the serial port of the PC also The em bedded control example with PSoC de scribes the serial interfacing design for the temperature controller The choice of type of interfacing is left to the designer user Embedded design simplifies design automation Temperature controller in PSoC way The above design can be easily imple mented in an embedded design as a pro grammable single chip using PSoC designer as shown in Figure 4a and b Figure 4a shows the pin configuration of a PSoC IC and Figure 4b shows the internal ana logue and digital blocks of temperature controller design in a single PSoC chip Analogu
9. e modules programmable gain amplifier PGA a 12 bit ADC analogue parts of ADC a reference ground ana logue modules a 16 bit PWM UART block for serial communication with the PC and a 8 bit counter for serial baud CURRENT SCIENCE VOL 90 NO 6 25 MARCH 2006 rate select digital blocks include ADC digital part have been programmed in a single 28 pin PSoC chip CY 827443 Figure 5 shows the miniaturized embedded temperature controller design in PSoC way The serial communication with the PC enables the embedded system to in teract with the PC through the VI control program written in LabVIEW VI program for PID controller Figure 6 shows the front panel VI pro gram panel diagram for PID temperature controller The VI panel diagram is the same for simple design approach shown in Figures 2 and 3 as well as for embed ded control design Figure 5 The only difference is the interfacing standard i e in a simple approach the design uses the parallel port of the PC and in embedded control PSoC design uses the serial port 769 TECHNICAL NOTE interface of the PC The function dia gram of the VI program uses graphical icons required for parallel or serial ports according to the design consideration The VI panel diagram shows user friendly control over parameters required for proper control action of the temperature controller Control parameters like pro portional P integral I differential D
10. functions with a microcontroller of the customer saving design time board space and power con sumption Easy to use development tools enable designers to select the precise pe ripheral functionality they desire includ ing that Analogue functions amplifiers ADCs DACs filters and comparators Digital functions timers counters PWMs SPI and UARTSs The analogue features of the PSoC family include rail to rail inputs programmable gain amplifiers and up to 14 bit ADCs with exceptionally low noise input leak age and voltage offset PSoC devices in clude up to 32 kb of flash memory 2 kb of SRAM an 8 x 8 multiplier with 32 bit accumulator power and sleep monitoring circuits and hardware 12C communica tions PSoC Designer TM the traditional software development environment for PSOoC is a fully featured GUI based de sign tool suite that enables the user to configure design in silicon with simple point and click options With PSoC De signer users can code the device in either C or assembly language and debug the design using features such as event trig gers and multiple breakpoints while sin gle stepping through code in C or assembly or a mix of the two languages Virtual instrument program Virtual instruments VI are an applica tion of general purpose digital PCs for the measurement and control of various para meters like temperature flow pressure position etc VI programs mimic the control
11. g detector MCT 2E Lo Te ee Meek LEST Pee zi TAHET I4 Sold State Relay 1k F y je 1O0H2 tipple from pawar supply Figure 3 PWM power controller CURRENT SCIENCE VOL 90 NO 6 25 MARCH 2006 767 TECHNICAL NOTE the panel diagram programmers can as sign various controls and indicators i e input and output variables according to their requirements and in the functional dia gram the designer can implement the re quired functions like mathematical opera tion comparison loop functions for loop while loop case loop formula node etc decision making data conversion file copying sequence input output port addressing implementing standard inter facing like parallel port serial port GPIB IEEE488 USB and also filters curve fitting functions etc For the purpose of networking Transmission Control Proto col TCP Internet Protocol IP data socket connectivity are also available as a function library in LabVIEW Pro grammatically calling functions written in any other language is also possible from LabVIEW by the usage of call li brary function node code interface node CIN AcriveX functions Similarly any Matlab routine can be called from Lab VIEW using Matlab script node The National Instruments LabVIEW version 7 1 incorporates all the necessary func tions as icons in its package Even be ginners can write their own programs making use of this package within
12. ivity of the system which contains various physical quantities varia bles to be monitored and measured Various interfacing techniques can interact with the PC for experimental automation Some of them are serial interface parallel inter face Universal Serial Bus USB inter face game port interface etc The next section provides detailed specifications about each interfacing standard Interfacing standards PCs serial interface Serial ports are a type of computer inter face that comply with the RS 232 standard They are nine pin connectors that relay information incoming or outgoing one byte at a time Each byte is broken up into a series of eight bits hence the term serial port Serial ports are one of the oldest types of interface standards Before internal modems became commonplace external modems were connected to computers via Serial ports also known as communica tion or COM ports Computer mice and keyboards also use serial ports Some se rial ports use 25 pin connectors but the nine pin variety is more common Serial ports are controlled by a special chip called a UART Universal Asynchronous Receiver Transmitter Serial ports differ CURRENT SCIENCE VOL 90 NO 6 25 MARCH 2006 from 25 pin parallel ports in that the par allel ports transmit one byte at a time us ing eight parallel wires each carrying one bit With data travelling in parallel the transfer rate is greater A parallel port could supp
13. ort rates up to 100 kilobytes per second while serial ports only support 115 kilobits per second kbps Later en hanced technology pushed serial port speeds to 460 kbps This interface stan dard permits remote system handling and permits an easy way of interfacing with PCs Parallel port interface LPT Line Printing Terminal is the com mon name given to a parallel port on IBM and compatible machines Although the DB 25 female connector at the back of a PC is referred to as an LPT port techni cally an LPT port is simply a parallel port set to LPT x with an I O input output address and IRQ Interrupt Request as signed to it in the same way as a COM x port is actually a serial port set to COM x Usually an individual machine will have two LPT ports although one can have up to three ports LPT1 LPT2 and LPT3 Although they were designed primarily for printers a wide variety of peripherals can be connected to these ports Parallel port interface refers to a standard 25 pin D25 connector found on most if not all PCs commonly used for connecting a printer A standard parallel port trans mits eight data bits at a time as opposed to a serial port which transmits data one bit at a time Due to the speed advantage up to around 150 kbps a second over the serial port parallel ports are com 765 TECHNICAL NOTE monly used for printers and even small networks ECP Extended Capability Port and EPP Enhanced
14. r case Unfortunately the number of card slots is limited and one had to in stall software for some of the cards The goal of the USB is to solve all these problems The USB provides a single stan dardized easy to use way to connect up to 127 devices to a computer Just about every peripheral made now comes in a USB version A sample list of USB devices that one can buy today includes printers scanners mice joysticks flight yokes digital cameras webcams scientific data acquisition devices modems speakers telephones video phones storage devices such as zip drives and network connec tions The USB interface is an ultrafast 766 serial interface now dominating the field of automation and control system It can support 127 USB devices at a time with unimaginable speed USB 1 0 standard has the speed of 12 mbps but USB 2 0 has the speed 40 times higher than USB 1 0 i e 480 mbps On line video cameras and video conferencing use this standard of interface due to high speed and the device connectivity USB interface can be converted to any other standard like serial parallel and GPIB IEEE488 bus bus with converter cables available in the market Thus one can extend the number of standard ports making use of the USB hub connectivity Game port interface standard This port permits connectivity of two joysticks for playing video games It can also be used for interfacing simple sys tems Embedded design solution
15. riendly design automation On the other hand it is possible to design simple laboratory industrial automation according to our requirements by exploiting personal computers PCs with the availability of innovative software and programmable hardware components Generally for any laboratory as well as industrial automation the tasks required for automation are sensing and controlling physical variables like position temperature pressure flow etc Most of the variables are analogue in nature with varying signal amplitude Control over the basic variable parameter is an essential step for experimental automation This note describes how the embedded control and virtual instrument software simplifies experimental automation using PCs through its standard interfacing tech nique Automation Automation is an interfacing technique which provides interaction between a PC or any intelligent device and laboratory equipment to get reliability accuracy and remote operation PCs are digital machines they can accept only zeros or ones Zero represents zero state in binary system i e O volt state and one represents one state i e 5 volt state But the physical variables are in analogue form Hence the first step of interfacing requirement is analogue to digital binary conversion of the physical quantity to be monitored Once the variables become digital infor mation it is easy to interact with a PC for further connect
16. ual www ni com 3 Jayapandian J Electronic Design Maga zine Penton New Jersey USA ED Online ID 1575 4 March 2002 4 Jayapandian J Electronics Design Maga zine Penton New Jersey USA ED Online ID 5687 15 September 2003 5 Jayapandian J et al J Instrum Soc India 2003 33 75 80 6 Jayapandian J Cypress Micro System Application note AN2287 September 2005 LabIVEW User Received 22 December 2005 revised accep ted 3 January 2006 J Jayapandian is in the Materials Science Division Indira Gandhi Centre for Atomic Research Kalpakkam 603 102 India e mail jjpandian gmail com CURRENT SCIENCE VOL 90 NO 6 25 MARCH 2006

Download Pdf Manuals

image

Related Search

Related Contents

Modèle des défauts quasi ponctuels : mode d`emploi  cat5-3000 manual in order.p65  

Copyright © All rights reserved.
Failed to retrieve file