What is it?
The I2C Encoder Mini is a small board where you can use a rotary encoder with a I2C bus. This can be useful in case you have few GPIO because with 3 pins you can control up to 127 devices. The I2C Encoder Mini will count and store every movement of the encoder, so no need to check the rotary encoder in real-time, the I2C Encoder Mini will do it!
This is a mini version of my I2C Encoder V2.1.
- I2C bus working up to 400kHz
- Possibility to customize the I2C address with the I2C bus
- It supports the standard rotary encoder
- Open-drain Interrupt output pin, so no need to continuously poll the devices
- 5 pin header 2.54mm pitch on the left and right side, also the JST-XH fit
- 127byte of internal EEPROM
- Voltage range is 3.3V to 5V
- Maximum A/B signal frequency: 100Hz (Tested)
- Dimension of 23x19mm or 0.9×0.74in
- Open source project
This new version is powered by the ATtiny 402. It have a similar feature of the big brother, but it support only the mechanical encoder (no RGB) and there is no GP pins.
The I2C Encoder Mini have also pre-soldered the pull-up resistor on the I2C bus. The can be enabled by soldering a jumper.
Reading the encoder is a very easy task.
There are 4 32bit signed int registers:
- CVAL: Current value of the Encoder. This value changes every time the encoder rotates.
- CMAX: Maximum value that CVAL can reach
- CMIN: Minimum value that CVAL can reach
- ISTEP: How much the CVAL has to increment at each and every encoder step.
- I2C Encoder Mini board fully assembled, programmed and tested
- 15mm rotary encoder soldered
- male female connectors soldered
Comparison between the I2C Encoder V2.1 and I2C Encoder Mini