Appearance and function match the final product, but is made with different manufacturing methods.

Looks like the final product, but is not functional.

Demonstrates the functionality of the final product, but looks different.

A prototype is a preliminary model of something. Projects that offer physical products need to show backers documentation of a working prototype. This gallery features photos, videos, and other visual documentation that will give backers a sense of what’s been accomplished so far and what’s left to do. Though the development process can vary for each project, these are the stages we typically see:

These photos and videos provide a detailed look at this project’s development.

What is the I2C Encoder ?

The I2C Encoder is a tiny board that you can read a mechanical rotary encoder on the I2C bus.

The I2C Encoder V2 supports various type of rotary encoder with one footprint:

Standard mechanical encoder

Illuminated RGB encoder

Clickable rotary encoder

With and without dent

There are also 3 configurable GPIOs that are organized with the same footprint of RGB LED. You can use them as PWM, I/O or ADC.

Last but not least, it has also 256bytes of EEPROM.

I2C Encoder V2

Reading 5 rotary encoder with an Arduino board

What is the advantages of I2C Encoder?



Do you remember the pain when you made a project that you have to increase or decrease some variables and you used a push button?

Do you remember when you lose at least 6 GPIOs when you tried to add more than 2 rotary encoders. Plus you are out of interrupt pins and you continuously polling the GPIO?

With this little board, you can control as many encoder as you need even with a tiny microcontroller. Your code will be more simple and faster.

How does the I2C Encoder work?

The I2C Encoder works like all the other I2C devices.

It has 5 pins where you have to connect the power supply, it works from 3V up to 5V. It has 7 small jumpers where you can select the I2C addresses.

Like any other I2C devices, it has several registers. With those registers, it is possible to control your board.

There is also an interrupt pin configured as open-drain output. It's used to send an interrupt to the master. The interrupt is active low, and it has multiple sources which are possible to mask.

Internal registers map

The I2C Encoder V2 can be used in two different scenarios:

With a standard rotary encoder. Plus you can add an external RGB LED, or you can use the 3 GPIOs;

Plus you can add an external RGB LED, or you can use the 3 GPIOs; With a illuminated RGB rotary encoder. Plus you can use 2 GPIOs.

I2C Encoder V2 is compatible with any device that has the I2C bus, for example Arduino, Raspberry pi, ESP8266.

Controlling rotary encoder is never be that easy!

Connect 5 rotary encoders, 4 RGB LED and 2 potentiometers to a Wemos D1 mini with only 3 GPIO

More details!

Rotary encoder

Reading the encoder is very easy task. There are 4 registers:

CVAL : Current value of the Encoder.This value changes every time the encoder rotates.



: Current value of the Encoder.This value changes every time the encoder rotates. CMAX : Maximum value that CVAL can reach

: Maximum value that CVAL can reach CMIN : Minimum value that CVAL can reach

: Minimum value that CVAL can reach ISTEP: How much the CVAL has to increment at each and every encoder step.

These 4 registers can be 32bit signed int, or as float numbers IEEE 754.

Now lets take a look an example:

I have an oven that the temperature can be set between 20°C and 250°C. At each encoder step, i want the temperature change of 2°C.

What i have to do is to set:

CMAX = 250

= 250 CMIN = 20

= 20 ISTEP = 2



Once the I2C encoder is configured, i only have to read the CVAL register every time when the master receives an interrupt!



LEDs

The I2C Encoder has also the possibility to control LEDs. The LEDs are controlled by an 8bit PWM.

GPIOsThere are also 3 configurable GPIOs organized with the same footprint of a RGB LED. They are called GP1, GP2 and GP3. But in case you are using the RGB encoder, the configurable GPIOs are only 2: GP1 and GP2.

Possible configuration:

PWM: In this way you can add a RGB LED.

In this way you can add a RGB LED. Analog: The pins are connected to the internal ADC of the PIC. In this way, you can add sensors or potentiometer according to your project needs.



The pins are connected to the internal ADC of the PIC. In this way, you can add sensors or potentiometer according to your project needs. Output : You can use the pins as standard digital output;

: You can use the pins as standard digital output; Input: You can use the pins as standard digital input. Plus you can configure also the interrupt on the edges;



I2C Encoder V2 on the WEB

We have created a repository on GitHub. For now there is only a preliminary version of the datasheet and library for Arduino.

At the end of the campaign, we will provide also the HW and the FW part of the project.

We will also add some examples, more than the previews version.

We published our projects on Hackaday site.

The I2C Encoder V2 appear in the Hachaday home page.

This project is one of the 20 projects that won the Open Hardware Design Challenge Hackaday Prize

Pledges

In every pledge you will get the I2C Encoder V2 board fully assembled and tested, like in the photos!

The encoders and LEDs you will get separately and you need to solder by yourself.

The RGB Encoder si similar to the SparkFun version:

RGB Encoder





While the normal rotary encoder and RGB LED are the following:

Normal rotary encoder and RGB LED

Stretch goal



If we reach 10000€, we will add for FREE transparent knobs to the RGB Encoders to everyone.

The knob that we have chosen is the following:

In the image is black, but they will make in transparent plastic for this occasion

The color in the image of course is wrong. Currently they don't have the transparent version of this knob, but we have agreed with the company to make it transparent for us.