Microspur electronic surveying meter
Technical field
The utility model is a kind of instrument that relates to surveying instrument field, definite says a kind of microspur electronic surveying meter.
Background technology
Because traditional microspur surveying instrument mostly adopts Machine Design, the measuring accuracy of existence is generally lower, and such as the microscope that Newton's rings experiment is used, its measuring accuracy is 0.01mm, and it is divided into 100 parts by mechanical drive 1mm.And because the physical constructions such as screw thread are used for a long time, can make can not mesh completely between gear, and then there will be idle running, so the microdrum in measuring can only rotate to a direction, in case because the idle running in screw thread causes error, but during actual measurement, due to the hand mistake of survey crew, idle running can often occur, but survey crew is also not easy discovery, if in whole measuring process, idle running error is too many, error will accumulate, and finally makes the inaccurate or complete mistake of the data that measure.Therefore improve the precision of traditional microspur measuring instrument and avoid the idle running error in measuring process to have great importance as far as possible.
As can be seen here, above-mentioned existing traditional microspur measuring instrument still has many defects, and is urgently improved.
Utility model content
Technical problem underlying to be solved in the utility model is, overcomes the defect that existing traditional microspur measuring instrument exists, and a kind of microspur measuring instrument of new structure is provided, thereby improves the precision of microspur measuring instrument.
The utility model solves its technical problem underlying and realizes by the following technical solutions.
According to the microspur electronic surveying meter the utility model proposes, comprise a vernier adjustment knob, described vernier adjustment knob is by the rotating shaft synchronizing function of shaft coupling, can synchronously connect rotationally a rotary encoder, this rotary encoder disposes photoelectric conversion device, for converting the geometry of machinery displacement on the axle of this rotary encoder to digit pulse amount, the pulse that one microprocessor is configured to by a program, this rotary encoder to be exported is counted and is calculated, and judge the sense of rotation of this rotary encoder, to calculate swing offset Δ d and sense of rotation, and be presented on liquid crystal display in real time.
Preferably, the whole hardware circuit of described microspur electronic surveying meter comprises: rotary encoder output pulse signal circuit, single-chip microcomputer, reset clear circuit, microspur value display circuit and warning circuit, wherein, described rotary encoder output pulse signal circuit, described reset clear circuit, described microspur value display circuit are connected with described single-chip microcomputer respectively with described warning circuit.
In above-mentioned arbitrary scheme, preferably, described rotary encoder comprises OMRON E6B2-CWZ6C 1000P/R rotary encoder.
In above-mentioned arbitrary scheme, preferably, describedly can synchronously connect and comprise rotationally, rotary encoder be connected to the vernier adjustment knob on traditional microspur measuring instrument by special coupling shaft, thereby makes main shaft and the vernier adjustment knob spindle synchronous of scrambler.
In above-mentioned arbitrary scheme, preferably, the precision of described rotary encoder is 1000p/r, and 1000 pulses of output rotate a circle.Because rotation represents to have moved forward or backward 0.001 unit.
In above-mentioned arbitrary scheme, preferably, its sense of rotation of described judgement comprises, rotary encoder is powered with 5V, exports 3 road signals, is respectively A, B, Z.What A and B exported is continuous impulse, but A and B differ one 90 °.When scrambler forward (supposing to be forward clockwise), 90 ° of phase places of A phase ratio of pulse length to the total cycle length B phase pulse advancing, during reversion, 90 ° of phase places of A phase ratio of pulse length to the total cycle length B phase pulse hysteresis, the Z that often rotates a circle exports a pulse, by comparing the phase differential of A phase and B phase, just can judge sense of rotation.
In above-mentioned arbitrary scheme preferably, described microprocessor be configured to by described A phase pulse carry out continuous counter and obtain umber of pulse count, calculate swing offset Δ d.Because a umber of pulse represents that displacement is 0.001 unit, therefore count the corresponding reality of umber of pulse has moved 0.001 * count unit.
In above-mentioned arbitrary scheme, preferably, described single-chip microcomputer comprises STC89C52 single-chip microcomputer.
In above-mentioned arbitrary scheme, preferably, described program comprises a master routine and an Interrupt Subroutine.
In above-mentioned arbitrary scheme, preferably, described master routine detailed step is followed successively by:
Step 1, liquid crystal display initialization;
Step 2, external interrupt initialization;
Step 3, checks whether A is negative edge mutually, if do not had, returns to step 3 and continues to check, if had, enters step 4;
Step 4, enters Interrupt Subroutine;
Step 5, shows Interrupt Subroutine;
Step 6, returns to step 3 and continues to check.
In above-mentioned arbitrary scheme, preferably, described Interrupt Subroutine detailed step is followed successively by:
Step 1, closes external interrupt;
Step 2, calculates A, and B two phase place poor turns to determine;
Step 3, whether judgement turns to is clockwise, if so, enters step 4, if not, enter step 7;
Step 4, arranges zone bit flag=1, and counting variable count++ is set;
Step 5, judges whether count numerical value is 9999, i.e. if(count==9999), if so, count step 6, if not, enter step 8;
Step 6, arranges carry, and count zero clearing, enters step 8 simultaneously;
Step 7, arranges zone bit flag=2, enters step 8;
Step 8, opens external interrupt.
In above-mentioned arbitrary scheme, preferably, described microspur value display circuit comprises LCD GXM1602S-SL liquid crystal display.
In above-mentioned arbitrary scheme, preferably, described reset clear circuit comprises reset circuit of SCM.
In above-mentioned arbitrary scheme, preferably, described warning circuit comprises the warning circuit showing with LED light emitting diode 3MM.
In above-mentioned arbitrary scheme, preferably, described LCD GXM1602S-SL liquid crystal display is configured to microspur value and the direction that display measurement obtains, and shows " error again " character when occurring measuring idle running, in order to reminding user.
In above-mentioned arbitrary scheme, preferably, the warning circuit that described LED light emitting diode 3MM shows is configured to when there is idle running, need reminding user, and does not produce noise.
In above-mentioned arbitrary scheme, preferably, described reset clear circuit is configured to when button is pressed, reset clear circuit output low level, monolithic processor resetting, system roll-back.
In above-mentioned arbitrary scheme, preferably, described rotary encoder output pulse signal circuit is connected with single-chip microcomputer and comprises the P3.2 mouth of selecting the A of scrambler to be connected single-chip microcomputer, the B P2.1 mouth that is connected.
In above-mentioned arbitrary scheme, preferably, described microspur value display circuit is connected and comprises that 8 bit parallel FPDP of LCD GXM1602S-SL liquid crystal display are connected respectively P1.0 to the P1.7 mouth of STC89C52 single-chip microcomputer with single-chip microcomputer.The reading of liquid crystal display (RD), writes (WR), enables the P2.5 that (LCDEN) control signal connects respectively single-chip microcomputer, P2.6 and P2.7 mouth.
In above-mentioned arbitrary scheme, preferably, described warning circuit is connected with single-chip microcomputer and comprises that control mouth is connected a P2.0 mouth for single-chip microcomputer.
In above-mentioned arbitrary scheme, preferably, described reset clear circuit is connected and comprises that REST is connected 9 pins of single-chip microcomputer with single-chip microcomputer.
Accompanying drawing explanation
Fig. 1 is according to the whole hardware circuit diagram of an embodiment of the utility model microspur electronic surveying meter.
Fig. 2 is according to the rotary encoder output waveform embodiment illustrated in fig. 1 of the utility model microspur electronic surveying meter.
Fig. 3 is according to rotary encoder embodiment illustrated in fig. 1 and the interface microcontroller circuit of the utility model microspur electronic surveying meter.
Fig. 4 is according to liquid crystal display embodiment illustrated in fig. 1 and the interface microcontroller circuit of the utility model microspur electronic surveying meter.
Fig. 5 is according to the circuit diagram of the warning circuit embodiment illustrated in fig. 1 of the utility model microspur electronic surveying meter.
Fig. 6 is according to the main program flow chart embodiment illustrated in fig. 1 of the utility model microspur electronic surveying meter.
Fig. 7 is according to the Interrupt Subroutine process flow diagram embodiment illustrated in fig. 1 of the utility model microspur electronic surveying meter.
Fig. 8 is according to the circuit diagram of the reset clear circuit embodiment illustrated in fig. 1 of the utility model microspur electronic surveying meter.
Embodiment
The utility model has the advantage of, compare with traditional microspur meter (it is example that the Newton ring of take is measured instrument),
1, measuring accuracy has improved 10 times.
2, to measure efficiency and be greatly improved, measuring speed is accelerated greatly, under identical workload, has saved Measuring Time.
3, easy for installation, portable strong.
4, do not destroy the structure of original surveying instrument.
Below in conjunction with accompanying drawing and preferred embodiment, to embodiment, structure, feature and the effect thereof of the microspur electronic surveying meter according to the utility model proposes, be elaborated as follows.
As shown in Figure 1, a microspur electronic surveying meter comprises rotary encoder, liquid crystal display, reset clear circuit, warning circuit, single-chip microcomputer.
Wherein, liquid crystal display is selected LCD GXM1602S-SL liquid crystal display, single-chip microcomputer is selected STC89C52 single-chip microcomputer, rotary encoder is selected OMRON E6B2-CWZ6C 1000P/R rotary encoder, reset clear circuit is selected reset circuit of SCM, the warning circuit that warning circuit selects LED light emitting diode 3MM to show.
Described liquid crystal display is disposed for to microspur value and the direction that display measurement obtains, and shows " error again " character when occurring measuring idle running, in order to reminding user.
Described warning circuit is disposed for when there is idle running, needing reminding user, and does not produce noise.
When described reset clear circuit is configured to need to remeasure in measuring process, press reset zero clearing button, system reset, shows zero clearing.
Rotary encoder is connected to the vernier adjustment knob on traditional microspur measuring instrument by special coupling shaft, thereby makes main shaft and the vernier adjustment knob spindle synchronous of scrambler.
As shown in Figure 3, rotary encoder is connected with single-chip microcomputer, by the be connected P3.2 mouth of single-chip microcomputer of the A of rotary encoder, the B P2.1 mouth that is connected.
As shown in Figure 4, liquid crystal display is connected with single-chip microcomputer, 8 bit parallel FPDP of LCD GXM1602S-SL liquid crystal display connect respectively P1.0 to the P1.7 mouth of STC89C52 single-chip microcomputer.The reading of liquid crystal display (RD), writes (WR), enables the P2.5 that (LCDEN) control signal connects respectively single-chip microcomputer, P2.6 and P2.7 mouth.
As shown in Figure 5, warning circuit is connected with single-chip microcomputer, the control mouth of warning circuit is connected to the P2.0 mouth of single-chip microcomputer.
As shown in Figure 8, reset clear circuit is connected with single-chip microcomputer, the REST of reset clear circuit is connected to 9 pins of single-chip microcomputer.
In the time of need to measuring, detailed process is as follows:
Step 101, when the vernier adjustment knob of traditional microspur measuring instrument starts to rotate, Single Chip Microcomputer (SCM) program brings into operation.
Step 201, liquid crystal display initialization;
In this step, by sending instruction lcd_init (), make the initialization of LCD liquid crystal display, make liquid crystal display be shown as sky, wait for operation.
Step 202, external interrupt initialization;
In this step, send instruction IT0=1, external interrupt is set to A phase pulse negative edge and triggers interruption.
Step 203, checks whether A is negative edge mutually, if do not had, returns to step 203 and continues to check, if had, enters step 204;
Step 204, enters Interrupt Subroutine;
In this step, enter Interrupt Subroutine, specifically act as pulse count and process.
Step 205, shows Interrupt Subroutine;
In this step, show that interruption subroutine refers to microspur value and direction that LCD GXM1602S-SL liquid crystal display obtains for display measurement, and show " error again " character when occurring measuring idle running, in order to reminding user.
Step 206, returns to step 203 and continues to check.
Step 301, closes external interrupt;
Step 302, calculates A, and B two phase place poor turns to determine;
In this step, by single-chip microcomputer, calculate A, B two phase place poor.
Step 303, whether judgement turns to is clockwise, if so, enters step 304, if not, enter step 307;
In this step, rotary encoder is powered with 5V, exports 3 road signals, as shown in Figure 2, is respectively A, B, Z.What A and B exported is continuous impulse, but A and B differ one 90 °.When scrambler forward (supposing to be forward clockwise), 90 ° of phase places of A phase ratio of pulse length to the total cycle length B phase pulse advancing, during reversion, the A phase ratio of pulse length to the total cycle length B phase pulse 90 ° of phase places that lag behind, the Z that often rotates a circle exports a pulse.By the phase differential of A phase and B phase relatively, if A compares B 90 ° of phase places in advance mutually, be forward, if A compares the B 90 ° of phase places that lag behind mutually, be reversion, so just can judge sense of rotation.
Step 304, arranges zone bit flag=1, and counting variable count++ is set;
In this step, described counting variable count for by A phase pulse carry out continuous counter and obtain umber of pulse count.Because the precision of rotary encoder is 1000p/r, 1000 pulses of output that rotate a circle, therefore a umber of pulse represents that displacement is 0.001 unit, therefore count the corresponding reality of umber of pulse has moved 0.001 * count unit.
Step 305, judges whether count numerical value is 9999, i.e. if(count==9999), if so, count step 306, if not, enter step 308;
Step 306, arranges carry, and count zero clearing, enters step 308 simultaneously;
Step 307, arranges zone bit flag=2, enters step 308;
Step 308, opens external interrupt.