Sunteți pe pagina 1din 18

_________________________________ Digital Caliper Design Utilizing an Optical Distance Measuring Sensor

Calvin A. Sessions Christopher Wittmier Jonathan Law

Instrumentation Design Team Project December 1, 2004

Western Washington University


Electronics Engineering Technology ETEC 377, Professor Grady

_________________________________

INTRODUCTION
Overall Objective The overall objective of this instrumentation team project was to gain research and design experience while further developing and enhancing cooperative teamwork skills. In the span of two months, this project allowed our members to step through the actual design process from conception and design, to prototype development. Project Purpose In particular, our instrumentation design team developed a digital caliper utilizing an optical distance measuring sensor. This method was chosen as a unique and interesting technique to process information measured by a caliper. The function of the digital caliper was designed to be able to optically measure the dimensions of small objects, electronically eliminating human error generated from analog/mechanical calipers or other measuring tools. It was decided that the design had to be portable, inexpensive, and perform with accurate precision. Its use would be best suited for a laboratory environment; therefore it was appropriate that our design utilized standard SI units: 0mm 99.9mm range.

FUNCTIONAL DESCRIPTION
As shown in the system block diagram in Figure 1, there were four main procedures conceptualized in the digital caliper design. First, a physical process had to be changed into some type of electronic signal. In this project a transducer was implemented to convert the physical process into a voltage. Then the analog signal obtained from the transducer output had to be conditioned and scaled through signal processing circuitry. The processed analog signal was then digitized with an A/D converter, and finally displayed.

Figure 1: Digital Caliper System Block Diagram

The Sharp GP2D12 distance measuring sensor was implemented as the transducer in the electronic design. Characteristics of this particular sensor will be discussed in great detail later in this document. Because the output produced from the GP2D12 is an analog, nonlinear voltage, the last three stages of the system block diagram shown in Figure 1 required the most attention.

Detailed Hardware Description Figure 2 displays a basic sketch of the digital caliper design. A standard vernier caliper was mounted on the chassis housing the transducer and signal conditioning circuitry. The physical process for this system mentioned in Figure 1 is the variable distance adjustment of the movable caliper arm. As depicted in the diagram, the other caliper arm is mounted and serves as a reference.

Figure 2: Digital Caliper Design Sketch

The distance measuring sensor emits a beam of light in which reflects off of a surface connected to the adjustable arm of the vernier caliper and is processed by an onboard photodetector. Upon signal conditioning, the distance information is digitized and displayed on three seven segment LED modules in millimeters. A 9-volt battery powers the entire system.

Distance Measuring Sensor Figure 3 displays images and dimensions of the Sharp GP2D12 distance measuring sensor. This device contains both an infrared light source and a photodetector.

Figure 3: Sharp GP2D12 Images

Figure 4: GP2D12 Measuring Function

According to the Robotic Society of Southern California (RSSC) website, light is emitted from the infrared LED through a lens which focuses the beam on a small spot of the measured object. The light then reflects off of the object to the position sensitive device (PSD), as shown in Figure 4. This is referred to as the optical triangulation principal. Also stated on the RSSC website, as the distance to the sensed object changes, the spot of light moves on the position-sensitive detector, and a different distance is reported.

Note in the internal circuitry diagram in Figure 5 that the GP2D12 has three connections: ground, 5 volt supply, and an analog output. This analog output is a nonlinear curve as displayed in Figure 6. Also note in the graph that the reflectivity is highest when a white surface is implemented; therefore white paper was used to cover the reflective surface on the adjustable caliper arm. These figures were taken from the sensor data sheet notes appended to this document. Because the workable range of the GP2D12 is 10cm to 80cm, an offset greater than 10cm was created, as shown in the digital caliper sketch in Figure 2.

Figure 5: GP2D12 Internal Circuitry

Figure 6: GP2D12 Analog Output Vs. Distance

Signal Processing The output of the analog distance measuring sensor signal resembles a decaying logarithmic function. To correct this nonlinear characteristic, a logarithmic amplifier was constructed a stage after the transducer. This was performed by placing a diode in the feedback of an operational amplifier. Though the output signal was more linear, a decaying output with respect to the increasing distance was present. Therefore a summing amplifier was constructed. This summing amplifier consisted of amplifying the negative linearized output and adding it to an offset voltage. The output of the summing amplifier was designed to yield a range from 0 volts for 0mm to .100 volts for 100mm. Because the output of the summing amplifier yielded a negative voltage, an inverting amplifier with a gain of 10 was implemented. This gain was necessary because the A/D converter and output circuitry required a 0 to 1.0 volt working range. Figure 7 depicts a general block diagram of the signal conditioning procedures.

