What is it?
The I2C Encoder is a small board where you can use a classical mechanical encoder with a I2C bus.



Description
The device includes also the possibility to add a bi-color LED and set luminosity trough the I2C bus. It’s possible to connect up to 16 boards in cascade and read all of them with the same I2C bus.

Details
If you need to add some rotary encoder to your project, the I2C Encoder is your the right choice!
Reading a rotary encoder is not easy task, you need at least 2 interrupt pins for each encoder. When you need to add more than one encoder, it becomes more complicated to achieve accurate reading.
I2C Encoder not only solves such problems, it also has more features as following:
Feature:
- I2C bus working up to 400kHz, with possibility to enable the pull-up resistor
- Possibility to connect 16 encoders on the same I2C bus, by setting the addresses with 4 SMD jumpers
- Possibility to add a bi-color LED and setting a 8 bit PWM value
- Open-drain Interrupt output pin, so no need to continuously polling the devices
- Easily chainable thanks to the connectors on the left and right sides
- Any type of rotary encoder fits
- It can read in X1 and X2 modes. This can be useful with the encoder without detent
- 32 bit counter with also MAX and MIN thresholds
- Voltage range is 2.5V to 5V
- Possibility to customize the internal FW
More details
The I2C Encoder is powered by the microcontroller PIC 16F15323. It is a cheap microcontroller but it has 2 very important pheripherals that are essential to this project. It has 4 CLC peripherals and dedicated I2C pheripheral.
The board dimension is just 26,2 x 30,2mm

There are 2.54mm of 5 pin headers on the right and on left sides. So it is possible to solder directly the wires or a connectors. There is the space for the encoder in the middle of the board. On the top of the encoder, there is the possibility to solder a LED: single color LED or a bi-color common anode LED.

On the bottom side of the board, there are the 4 SMD jumpers, A0 to A3 for selecting the address. There is also the SMD jumper P-UP for enable the I2C pull-up resistors, in case that your master I2C doesn’t have one.

The I2C Encoder has 16 registers that user can read and write:
Address | Description |
---|---|
0x00 | General configuration |
0x01 | Status |
0x02 | Counter Value Byte 4 |
0x03 | Counter Value Byte 3 |
0x04 | Counter Value Byte 2 |
0x05 | Counter Value Byte 1 |
0x06 | Counter Max Byte 4 |
0x07 | Counter Max Byte 3 |
0x08 | Counter Max Byte 2 |
0x09 | Counter Max Byte 1 |
0x0A | Counter Min Byte 4 |
0x0B | Counter Min Byte 3 |
0x0C | Counter Min Byte 2 |
0x0D | Counter Min Byte 1 |
0x0E | LED A intensity |
0x0F | LED B intensity |
I already prepared an Arduino library (you can find examples on github).
Check out upgrated version of I2C Encoder with details!
You also can purchase the new version of this product in our Tindie and eBay stores:

