a microcomputer based swift planimeter

6
Journal of Microcomputer Applications (1992) 15, 73-78 COMMUNICATION A microcomputer based swift planimeter P. S. Tiwari* and K. L. Sharmat *Professor Dept. of Electronics & Communication Engineering, University of Jodhpur, Jodhpur, 342 001 India; TAssistant Professor Dept. of Electronics & Communication Engineering, University of Jodhpur, Jodhpur, 342 001 India A microcomputer based technique of area measurement is described. The method measures the polar co-ordinates of points along the perimeter of the area and uses simple trigonometry to compute the total area. The microcomputer does this job very swiftly and displays the result almost instantaneously. All the sources of error in the method are statistical in nature and are expected to give a very low average error. Apart from the higher accuracy and an excellent resolution the method has the advantages of simplicity of working and high speed of response. 1. Introduction Quite a few electronic techniques of area measurement have evolved during the recent past. Most of these techniques sense the area by means of photoelectronic devices and transform the analogue area signal into some digital format to be processed further by means of digital logic [1,2]. All such photo transduction methods have three constraints with respect to their applicability, viz: limited resolution due to photodevice dimensions; error due to threshold level of sensing photodevices. and requirement of optical contrast for sensing. Additionally, the logic and the computational circuitry required in these methods is rather elaborate resulting in reduced reliability of the instrument. Recently, an area measurement technique employing a microcomputer has been suggested [3]. The method is based on continuous scanning of the object by an X-Y recorder and thus effectively dividing the object in many strips of equal width, whose length is measured in terms of time units by counting a clock during the period for which the photodevice is covered with the object. In spite of the reduced complexity and apparent simplicity of this method, it exhibits all the limitations of photosensitive techniques. Further the method requires a relatively long time for scanning the object/ area under consideration and the dimensions of the area should be compressible within the accommodation of the X-Y recorder. This paper discusses a quick and convenient method of area measurement using a microcomputer. The method is based on the sensing of polar co-ordinates in place of X-Y co-ordinates used in the earlier method. As is explained below, the method exhibits definite superiority in terms of resolution, accuracy, speed and versatility; and it overcomes the limitations of the methods using photosensitive transduction. Further by the addition of the appropriate software, the method is applicable to the area of any size and can compute many other associated useful results. 0745-7 138/92/O] 0073 + 06 $03.00/O 73 a 1992 Academic Press Limited

Upload: ps-tiwari

Post on 21-Jun-2016

219 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: A microcomputer based swift planimeter

Journal of Microcomputer Applications (1992) 15, 73-78

COMMUNICATION

A microcomputer based swift planimeter

P. S. Tiwari* and K. L. Sharmat

*Professor Dept. of Electronics & Communication Engineering, University of Jodhpur, Jodhpur, 342 001 India; TAssistant Professor Dept. of Electronics & Communication Engineering, University of Jodhpur, Jodhpur, 342 001 India

A microcomputer based technique of area measurement is described. The method measures the polar co-ordinates of points along the perimeter of the area and uses simple trigonometry to compute the total area. The microcomputer does this job very swiftly and displays the result almost instantaneously. All the sources of error in the method are statistical in nature and are expected to give a very low average error. Apart from the higher accuracy and an excellent resolution the method has the advantages of simplicity of working and high speed of response.

1. Introduction

Quite a few electronic techniques of area measurement have evolved during the recent past. Most of these techniques sense the area by means of photoelectronic devices and

transform the analogue area signal into some digital format to be processed further by

means of digital logic [1,2]. All such photo transduction methods have three constraints with respect to their applicability, viz: limited resolution due to photodevice dimensions;

error due to threshold level of sensing photodevices. and requirement of optical contrast for sensing. Additionally, the logic and the computational circuitry required in these methods is rather elaborate resulting in reduced reliability of the instrument.