Figure 7: Signal Processing Block Diagram

A/D Conversion and Output Display Range: 0mm-99.9mm Units: milimters

Figure 8: 7 Segment LED Module Display

Having previously linearized and scaled the input voltage, the function of the A/D section was essentially that of a voltmeter. Intersils CA3162E dual slope A/D converter was chosen for its appropriate range and precision, featuring three onboard multiplexing lines designed specifically for use in three-digit displays. These lines were used to enable three 7-segment LED modules, as pictured above, driven sequentially by a single 74LS247 BCD - Seven segment display driver. PNP transistors were used as multiplexing switches, and the 74LS247s open collector outputs were pulled up with a resistor network. The converter operates at 4Hz, using the built in timing of the CA3162E in low speedmode. Although the displays tenth of a millimeter resolution is somewhat useless given the overall caliper error of over one millimeter, this provides for later improvement of transducer linearization, were more time allotted.

PROTOTYPE DEVELOPMENT
Distance Measuring Sensor Upon receiving the Sharp GP2D12 distance measuring sensor, the device was tested and analyzed to inspect its functionality and for general planning purposes. A test fixture was first constructed, as shown in Figure 9. The sensor was mounted on a metal plate while an additional metal plate covered with white paper was set at variable distances marked on a piece of plywood.

Figure 9: GP2D12 Test Fixture Setup

The following data displays sensor output voltage characteristics with respect to the variable distance. The following page displays a graphical representation of Table 1.
Table 1: Distance Vs. Voltage Out
0.029 0.702 1.18 1.145 1.805 1.847 2.01 2.577 2.751 2.66 2.508 2.334 2.176 2.033 1.904 1.795 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

Distance (cm)
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15

Voltage Out (V)

Distance (cm)

Voltage Out (V)


1.710 1.609 1.526 1.470 1.392 1.317 1.268 1.223 1.166 1.129 1.091 1.052 1.014 0.975 0.956

Graph 1: Distance Vs. Voltage Out


Distance vs. Voltage Out

2.5

Voltage Out (V)

Vo

1.5

0.5

10

12

14

16

18

20

22

24

26

28

30

distance Distance (cm)

Signal Processing and Power Supply: The following table displays the sensor output using a logarithmic amplifer with respect to a varying distance:
Table 2: Distance Vs. Voltage Out w/ log amp
Distance 8 9 10 11 12 13 14 15 16 17 18 19 Voltage Out 0.653 0.653 0.651 0.648 0.645 0.643 0.638 0.636 0.635 0.633 0.631 0.629 Distance 20 21 22 23 24 25 26 27 28 29 30 Voltage Out 0.626 0.625 0.623 0.621 0.619 0.617 0.615 0.614 0.612 0.611 0.610

Graph 2: Distance Vs. Voltage Out w/ Log Amp


1.22

Distance vs. Voltage Out

1.23

1.24

Voltage Out (V)

1.25 V

1.26

1.27

1.28

1.29

10

11

12

13

14

15 distance Distance (cm)

16

17

18

19

20

21

22

The output of the sensor signal using a logarithmic amplifier was recorded and graphed with respect to the varying distance. As shown in the graph, the curve produced was not completely linear. Using the line of best fit for the signal conditioning was the only reasonable option without implementing a computer or microcontroller in the design. More about this issue will be further discussed in the Discussion Section of this document.

10

The following schematic diagram and signal conditioning equations were implemented, shown in Figure 2. This circuit was described in the Detailed Hardware Description. The transducer, signal processing circuitry, and power supply circuitry was soldered onto a single protoboard. The power supply circuitry is also displayed below.

Signal Conditioning
Sharp GP2D12 U2 GND +5V 1 IN OUT 2 R1 1k C1 10u D1N4148 D1 R4 20k R9 150 R2 4.99k R3 20k +5V R5 1.02k R10 150 R6 1k 5 TL084 6 11 -5V 1 R8 -5V 7 R7 2k 10 20k -5V 8 C2 10u

V-

TL084 2

11

OUT 4 3 + U1A +5V

V-

V+

OUT + U1B 4 +5V

V+

0 0

V+

+ U1C

V-

TL084 9

11

OUT +5V

Schematic 1: Signal Conditioning Schematic

