mBot2 replacement part Encoder motor

Skill level - BeginnerSkill level - Intermediate
Price:
Sale price A$47.03   Inc. GST
SKU:
PAKR-A0450
Out Of Stock

We will notify you when this product becomes available.

Skill level - BeginnerSkill level - Intermediate

mBot 2 is powered by powerful Encoder motor

If you are looking for a replacement part for your mBot 2 then look no further.

Please note it does not include a cable if you also need cable then buy this

The photoelectric encoder motor 180 RPM is equipped with an optical encoder that enables high-accuracy control. With two M4 threaded holes on each of the three sides, it can be easily connected to Makeblock mechanical parts and thus can be used flexibly in combination with various other parts. The customized material it uses reduces noise and promises large output torque. It supports multiple motor drivers and main control boards, such as Orion, MegaPi, MegaPi Pro, and Me Auriga.

Specifications

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

Programming guide

● Program with mBlock 5

Block description (main control board: Auriga)

BlockFeature
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 the following program runs, encoder motor 1 and encoder motor 2 rotate at the speed of 100 RPM for 1 second and stop rotating for 1 second, and then repeat this process.

● Program with mBlock 3

Block description

BlockFeature
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 the following program runs, encoder motor 1 and encoder motor 2 rotate at the speed of 100 RPM for 1 second and stop rotating for 1 second, and then repeat this process.

● Program in Arduino

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

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

#include <Arduino.h>
#include <Wire.h>
#include <SoftwareSerial.h>

#include <MeMegaPiPro.h>

double angle_rad = PI/180.0;
double angle_deg = 180.0/PI;
MeEncoderOnBoard Encoder_1(SLOT1);
MeEncoderOnBoard Encoder_2(SLOT2);
void isr_process_encoder1(void)
{
if(digitalRead(Encoder_1.getPortB()) == 0){
Encoder_1.pulsePosMinus();
}else{
Encoder_1.pulsePosPlus();
}
}
void isr_process_encoder2(void)
{
if(digitalRead(Encoder_2.getPortB()) == 0){
Encoder_2.pulsePosMinus();
}else{
Encoder_2.pulsePosPlus();
}
}

void setup(){
TCCR1A = _BV(WGM10);//PIN12
TCCR1B = _BV(CS11) | _BV(CS10) | _BV(WGM12);
TCCR2A = _BV(WGM21) | _BV(WGM20);//PIN8
TCCR2B = _BV(CS22);
attachInterrupt(Encoder_1.getIntNum(), isr_process_encoder1, RISING);
attachInterrupt(Encoder_2.getIntNum(), isr_process_encoder2, RISING);
}

void loop(){
Encoder_1.setTarPWM(100);
Encoder_2.setTarPWM(100);
delay(1);
Encoder_1.setTarPWM(0);
Encoder_2.setTarPWM(0);
delay(1);
loop();
}

 

● Program in Python

  1. Install MegaPi Pro on Raspberry Pi, and connect the photoelectric encoder motor 180 RPM 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

FunctionFeature
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 the following program runs, the encoder motor connected to port 1 for DC/encoder motor on MegaPi Pro rotates clockwise at the speed of 50 RPM for 2 seconds, stops rotating for 1 second, rotates anticlockwise at the speed of 50 RPM for 2 seconds, stops rotating for 1 second, and then repeats this process.

from time import sleep
from makeblock import MegaPiPro
board = MegaPiPro.create()
encoder = board.EncoderMotor(MegaPiPro.PORT1)
while True:
encoder.run(50)
sleep(2)
encoder.run(0)
sleep(1)
encoder.run(-50)
sleep(2)
encoder.run(0)
sleep(1)

 

Example program 2:

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

10 lines (9 sloc) 274 Bytes
RawBlameHistory

from time import sleep
from makeblock import MegaPiPro
board = MegaPiPro.create()
encoder = board.EncoderMotor(MegaPiPro.PORT1)
position = 0
def on_finished(value):
position = 5000 – position
encoder.move_to(position,100,on_finished)

on_finished(position)

 

Wiring mode

● Connect electronic modules

Connect the photoelectric encoder motor 180 RPM 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 180 RPM.

● Build the structure

The photoelectric encoder motor 180 RPM 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.

mBot2 Replacement Parts:

mBot2 replacement part mBot2 Shield

mBot2 replacement part Cyberpi
mBot2 replacement part Ultrasonic Sensor 2
mBot2 replacement part Slick Tyre
mBot2 replacement part Wheel Hub
mBot2 replacement part Encoder motor cable (L=180mm)
mBot2 replacement part Quad RGB Sensor

Shipping rates Australia wide and New Zealand

Please add the items in cart and proceed to checkout to calculate shipping cost. We have range of shipping options once goods are ready to dispatch. 
1. Regular shipping: Goods will be shipped using Australia post regular shipping service. 
2. Express shipping: Goods will be shipped using Australia post EXPRESS shipping service. 
3. Express split shipping: Local stock from Melbourne will be shipped ASAP (1 business day) using EXPRESS shipment while remaining items from overseas stock when arrived in Melbourne shipped using second EXPRESS shipment. 
4. Pick up from Thomastown, Melbourne is available on appointment between 9 am to 3 pm during business days. 

  

FAQ:

  • How do I estimate shipping for my order?
    • Add products in the shopping cart and head to the checkout page to estimate the shipping.

Dispatch time

Unless expressly agreed otherwise with you, we will not commence delivery of an order until we have received cleared payment of the purchase price in full.

All orders placed before 11 am AEST (Monday to Friday) will ordinarily be processed on the same day.

We will endeavour to ship the Products by the applicable time indicated on the website, but all times are indicative only.  All shipping times are dispatch times only, and actual delivery dates will depend on the shipping method chosen, delivery address and delivery service provider. 

Note- Please make a note during purchase if you require any item urgently. However we cannot guarantee that we will be able to comply with any request

*Go to Australia post delivery time calculation to get various Australia post service in your area please use our shipping postcode Thomastown, 3074 as the "from" address - https://auspost.com.au/parcels-mail/delivery-times.html?ilink=tools-open-deliv-times.

Shipping Destinations

We ship all products throughout mainland Australia, Tasmania and New Zealand - Including Darwin, Melbourne, Sydney, Tasmania, Adelaide, Brisbane, Perth, all metro and regional areas but do not deliver to areas in Australia where the Australia Post delivery network is not available. 

Check Express shipping delivery coverage area at - http://auspost.com.au/parcels-mail/delivery-areas.html

Receipt of deliveries

Deliveries to post office boxes are not permitted where delivery is by courier. If delivery is by courier and nobody is available at the delivery address to accept delivery when delivery is attempted then the courier may either:

  • leave the relevant parcel at the unattended address (the courier will do so if specified in your delivery requirements); or
  • re-attempt delivery at a later time or date, in which case we may charge you an additional re-delivery fee. 

Note that if a delivery is left unattended at the shipping address and is subsequently stolen then the theft is your responsibility, not ours.

Payment & Security

Apple Pay Google Pay Mastercard PayPal Shop Pay Visa

Your payment information is processed securely. We do not store credit card details nor have access to your credit card information.

You may also like