Recently, an area measurement technique employing a microcomputer has been suggested [3]. The method is based on continuous scanning of the object by an X-Y recorder and thus effectively dividing the object in many strips of equal width, whose length is measured in terms of time units by counting a clock during the period for which the photodevice is covered with the object. In spite of the reduced complexity and apparent simplicity of this method, it exhibits all the limitations of photosensitive

techniques. Further the method requires a relatively long time for scanning the object/ area under consideration and the dimensions of the area should be compressible within the accommodation of the X-Y recorder.

This paper discusses a quick and convenient method of area measurement using a microcomputer. The method is based on the sensing of polar co-ordinates in place of X-Y co-ordinates used in the earlier method. As is explained below, the method exhibits definite superiority in terms of resolution, accuracy, speed and versatility; and it overcomes the limitations of the methods using photosensitive transduction. Further by the addition of the appropriate software, the method is applicable to the area of any size and can compute many other associated useful results.

0745-7 138/92/O] 0073 + 06 $03.00/O

73 a 1992 Academic Press Limited

Page 2: A microcomputer based swift planimeter

74 P. S. Tiwari and K. L. Sharma

2. Principle of operation

The method is based on moving a probe once on the boundary line along the complete periphery of the planar map or photograph of the area under measurement. This probe is fastened at one end of a slender arm movable lengthwise with the help of a set of guiders. A linear potentiometric transducer is rigidly attached along the arm and moves over a set of fixed wipers. This whole assembly in turn is fixed to the shaft of a rotary potentiometric transducer. Thus this arrangement provides two degrees of freedom for arm motion and allows the probe to execute any desired planar movement. The first potentiometer transduces the radius co-ordinate while the other transduces the angular co-ordinate for the area measurement. Hence, as shown in Fig. 1, if the two consecutive positions of the probe are P and Q with the instrument origin 0, together with the corresponding radii and angles r,, 8, and r2, e2; the elemental figure OPQ traced by the incremental motion PQ may by considered to be a linear triangle of an area A where

A = + r, r2 sin(8, - 0,)

With r,, r2, 0, and 8, having been measured by the transducers, the microcomputer easily works out the elemental area. When the instrument probe has been moved along the perimeter of the complete area PQRSTUP, the microcomputer has worked out successively the areas of all elemental triangles so formed and algebraically adds them to find the net area of the figure in question. The instrument origin is to be located at an appropriate place outside the area under measurement depending on the convenience; and the probe journey may be started from any point on the perimeter of the area and it may be moved clockwise or anticlockwise without in any way effecting the results.

r 0 P Q .’

Calculated (posltlve) area when movement of probe rs antl-clockwIse with respect to origm “0”

rB Calculated (negative) area when movement of probe IS clock-wise with respect to orqn “0 If

Area cancelled in addltlon of all the elemental oreas

0

(a) (b)

Figure I. Principle of operation. q calculated (positive) area when movement of probe is antlxlock wise with respect to origin ‘0’; q calculated (negative) area when movement of probe is clock-wise with respect to

origin ‘0’; E area cancelled in addition of all the elemental areas.

Page 3: A microcomputer based swift planimeter

A microcomputer based swift planimeter 75

3. Planimeter system configuration

As shown in Fig. 2, the instrument is structured around a microprocessor 8085A. The transducer assembly consisting of a linear potentiometer for radius measurement and a rotary potentiometer for angle measurement, outputs two separate analogue signals based on the location of the probe with respect to the instrument origin. These signals are fed to a pair of synchronised samples and hold circuits which hold the corresponding sample values of the radius and angle at the probe location.

The paired sample values are fed to two corresponding 1Zbit ADC (Analogue to Digital Converters) which generate the digital outputs and interrupt the microprocessor to read them. Based on the set resolution of the angle ADC, the microprocessor obtains from its memory a prefixed value of + sin (0, - &) for the differential angle (0, - 0,). It then calculates the elemental area I,.Y? [+ sin (0, - S,)] and algebraically adds up this value to the area calculated during the preceding cycle of operation. This process continues until the completion of probe journey around the perimeter of the area. The micro- processor takes into account the scale of the area map, if any, and exhibits the result on a seven segment LED display.

