Digital Caliper
Digital Caliper
_________________________________
INTRODUCTION
Overall Objective
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
The function of the digital caliper was designed to be able to optically measure
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.
1
FUNCTIONAL DESCRIPTION
As shown in the system block diagram in Figure 1, there were four main
Then the analog signal obtained from the transducer output had to be
analog signal was then digitized with an A/D converter, and finally displayed.
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
2
Detailed Hardware Description
vernier caliper was mounted on the chassis housing the transducer and signal
conditioning circuitry. The physical process for this system mentioned in Figure
the diagram, the other caliper arm is mounted and serves as a reference.
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
and displayed on three seven segment LED modules in millimeters. A 9-volt battery
3
Distance Measuring Sensor
measuring sensor. This device contains both an infrared light source and a
photodetector.
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
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
4
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
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
5
Signal Processing
logarithmic amplifier was constructed a stage after the transducer. This was
Though the output signal was more linear, a decaying output with respect
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.
necessary because the A/D converter and output circuitry required a 0 to 1.0 volt
conditioning procedures.
6
A/D Conversion and Output Display
Range: 0mm-99.9mm
Units: milimters
Having previously linearized and scaled the input voltage, the function of
the A/D section was essentially that of a voltmeter. Intersil’s CA3162E dual slope
A/D converter was chosen for its appropriate range and precision, featuring
displays. These lines were used to enable three 7-segment LED modules, as
display driver. PNP transistors were used as multiplexing switches, and the
74LS247’s 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 speed-
useless given the overall caliper error of over one millimeter, this provides for
7
PROTOTYPE DEVELOPMENT
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
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
Distance (cm) Voltage Out (V) Distance (cm) Voltage Out (V)
0 0.029 16 1.710
1 0.702 17 1.609
2 1.18 18 1.526
3 1.145 19 1.470
4 1.805 20 1.392
5 1.847 21 1.317
6 2.01 22 1.268
7 2.577 23 1.223
8 2.751 24 1.166
9 2.66 25 1.129
10 2.508 26 1.091
11 2.334 27 1.052
12 2.176 28 1.014
13 2.033 29 0.975
14 1.904 30 0.956
15 1.795
8
Graph 1: Distance Vs. Voltage Out
2.5
2
Voltage Out (V)
Vo
1.5
0.5
0
0 2 4 6 8 10 12 14 16 18 20 22 24 26 28 30
distance
Distance (cm)
9
Graph 2: Distance Vs. Voltage Out w/ Log Amp
1.23
1.24
1.25
Voltage Out (V)
−V
1.26
1.27
1.28
1.29
8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
distance
Distance (cm)
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
10
The following schematic diagram and signal conditioning equations were
supply circuitry was soldered onto a single protoboard. The power supply circuitry
Signal Conditioning
D1N4148
D1
Sharp GP2D12 R4
U2
11
TL084 20k
R1 R8
1 2 2 -5V
11
GND
V-
11
V-
10u OUT - R7 TL084
150 4.99k
3
3 7 9 -5V
V-
+ OUT -
4
+5V R3
0 U1A 5
2k
8
V+
0 + OUT
4
+5V
20k U1B 10
0 V+ +
4
+5V C2
+5V U1C 10u
V+
0
R5 R10 R6
1.02k 150 1k 0 0
1 2 +5V
GND
IN OUT
U5 C8
V2
+ 10u
3
9Vdc C6 +
-5V
- -
10u
0 TC7662A C7
Charge Pump 10u
0
0 0
Schematic 2: Power Supply Schematic
11
Image 1: Power Supply and Signal Processing Circuitry
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 CA3162E’s 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
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.
13
Image 3: ADC and Digital Output
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.
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
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
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
this process failed. Perhaps if this issue came to our attention sooner, a dividing
Another technique that could have corrected the linearization problem was
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
16
PROTOTYPE BILL OF MATERIALS
17