CN100368777C - An Electronic Zeroing Method of Photoelectric Shaft Angle Encoder - Google Patents

An Electronic Zeroing Method of Photoelectric Shaft Angle Encoder Download PDF

Info

Publication number
CN100368777C
CN100368777C CNB2004100111547A CN200410011154A CN100368777C CN 100368777 C CN100368777 C CN 100368777C CN B2004100111547 A CNB2004100111547 A CN B2004100111547A CN 200410011154 A CN200410011154 A CN 200410011154A CN 100368777 C CN100368777 C CN 100368777C
Authority
CN
China
Prior art keywords
memory
port
chip microcomputer
terminal
reset switch
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
CNB2004100111547A
Other languages
Chinese (zh)
Other versions
CN1731096A (en
Inventor
张泽宇
盖竹秋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changchun Institute of Optics Fine Mechanics and Physics of CAS
Original Assignee
Changchun Institute of Optics Fine Mechanics and Physics of CAS
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changchun Institute of Optics Fine Mechanics and Physics of CAS filed Critical Changchun Institute of Optics Fine Mechanics and Physics of CAS
Priority to CNB2004100111547A priority Critical patent/CN100368777C/en
Publication of CN1731096A publication Critical patent/CN1731096A/en
Application granted granted Critical
Publication of CN100368777C publication Critical patent/CN100368777C/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Optical Transform (AREA)

Abstract

一种光电轴角编码器的电子调零方法,属于光电测量技术领域中涉及的一种电子调零方法。本发明要解决的技技术问题是:提供一种光电轴角编码器的电子调零方法,技术方案是:设计的电子调零电路包括记忆存储器、复位开头、上拉电阻和单片机,在记忆存储器上设有片选端CS、时钟接口SK、写入端DI和输出端DO;复位开关的一端接地,另一端接单片机的P1口、在复位开关P1口线上加装上拉电阻,上拉电阻的另一端接5V电源;单片机上设有输入/输出(I/O)接口P1至P5,P1口与复位开关的电阻端接通,P2口至P5口分别与记忆存储器的片选端CS、时钟接口SK、写入端DI、输出端DO接通;按设计好的电子调零控制程序控制电子调零电路,达到清零的作用,该方法调节快捷方便,准确度高。

Figure 200410011154

The invention relates to an electronic zero adjustment method of a photoelectric shaft angle encoder, which belongs to the electronic zero adjustment method involved in the technical field of photoelectric measurement. The technical problem to be solved by the present invention is to provide an electronic zero-adjustment method for a photoelectric shaft-angle encoder. There are chip select terminal CS, clock interface SK, write terminal DI and output terminal DO; one end of the reset switch is grounded, the other end is connected to the P1 port of the microcontroller, and a pull-up resistor is installed on the reset switch P1 port line. The other end of the pull-up resistor is connected to a 5V power supply; there are input/output (I/O) interfaces P 1 to P 5 on the microcontroller, P 1 is connected to the resistance end of the reset switch, and P 2 to P 5 are respectively connected to The chip select end CS, clock interface SK, write end DI, and output end DO of the memory memory are connected; the electronic zero adjustment circuit is controlled according to the designed electronic zero adjustment control program to achieve the function of clearing. This method is quick and convenient to adjust. High accuracy.

Figure 200410011154

Description

A kind of electronics adjusting zero method of optical electric axial angle encoder
One, technical field
The invention belongs to the electronics adjusting zero method that relates to a kind of optical electric axial angle encoder in the photoelectric measurement technical field.
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.
Four, description of drawings
Fig. 1 is a zeroing circuit structural representation in the prior art, and Fig. 2 is the structural representation of the electronics zeroing circuit in the inventive method, and Fig. 3 is the control program process flow diagram of the inventive method.
Five, embodiment
The inventive method is by the structural design circuit of first step electronics zeroing circuit, again by the second control program control circuit that goes on foot, in electronics zeroing circuit structure, cause the angular deviation value to be lost when preventing unexpected power down or switch, mnemonic 8 is selected the 93C66 storer for use, single-chip microcomputer adopts 8751 single-chip microcomputers, and the resistance of pull-up resistor 10 adopts 1-10K, and earthing power supply voltage is 5V.

Claims (1)

1.一种光电轴角编码器的电子调零方法,是通过电子调零电路实现的,其特征在于还包括设计的执行调零控制程序,控制电子调零电路,该电子调零电路包括记忆存储器(8)、复位开关(9)、上拉电阻(10)、单片机(11);在记忆存储器(8)上,设有片选端CS、时钟接口SK、写入端DI、输出端DO,片选端CS只有在低电平“0”时有效,记忆存储器(8)开始工作;时钟接口SK,在单片机(11)进行读写操作时,往记忆存储器(8)输送时钟信号;写入端DI,单片机(11)在写操作时,往记忆存储器(8)串行移位输入数据;输出端DO,单片机(11)在对记忆存储器(8)进行读操作时,由记忆存储器(8)输出数据给单片机(11),复位开关(9)的一端接地,另一端接单片机(11)的P1口,复位开关(9)断开时为高平电平“1”,对记忆存储器(8)中存储的都是初始数据,复位开关(9)接通时为低电平“0”,把光电轴角编码器的当前数据值存入到记忆存储器(8)中,并把记忆存储器(8)中的初始数据刷新,在复位开关(9)的P1口线上加装上拉电阻(10),上拉电阻(10)的另一端接5V电源,单片机(11)上设有输入输出(I/O)接口即P1口、P2口、P3口、P4口、P5口,P1口与复位开关(9)的电源端接通,P2口与记忆存储器(8)的片选端CS接通,P3口与记忆存储器(8)的时钟接口SK接通,P4口与记忆存储器(8)的写入端DI接通,P5口与记忆存储器(8)的输出端DO接通;设计的执行电子调零控制程序,来控制电子调零电路,程序开始后首先由单片机(11)的P2口通过片选端CS,启动记忆存储器(8),P3口通过记忆存储器(8)的时钟接口SK提供时钟信号,此时单片机(11)通过记忆存储器(8)的输出端DO串行移位读取一遍记忆存储器(8)中的角度偏差值,设其为H存入单片机(11)的EPROM程序存储器的地址中,然后读取光电轴角编码器当前的自身角度值,设其为K,再对P1口的状态进行判断,当P1口为高电平“1”时,表示不需要清零,依然用原来的角度偏差值H,得到相对应的机械零位角度值;当P1口为低电平“0”时,表示需要清零,单片机11进入写操作的子程序,通过片选端CS启动记忆存储器(8),并由P3口通过时钟接口SK为记忆存储器(8)提供时钟信号,此时单片机(11)的P4口通过写入端DI用串行移位方式把光电轴角编码器当前的自身角度值K写入记忆存储器(8)中,作为新的角度偏差值H,然后回到主程序,用光电轴角编码器当前的自身角度值K减去角度偏差值H,因为此时的K=H,得出相对应的机械零位的角度值,K-H=0达到清零的作用。1. An electronic zero-adjustment method of a photoelectric shaft angle encoder is realized by an electronic zero-adjustment circuit, and is characterized in that it also includes a designed execution zero-adjustment control program to control the electronic zero-adjustment circuit, and the electronic zero-adjustment circuit includes a memory Memory (8), reset switch (9), pull-up resistor (10), single-chip microcomputer (11); on the memory memory (8), there are chip select end CS, clock interface SK, write end DI, output end DO , the chip select terminal CS is only effective when the low level is "0", and the memory storage (8) starts to work; the clock interface SK, when the single-chip microcomputer (11) performs read and write operations, sends a clock signal to the memory storage (8); write Input terminal DI, single-chip microcomputer (11) when writing operation, towards memory storage (8) serial shift input data; Output terminal DO, single-chip microcomputer (11) when carrying out reading operation to memory storage (8), by memory storage ( 8) Output data to the single-chip microcomputer (11), one end of the reset switch (9) is grounded, and the other end is connected to the P1 port of the single-chip microcomputer (11). (8) is stored in the initial data, the reset switch (9) is low level "0" when it is turned on, the current data value of the photoelectric shaft angle encoder is stored in the memory storage (8), and the memory For the initial data refresh in the memory (8), a pull-up resistor (10) is installed on the P1 port line of the reset switch (9), and the other end of the pull-up resistor (10) is connected to a 5V power supply. There are input and output (I/O) interfaces, namely P 1 port, P 2 port, P 3 port, P 4 port, P 5 port, P 1 port is connected to the power terminal of the reset switch (9), and P 2 port is connected to the memory The chip select port CS of the memory (8) is connected, the P 3 port is connected with the clock interface SK of the memory memory (8), the P 4 port is connected with the write-in port DI of the memory memory (8), and the P 5 port is connected with the memory memory (8). The output terminal DO of memory (8) is connected; The execution electronic zero-adjustment control program of design, controls electronic zero-adjustment circuit, at first by the P 2 port of single-chip microcomputer (11) after the program starts by chip select terminal CS, starts memory storage ( 8), P 3 mouth provides clock signal by the clock interface SK of memory memory (8), and this moment, single-chip microcomputer (11) reads once in the memory memory (8) by the output terminal DO serial shift of memory memory (8). Angle deviation value, set it as H and store it in the address of the EPROM program memory of the single-chip microcomputer (11), then read the current self angle value of the photoelectric shaft angle encoder, set it as K, then judge the state of the P1 port , when P 1 port is high level "1", it means that it does not need to be cleared, and the original angle deviation value H is still used to obtain the corresponding mechanical zero angle value; when P 1 port is low level "0" , it means that it needs to be cleared, the single-chip microcomputer 11 enters the subroutine of the write operation, starts the memory storage (8) through the chip select terminal CS, and provides the clock signal for the memory storage (8) by the P3 port through the clock interface SK, and the single-chip microcomputer Port 4 of (11) writes the current self-angle value K of the photoelectric shaft angle encoder into the memory storage (8) through the write terminal DI in a serial shift mode, as the new angle deviation value H, and then returns to The main program uses the current self-angle value K of the photoelectric shaft encoder to subtract the angle deviation value H, because at this time K=H, the corresponding angle value of the mechanical zero position is obtained, and KH=0 achieves the function of clearing .
CNB2004100111547A 2004-10-15 2004-10-15 An Electronic Zeroing Method of Photoelectric Shaft Angle Encoder Expired - Fee Related CN100368777C (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CNB2004100111547A CN100368777C (en) 2004-10-15 2004-10-15 An Electronic Zeroing Method of Photoelectric Shaft Angle Encoder

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CNB2004100111547A CN100368777C (en) 2004-10-15 2004-10-15 An Electronic Zeroing Method of Photoelectric Shaft Angle Encoder

Publications (2)

Publication Number Publication Date
CN1731096A CN1731096A (en) 2006-02-08
CN100368777C true CN100368777C (en) 2008-02-13

Family

ID=35963493

Family Applications (1)

Application Number Title Priority Date Filing Date
CNB2004100111547A Expired - Fee Related CN100368777C (en) 2004-10-15 2004-10-15 An Electronic Zeroing Method of Photoelectric Shaft Angle Encoder

Country Status (1)

Country Link
CN (1) CN100368777C (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101900580B (en) * 2009-12-11 2012-08-15 扬州市海力精密机械制造有限公司 Encoder zero-crossing detecting device and detecting method

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101694581B (en) * 2009-09-28 2011-07-20 昆山华恒工程技术中心有限公司 Self-zeroing method of robot
CN102087119B (en) * 2010-03-18 2012-09-05 上海海事大学 Remote zero setting circuit and method for resistance-type strain measurement
CN102494711B (en) * 2011-12-12 2013-09-25 中国科学院长春光学精密机械与物理研究所 Absolute angular displacement measuring device for photoelectric encoder
CN107356890A (en) * 2017-06-19 2017-11-17 宁波中车时代传感技术有限公司 The adjustable proframmable linear Hall sensor chip of benchmark

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001201367A (en) * 2000-01-19 2001-07-27 Yaskawa Electric Corp Pulse hysterersis compensating method and its device for jitter removing circuit and recording medium recorded with its operating procedure
US20030014495A1 (en) * 2001-07-10 2003-01-16 Jogen Pathak System, method, and apparatus for preventing data packet overflow at node in wireless packet data services network
JP2003090741A (en) * 2001-09-20 2003-03-28 Koizumi Sokki Seisakusho:Kk Rotary encoder

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2001201367A (en) * 2000-01-19 2001-07-27 Yaskawa Electric Corp Pulse hysterersis compensating method and its device for jitter removing circuit and recording medium recorded with its operating procedure
US20030014495A1 (en) * 2001-07-10 2003-01-16 Jogen Pathak System, method, and apparatus for preventing data packet overflow at node in wireless packet data services network
JP2003090741A (en) * 2001-09-20 2003-03-28 Koizumi Sokki Seisakusho:Kk Rotary encoder

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101900580B (en) * 2009-12-11 2012-08-15 扬州市海力精密机械制造有限公司 Encoder zero-crossing detecting device and detecting method

Also Published As

Publication number Publication date
CN1731096A (en) 2006-02-08

Similar Documents

Publication Publication Date Title
CN101882015A (en) Controller based on composite MEMS (Micro-electromechanical System) sensor and gesture control keying method thereof
CN101408553B (en) A rotational speed measurement and frequency output device
CN100368777C (en) An Electronic Zeroing Method of Photoelectric Shaft Angle Encoder
CN111366746A (en) Method and device for measuring water flow speed and flow direction
CN204406845U (en) A kind of SCM Based experimental teaching equipment
EP3745239A1 (en) Magnetic roller device and rotation information calculating method thereof
CN101226513A (en) Keyboard display module with single-wire transmission interface and single-byte operation
JP7557088B2 (en) Method and apparatus for dynamic sampling of analog sensors - Patents.com
CN104359394A (en) High-precision digital angle measurer
CN207515681U (en) A kind of combined type digital display calliper
CN105629204A (en) Monostable triggering radar servo system
CN211855357U (en) A vision and laser fusion ranging and positioning device
CN203325306U (en) Angle sensor based spectrometer reading device
CN205228472U (en) Indoor positionable tracks mark tracker
CN112071183B (en) Multifunctional motion detection teaching experiment system and control method
CN105973127A (en) High-precision digital display goniometer
CN203672963U (en) Digital voltmeter based on singlechip
CN209640415U (en) A Capacitance Measuring Circuit Based on STC12C2052 Microcontroller
CN206532118U (en) A kind of S type force-sensing sensors of data signal output
CN220095995U (en) Multifunctional pen
CN2919694Y (en) High stability crystal oscillator control device
CN111556307B (en) A high-speed real-time structured light imaging system with adjustable laser power
CN205317400U (en) Stable form intelligence pressure sensor
CN222619282U (en) A voice and gesture acquisition device for potential difference meter virtual simulation experiment
CN201194395Y (en) Embedded multi-protocol communication module based on 485

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
C19 Lapse of patent right due to non-payment of the annual fee
CF01 Termination of patent right due to non-payment of annual fee