Photoelectric Encoder Motor 180RPM

Photoelectric Encoder Motor 180RPM

Overview

Photoelectric encoder is used in the photoelectric encoder motor 180RPM for high-precision control. It can be flexibly used with other parts. There are two M4 threaded holes on three sides of the motor respectively, so it can be easily fixed with Makeblock mechanical parts. Meanwhile, the noise is low when the motor is running and large torque is available for a long time since customized material is used. The motor supports multiple motor drivers and main control boards, such as Orion, MegaPi, MegaPi Pro, and Me Auriga.

Technical Specifications

  • Reduction ratio: 39.6
  • Rated voltage: 7.4V
  • No-load current: 240mA
  • Load current: ≤750mA
  • No-load speed: 350RPM±5%
  • Original speed: 14,000RPM±5%
  • Breakout torque: 5kg·cm
  • Rated torque: 800g·cm
  • Output shaft length: 9mm
  • Power: 3.7W
  • Encoder rotation angle: 360°

Programming Guide

● Programming with mBlock 5

Block description (main control board: Auriga)

Block Feature
Select a port

Set the power to –100~100

Select a port

Set the speed (the maximum speed depends on the motor model)

Select a port

Set the rotation angle (a natural number)Set the speed (the maximum speed depends on the motor model)

Obtain the speed of the motor
Obtain the angle of the motor from the origin

After running the following program, encoder motor 1 and encoder motor 2 rotate at the speed of 100RPM for 1 second and stop rotating for 1 second, and repeat this process.

● Programming with mBlock 3

Block description

Block Feature
Select a slot

Set the power to –255~255

Select a slot

Set the speed (the maximum speed depends on the motor model)

Select a slot

Set the rotation angle (a natural number)

Set the speed (the maximum speed depends on the motor model)

Obtain the speed of the motor
Obtain the position or degree of the motor from the origin

After running the following program, encoder motor 1 and encoder motor 2 rotate at the speed of 100RPM for 1 second and stop rotating for 1 second, and repeat this process.

● Arduino programming

If you use Arduino programming, you need to use Makeblock-Library-master to control the motor.

After running the following program, encoder motor 1 and encoder motor 2 rotate at the speed of 100RPM for 1 second and then stop rotating for 1 second, and repeat this process.

Download the example program

● Python programming

  1. Install MegaPi Pro on Raspberry Pi, and connect the photoelectric encoder motor 180RPM to the DC/encoder driver.
  2. Install the latest Makeblock library for Raspberry Pi, do a “pip3 install makeblock” in the command line, and then do an “upgrade” in the command line.
  3. Create a Python file suffixed with .py.
  4. Write a program in the Python file.
  5. Run the Python file, for example, “python123.py”.

Function description

Function Feature
EncoderMotor(port) Set a port to connect the DC/encoder motor.

port: MegaPiPro.PORT1~MegaPiPro.PORT4

run(speed) Rotate at the specified speed.

speed: rotation speed range: –180~180

move_to(position,speed,callback) Rotate to the specified position at the specified speed.

position: target position

speed: rotation speed range: –180~180callback: callback is triggered when the target position is reached

set_home() Set the current position as the origin.

Example program 1:

After running the following program, the encoder motor connected to port 1 for DC/encoder motor on MegaPi Pro rotates clockwise at the speed of 50RPM for 2 seconds, stops rotating for 1 second, rotates anticlockwise at the speed of 50RPM for 2 seconds, stops rotating for 1 second, and repeats this process.

Download the example program

Example program 2:

After running the following program, the encoder motor connected to port 1 for DC/encoder motor on MegaPi Pro rotates to the specified position.

Download the example program

Wiring Mode

● Connect electronic modules

Connect the photoelectric encoder motor 180RPM to the port for encoder motor on the main control board or the port for encoder motor on the encoder motor driver by using the cable for photoelectric encoder motor 180RPM.

● Build the structure

The photoelectric encoder motor 180RPM can be used to provide power or used as a part of the chassis of mBot Ranger. Its shaft is compatible with the plastic timing pulley 62T with step and the plastic timing pulley 90T with step on Maker’s Platform of Makeblock.