DG01D-E motor with encoder Specification: Dimension: 80x22.4x25.8mm Voltage:3V~9V Gear ratio:1:48 Speed:90RPM (4.5V) Color :blue color Gear material: metal Dimension drawing: 1.Encoder board specification Board size: 26*22*1.2mm 2. Terminal pin definition: G: hall power negative H1: hall H1 output signal, square wave H2: hall H2 output signal, square wave V: hall power positive M+: motor positive pole M-: motor negative pole Remark: 1. The voltage between V-G is determined according to the power supply voltage of the single chip microcomputer used, generally 3.3V or 5V is used. 2. The frequency of the output square wave of H1 and H2 and the speed of the motor are related to the number of poles of the used magnetic disk. 3. The voltage between M+ and M- is set according to the motor voltage used. 3. Principle 3.1 Motor speed measurement: The Hall sensor can sense the N and S poles of the magnetic plate. We use the Hall of the S pole to sense that when each Hall sensor senses the S of the magnetic plate, the Hall output will output a high level When the N pole of the magnetic plate, the Hall output will output a low level. When the motor rotates continuously, a square wave is output at the Hall output. The speed of the motor can be known based on the period T of the output square wave. Assuming that the magnetic disk we use is the P-polarity, the measured square-wave period is T. Measure motor speed: n=60/PT. 3.2 Motor reversal measurement: Two Hall sensors are placed in two different positions in the circuit. When the motor turns differently, the two Hall outputs have different square waves. When the motor rotates forward, H1 detects the rising edge, H2 enters the falling edge when the motor reverses, H1 detects the falling edge, H2 is also the falling edge.