Two, technical background
Optical electric axial angle encoder is the representational optoelectronic sensor of photoelectric measurement angular displacement, when the application optical electric axial angle encoder is measured, the code-disc null position that often exists optical electric axial angle encoder does not overlap with the rotating shaft null position of measuring system and exists angle to be worth phenomenon partially, thereby the angle displacement amount of the rotating shaft of the measuring system that has caused measuring is inaccurate, makes measuring accuracy meaningless.Therefore, when using the angular displacement of optical electric axial angle encoder measurement rotating shaft, must accomplish to make the code-disc zero-bit of optical electric axial angle encoder to align earlier with the zero-bit of measuring system rotating shaft.
Adopt the control of electronic circuit, can accomplish the zero-bit alignment of code-disc zero-bit and measuring system rotating shaft, and then the precision and the reliability of angle measurement have been guaranteed, the prior art the most approaching with the present invention is the utility model patent of Changchun Institute of Optics, Fine Mechanics and Physics, CAS, the patent No. is ZL96247089.9, name is called " a kind of electronics zeroing circuit of photoelectric encoder " as shown in Figure 1, comprise power supply 1, plucking number sign switch 2, pull-up resistor 3, counting circuit 4, code output terminal 5, counting circuit output terminal 6, digital processing system 7;
How many positions this circuit structure complexity, scrambler have, and just establish what plucking number sign switches and are equipped with what upper resistance, and manual operation is pretty troublesome, and is time-consuming, easily pulls out mistake, and zeroing is inconvenient.
Three, summary of the invention
In order to overcome the defective that prior art exists, it is efficient and convenient to the objective of the invention is to return to zero, and improves accuracy, and the spy sets up a kind of electronics adjusting zero method of optical electric axial angle encoder.
The technical problem to be solved in the present invention is: the electronics adjusting zero method that a kind of optical electric axial angle encoder is provided.The technical scheme of technical solution problem is: the electronics zeroing circuit of design as shown in Figure 2, comprises mnemonic 8, reset switch 9, pull-up resistor 10, single-chip microcomputer 11; On mnemonic 8, be provided with sheet choosing end CS, clock interface SK, write end DI, output terminal DO.CS is only effective when low level " 0 " for sheet choosing end, and mnemonic 8 is started working; Clock interface SK when single-chip microcomputer 11 carries out read-write operation, carries clock signal toward mnemonic 8; Write end DI, single-chip microcomputer 11 is when write operation, toward mnemonic 8 serial-shifts input data; Output terminal DO, single-chip microcomputer 11 give single-chip microcomputer 11 by mnemonic 8 output datas when mnemonic 8 is carried out read operation.One end ground connection of reset switch 9, the other end meets the P of single-chip microcomputer 11
1Mouthful, reset switch 9 is high ordinary telegram flat " 1 " when disconnecting, storage all is primary data in the mnemonic 8, reset switch 9 is low level " 0 " when connecting, the current data value of optical electric axial angle encoder is deposited in the mnemonic 8, and the primary data in the mnemonic 8 refreshed, at the P of reset switch 9
1Install pull-up resistor 10 additional, another termination 5V power supply of pull-up resistor 10 on the mouth line.It is P that single-chip microcomputer 11 is provided with input and output (I/O) interface
1Mouth, P
2Mouth, P
3Mouth, P
4Mouth, P
5Mouthful, P
1Mouth is connected P with the power end of reset switch 9
2Mouth holds CS to connect P with the sheet choosing of mnemonic 8
3Mouthful with the interface clock signal SK of mnemonic 8 connection, P
4Mouth holds DI to connect P with writing of mnemonic 8
5Mouthful with the output terminal DO of mnemonic 8 connection.
The execution electronics zeroing control program of design as shown in Figure 3, is used for controlling the electronics zeroing circuit, after program begins at first by the P of single-chip microcomputer 11
2Mouth starts mnemonic 8, P by sheet choosing end CS
3Mouth provides clock signal by the clock interface SK of mnemonic 8, this moment, single-chip microcomputer 11 read the angular deviation value in the mnemonic 8 one time by the output terminal DO serial-shift of mnemonic 8, if it deposits in for H in the address of EPROM program storage of single-chip microcomputer 11, read self current angle value of optical electric axial angle encoder then, if it is K, again to P
1The state of mouth is judged, works as P
1When mouth was high level " 1 ", expression did not need zero clearing, still uses original angular deviation value H, obtains corresponding mechanical zero angle value; Work as P
1When mouth was low level " ", expression needed zero clearing, and single-chip microcomputer 11 enters the subroutine of write operation, and CS starts mnemonic 8 by sheet choosing end, and by P
3Mouth provides clock signal by clock interface SK for mnemonic 8, at this moment the P of single-chip microcomputer 11
4Mouthful with the serial-shift mode self current angle value K of optical electric axial angle encoder is write in the mnemonic 8 by writing end DI, as new angular deviation value H, get back to master routine then, self the angle value K current with optical electric axial angle encoder deducts angular deviation value H, because the K=H of this moment, draw the angle value of corresponding mechanical zero, K-H=0 reaches the effect of zero clearing.
Good effect of the present invention: in this method, circuit structure is simple, and size is little, implements control by software program, and it is efficient and convenient to return to zero, and has improved speed, is difficult for makeing mistakes good stability, accuracy height.