Summing Amplifier/Signal Conditioning Calculations Distance (cm) Sensor Output w/ Log Amp (volts) 0 cm - 0.626 volts 10 cm - 0.600 volts Equation 1: 0 = - 0.626 m + Voffset Equation 2: 0.1 = -0.600 m + Voffset m = 3.84615 GAIN Power Supply Voffset = 2.40769 volts Voltage Regulator
U4 GL7805 IN GND 1 V2 9Vdc OUT 2 U5 C6 10u +5V

0 0

+ -

+ -

C8 10u

-5V C7 10u

TC7662A Charge Pump

Schematic 2: Power Supply Schematic

11

Image 1: Power Supply and Signal Processing Circuitry

Image 2: Power Supply and Signal Processing Assembly

12

A/D Conversion and Output Display Illustrated in the schematic below, the complexity of the A/D converter and display design was greatly reduced by the CA3162Es built-in features. Initially, an AD0804 converter was considered which would have provided an 8-bit binary output. This converter was dropped, as 3 cascaded 185 decoders (or a PLD) would have been required to produce a displayable decimal output. In determining conversion speed, the CA3162E offered two built in speed modes. High speed mode (96Hz) would have produced unreadable display flicker, leaving 4Hz low-speed mode. Ideally, an even lower speed would be used, as there is still some degree of annoying flicker. To achieve this, a sample-holding pulse circuit was designed and constructed using a 555 timer. Although this pulse provided the variable sampling intended, the timing could not be adjusted much below 4Hz before appearing very sluggish. Thus, the circuit was excluded in the final prototype as the minor benefits provided did not seem to justify the additional hardware.

Schematic 3: ADC and Digital Output Schematic

13

Image 3: ADC and Digital Output

Caliper and Housing Fixture For the prototype, scrap metal found in the Electronics Engineering Technology Research Laboratory in the Ross Engineering Technology building was used to construct the digital caliper housing. The vernier caliper purchased from Sears was mounted firmly onto the housing as described earlier in the Hardware Description. The overall outcome of our working prototype met specifications previously defined in our Project Plan Document.

Image 4: Final Prototype

14

Image 5: Final Prototype

DISCUSSION
Given the small amount of time to design, test, and construct the final instrumentation prototype, we as a group are satisfied with the outcome our project. However, there are a significant amount of aspects in the design project that can be improved or even performed differently. The final prototype display flickers between a few millimeters due to noise issues. From our observations, the GP2D12 generates a noisy analog signal, therefore a 10uF capacitor was placed in between the output signal and ground. The noise that does not get filtered becomes amplified after the various stages of operational amplifiers. Two other 10uF capacitors were utilized to filter the final analog output signal in the signal conditioning stage and in between the 5 volt and ground buses. It was also observed that more noise is introduced as the 9 volt battery drains. From this, we noted that our design consumes a lot of power.

15

A large issue that determines the accuracy of the digital caliper is the linearization technique used to condition the sensor signal. As shown in the Prototype Development Section of this document, the output signal of the sensor after 10 cm is not exactly logarithmic. It was later discovered in the GP2D12 Application Notes that the output is more like a 1/X function. We attempted to create a dividing amplifier utilizing two logarithmic amplifiers, a difference amplifier, followed by an antilog amplifier, however this process failed. Perhaps if this issue came to our attention sooner, a dividing amplifier IC could have been ordered. Another technique that could have corrected the linearization problem was implementing a microcontroller or computer. A look-up table would be created to match the correct distance output with the sensor signal. This idea was first discussed during the project conceptualization phase, but it prevented our team from learning about the various stages involved in analog signal processing and digitizing the output. This was our first attempt to design and build a working electronic instrumentation project on a design team. Further developing our teamwork skills in a cooperative environment has better prepared us for industry.

16

PROTOTYPE BILL OF MATERIALS


Description 9V Battery 5V Regulator Charge Pump Capacitor Resistor Rheostat Range Finder Quad JFET Op-Amp diode ADC for 3-Digit Display BCD to Seven Segment Seven Segment Display PNP Transistor Vernier Caliper Part # 9VDC GL7805 TC7662A C R R_var GP2D12 TL084CN 1N4148 CA3162 74LS247 7540 2N3906 Source Haggen lab lab lab lab lab Junun.org lab lab lab lab lab lab Sears Price ($) 4.95 free free free free free 8.25 free free free free free free 9.99 Quantitiy 1 1 1 7 14 4 1 1 1 1 1 3 3 3

17

S-ar putea să vă placă și