i2cencoder icon indicating copy to clipboard operation
i2cencoder copied to clipboard

Documentation, source code and examples about the I2C Encoder project

I2C Encoder


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

Introduction

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!

donate