Skip to content
Documentation, source code and examples about the I2C Encoder project
C Makefile C++ Other
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
Arduino Library Added HW v1.2 Nov 22, 2017
Hardware Added HW v1.2 Nov 22, 2017
RPi Demo Added RPi demo code Mar 11, 2018
ChainExample.jpg Added HW v1.2 Nov 22, 2017
ChainExample_Bot.jpg Added HW v1.2 Nov 22, 2017
Dimension.jpg Added imaged Oct 19, 2017
EncoderI2C HW v1.1.pdf Added HW v1.2 Nov 22, 2017
EncoderI2C HW v1.2.pdf
FullAssembled.jpg Added HW v1.2 Nov 22, 2017
I2C Address Setting.PNG Add files via upload Jun 5, 2018
LICENSE Create LICENSE Oct 27, 2017
PCB_BOT.jpg HW realese 1.2 Nov 22, 2017
Pinout.jpg Resize image Oct 20, 2017 Update Jul 8, 2019

I2C Encoder

The I2C encoder V1 and V2 are not compatible. If you have the V2 please go in the correct repository


The I2C Encoder is a small board where you can use a classical mechanical encoder with a I2C bus. This device includes also the possibility to add a bi-color LED and user can set luminosity through the I2C bus. It’s possible to connect up to 16 boards in cascade and read all of them with the same I2C bus. The I2C Encoder have a series of 8 bit registers where it is possible to configure the parameters and three 32 bit of registers. The 32 bit registers are the most important because they store the counter value, the maximum and minimum threshold. Every time when the encoder is moved at least one step, the counter value is increased or decreased according to the rotation direction. When the counter value is outside of the limit set by the threshold, the counter value can be wrapped or can stuck on the threshold valued reached. The I2C Encoder also has an open-drain interrupt pin. It is set to logic low every time when the encoder is rotated or pushed. The status register must be read by the master to check what is changed.

HW version 1.2

  • Resolved the I2C pull-up resistor issue.
  • Removed pull-up and anti bouncing filter on the push-button. The MCU pull-up are used and the anti bouncing is done in FW.

Where you can get this board?

It's possible to buy this board here:

Repository Structure

  • Arduino Library: Ready to use library for the Arduino boards, with some examples.
  • Firmware: Project folder of Microchip MPLAB X containg the code running inside of the PIC16F15323
  • Hardware: Folder containing the gerber file, schematic and BOM. The original project is not available.
  • Datasheet EncoderI2C: Datasheet of the board with the description of the registers and some useful information.

If you want to donate for my work, i would really appreciate it. You can donate here with this link. Thank you!


You can’t perform that action at this time.