The voltage dividers and microprocessor controlled analogue switches fix the values of the reference voltages [1,2] to maintain best resolution of the angle ADC for different sizes and shapes of areas. The resolution of the radius ADC is, however, fixed once for all. The beeper circuit is meant to indicate the completion of encirclement along the perimeter of the area. A keyboard entry to the microprocessor is required at the time of initialization and also for switching the instrument to different modes of operation.

Moms - Power

Alarm

and < r 4

Dsploy

ii

hold -

Angle Clrcult + ADC l--n Key pod

Figure 2. System structure.

Page 4: A microcomputer based swift planimeter

76 P. S. Tiwari and K. L. Sharma

4. Instrument operation

The area map/photograph under measurement is placed on a plain surface and the instrument origin ‘0’ Fig. l(b), is so located that the probe can conveniently be moved along the complete perimeter of the area. The probe is then moved to boundary locations ‘B 1’ and ‘B2’ in turn and at each site, the initialization code is entered through

the keyboard. This process fixes the instrument range as the next larger quantized angle L,OL, with the help of microprocessor controlled analogue switches which select the suitable reference voltages for the angle ADC. This in turn determines the obtainable angular resolution and the quantum angle @ = 13, - 19, for the measurement. (In case the initialization process is missed, the instrument assumes the maximum permissible value

of the angle L,OL, which is approaching 180”). Next the scale of the area map is read into the instrument with the help of the keyboard. This having being done, the instrument is ready for the measurement and the process may be started by locating the probe anywhere on the perimeter of the area and indicating the commencement by pressing a start button at the keyboard. At the instant of pressing the start button, the microprocessor reads the existing value of r and B at the probe location and stores these values which are compared with successive measurements of r and 13 for ascertaining the completion of the round trip along the perimeter of the area. As soon as the perimeter trip is completed, the beeper gives an alarm and the results are displayed.

By giving an appropriate keyboard input, the microprocessor is ready to execute a multiple average program for the measurement. Under this mode of operation, the required number of clockwise/anticlockwise encirclements of the perimeter are to be

completed by the probe to obtain an average value of the area. This mode of operation is important from the point of view of cancelling various errors during probe motion.

A large sized map may be conveniently delineated into a number of portions and the measurement procedure could be repeated in sequence for each enclosed sub-area. By operating the instrument in Total mode, the sum of the all sub-areas will be displayed. Shifting the origin of the instrument does not effect the process.

The ‘ADCl210’ analogue to digital converter used in the circuit, takes 200 us for the

conversion and the microprocessor will take a maximum of 320 us for reading and processing at one elemental area. This requires that the average speed of probe motion should be such as to take not less than 2.5 s for one rotation along the perimeter. This value is well within the practicable limits of speed for moving the probe manually along a covered perimeter. If, however, under an unusual situation, the speed of movement of

the probe exceeds this value, the accuracy of the result may suffer.

5. Resolution, accuracy and sources of errors

With a 300 mm arm length and a 180” maximum rotation, together with the 12-bit ADCs used in the instrument, the attainable resolution is as follows.

The linear resolution of radius vector measurement is of the order of 75 urn and equivalently provides results better than 0.025%. The angular resolution with any range setting is also better than 0.025%. With a linear wire potentiometer of 300 mm length and a metal film angular potentiometer of 180” range, these resolutions have been practicable. As a circle encloses the maximum area with a given perimeter. it was considered proper to work out the attainable area resolution for a semicircular area

Page 5: A microcomputer based swift planimeter

A microcomputer based swift planimeter 77

covering the total angular range of 180”. This resolution accordingly works out to be of the order of 1.2 x lo-‘% of the area measured which is more than satisfactory for any practical situation.

The possible sources of errors in the measurement are:

(1) Small portions of area unaccounted or over-accounted at two angular extremities because of finite angular resolution.

(2) Approximation error because each elemental area is considered a linear triangle.

(3) Length and angle quantization errors. (4) Human error in moving the probe along the perimeter of the area.

