Grove - Mouse Encoder


Grove - Mouse Encoder is a type of mechanical incremental rotary encoder with feedback data of rotary direction and rotary speed[1]. It features standard Grove interface that will save your lots of work in wiring and programming. Also, it is well adapted to heavy duty and a harsh environment. This product can be applied in toys, robots, and consumer input devices.


The rotating speed is designed to be less 1000 rad/min(radian per minute).


  • Versatile for different environment.
  • Well adapted for heavy duty and harsh environment.
  • With detents and a nice feel.
  • Standard Grove interface for easier programming and wiring.
  • Accurate and reliable.


More details about Grove modules please refer to Grove System


It is versatile for different applications in harsh environment such as toys, robotics and consumer input devices.


Item Min. Typical Max.
Operating voltage(V) 3.3 5.5
Operating current(mA) 10 13
Duty(constant speed) 50%
Phase difference(constant speed) π/4
Pulse per circle 12


  1. There is no knob included in product list. Because we think it will make this encoder more versatile for different environments.
  2. You can find dimensions file in PDF format, and you can customize a knob according to the dimensions.


You can just use a suitable hexagonal screwdriver bit if you only are building a prototype for your project.

Hardware Overview

Grove interface
Connect main control board such as Seeeduino board with driver board.

Hexagonal opening
An opening you pass a knob through.

Parts list

Parts name Quantity
Grove - Mouse Encoder(no knob included) 1 PC
Grove - Universal Cable 1 PC

Get started

This section will show you how to build an IDE environment for building applications with Grove - Mouse Encoder.

Refer to Seeeduino V4.2(It is exchangeable with Arduino board) for how to build a complete an IDE for your applications, or read Arduino guide if you use Arduino original board.


  1. Duty circle will be bigger if the speed of rotating is slow.
  2. The pulse width (PW) will not be the same if rotating speed is not constant.
  3. The rotating speed is supposed to be low than 1000 rad/min or it will lead to narrow output PW or cause damage to this encoder.
  4. The output voltage will be uncertain (high or low voltage) for no rotating circumstance since the position of pulse inside this encoder is not certain.

Basic demo

This demo shows how to detect position and detect direction.

Material required

  • Seeeduino V4.2
  • Base shield V2.0
  • USB cable (type A to micro type B)


Connect materials as shown below:


/* Read Quadrature Encoder
* Connect Encoder to Pins encoder0PinA, encoder0PinB, and +5V.
* Sketch by max wolf /
* v. 0.1 - very basic functions - mw 20061220
int val; 
int encoder0PinA = 3;
int encoder0PinB = 4;
int encoder0Pos = 0;
int encoder0PinALast = LOW;
int n = LOW;
void setup() { 
    pinMode (encoder0PinA,INPUT);
    pinMode (encoder0PinB,INPUT);
    Serial.begin (115200);
void loop() { 
    n = digitalRead(encoder0PinA);
    if ((encoder0PinALast == LOW) && (n == HIGH)) {
        if (digitalRead(encoder0PinB) == LOW) {
        } else {
        Serial.println ("/");
    encoder0PinALast = n;
  1. Copy the code and flash it into the controller board.
  2. Open monitor window.
  3. Turn the screwdriver bit to left or left to see what will happen.

The output:


Help us make it better

Thank you for choosing Seeed. A couple of months ago we initiated a project to improve our documentation system. What you are looking at now is the first edition of the new documentation system. Comparing to the old one, here is the progresses that we made:

  • Replaced the old documentation system with a new one that was developed from Mkdocs, a more widely used and cooler tool to develop documentation system.
  • Integrated the documentation system with our official website, now you can go to Bazaar and other section like Forum and Community more conveniently.
  • Reviewed and rewrote documents for hundreds of products for the system’s first edition, and will continue migrate documents from old wiki to the new one.

An easy-to-use instruction is as important as the product itself. We are expecting this new system will improve your experience when using Seeed’s products. However since this is the first edition, there are still many things need to improve, if you have any suggestions or findings, you are most welcome to submit the amended version as our contributor or give us suggestions in the survey below, Please don’t forget to leave your email address so that we can reply.

Happy hacking