The angular resolution is limited to l/4096 of the range angle owing to the use of 12-bit ADC. As the quantum value of the angle adopted for calculation is the nearest higher or lower value from the actual angle, the error in area due to this factor may be negative or positive depending on the shape of the area and the relative location of the instrument origin. The magnitude of the error in a single measurement will also depend on the size of the area map. With a 300 mm area length and 180” angle range, the maximum possible error in the worst case could be 34.5 mm* on the actual map used for measurement. For a semicircular area, this amounts to a maximum error of 0.0245%. However, this error can be reduced to practically a negligible value by operating the instrument in multiple average mode with the instrument origin shifted around the perimeter of the area.

The approximation error in representing the total area by a sum of linear elemental triangles will have both positive and negative sign depending on the curvature of the perimeter of the area. Therefore, it is likely to be averaged out to a negligible value.

The quantization error will have a maximum positive or negative value of 0.025% for any elemental area and will generally be averaged out to a negligible value. In a hypothetical extreme case, it may be at worst 0.025%.

However, all the four categories of errors mentioned above, can be minimized further with multiple average mode operation of instrument, with a given origin as well as by shifting the origin and repeating the measurements.

6. Conclusion For the planimeter system, discussed in this paper, any photograph or map drawn by ink or pencil is acceptable. As the system is not based on phototransduction principle, it is not at all a requirement that the area map be drawn on an optically transparent or optically sensitive medium. This planimeter system while working in the single measure- ment mode, is capable of measuring the area of any map or photograph which may be accommodated within a semicircular area of 300 mm radius. By dividing the total area into sub-areas and operating the planimeter in Total mode, the system can make measurement of maps of any practical size. This versatility together with its higher accuracy and resolution and fast speed of response are the significant attributes of the discussed instrument.

In actual experimentation with careful handling of the instrument it has always been possible to obtain an accuracy better than 0.05% in the measurement of areas of different sizes and shapes.

Page 6: A microcomputer based swift planimeter

78 P. S. Tiwari and K. L. Sharma

References

1. G. N. Wilkinson & J. H. Silsbury 1967. An electronic planimeter for measuring the areas of detached leaves. Australian Journal of Instrumentation, 23, 49-50.

2. P. F. Chen & W. W. Seemuller 1972. Area measurement using random image perturbation with discrete arrays. IEEE Transactions of Instrumentation and Measurement, lM-21, 14Cb-144.

3. P. S. Sarma 1984. A microcomputer based system for area measurement. IEEE Transactions of Instrumentation and Measurement, lM-33(3).

P.S. Tiwari received his degree of BE(Hons) in 1964 from University of Jabalpur, ME(Hons) in 1973 from University of Jodhpur, Jodhpur and PhD in Electronics Engineering in 1984 from Avadh University. Faizabad.

After serving for a short period as Assistant Engineer in MPEB, he started his teaching career at Udaipur Polytechnic in 1965. Soon he moved to Jodhpur University where he first served as Lecturer and Reader and is now serving as Professor of Electronics and Communication Engineering. In between for 3 years, he joined as Assistant Professor in Electronics at the Technical Teachers’ Training Institute, Bhopal where he worked on curriculum development and educational research projects and wrote a booklet on the project method of teaching. His teaching and research interests include Communication systems, Instrumentation and Computer-Communications. He has contributed about 30 papers in various international/national journals and conferences.

Dr Tiwari is a fellow of the Institution of Engineers (India). and a member of Instrument Society of India.

K. L. Sharma received his degree of BE in 1978 from University of Jodhpur, Jodhpur, India.

After serving as Electronics Engineer in R&D division of National Engineering Industries Ltd., Jaipur and then Deputy Engineer-in-charge, Overseas Communications Service, Government of India, Mr Sharma joined University of Jodhpur as an Assistant Professor of Electronics & Communication Engineering. His teaching and research interests include Instrumentation, Computer Communications and Bio-medical Electronics. He has contributed about 20 papers in various international/national journals and conferences.