
RotaryEncoderAttiny85
MatthewAHarvey/SmartEncoder
Arduino friendly, serially addressable, ATTINY85 based rotary encoders. Reduce the pin count from 3 * n where n is the number of encoders (pins A, B and button C) to 2 total. Serial in, Serial out.

Arduino friendly, serially addressable, ATTINY85 based rotary encoders. Reduce the pin count from 3 * n where n is the number of encoders (pins A, B and button C) to 2 total. Serial in, Serial out. Use Hardware Serial, AltSoftSerial or Software Serial
RotaryEncoderAttiny85 is an open-source printed circuit board by MatthewAHarvey, from the MatthewAHarvey/SmartEncoder repository on GitHub, published under the GPL-3.0 licence. It is a 2-layer board with 5 parts on 8 nets, routed with 37 tracks and 0 vias.
Its parts include 2 connectors, 1 capacitor, 1 IC and 1 switch. It belongs with the interfaces and adapters boards and the AVR (ATmega, ATtiny) boards of this library.
Arduino friendly, serially addressable, ATTINY85 based rotary encoders. Reduce the pin count from 3 * n where n is the number of encoders (pins A, B and button C) to 2 total. Serial in, Serial out. Use Hardware Serial, AltSoftSerial or Software Serial
Handling lots of encoders at the same time can be a challenge. For example, in our use case, we had 15 encoders attached to one Arduino Mega. After all the connections to other peripherals, we ran out of pins. The encoders had to be polled since there are not enough interrupts. Our solution is to offload the handling of the encoders to dedicated ATTINY85 chips. These then talk asynchronous serial at 125000 baud in a ring with the master arduino. The arduino now only needs 2 pins: 1 serial tx and 1 serial rx. At the moment this is limited to one of the hardware serial ports but tests show it's possible with software serial implementations.
In order for this to work, the ATTINY85s' clock frequencies must be set more accurately than straight from the factory.
Arduino IDE settings for ATTINY85:

Schematic for the FreqCal rotary encoder programme:
Now upload the ATTINY85RotEncCode sketch to each of the ATTINYs.
The example SEHandlerTest programme can be uploaded to the master arduino mega.
| Qty | Value | Footprint | References |
|---|---|---|---|
| 2 | CONN_01X03 | Pin_Headers:Pin_Header_Straight_1x03_Pitch2.54mm | P1, P2 |
| 1 | ATTINY85-P | Housings_SOIC:SO-8_5.3x6.2mm_Pitch1.27mm | IC1 |
| 1 | C | Capacitors_SMD:C_0805_HandSoldering | C1 |
| 1 | Rotary_Encoder_Switch | MatthewLib:RotEnc | SW1 |
5 parts. The full list of its parts is on this page, with links to each part's symbol and footprint where PCBKit's library has them.
From the MatthewAHarvey/SmartEncoder repository on GitHub, at the commit this page was made from: the board is PCBs/RotaryEncoderAttiny85_SOIC/RotaryEncoderAttiny85.kicad_pcb. PCBKit opens the board in the browser, with nothing to install.
Its repository publishes it under the GPL-3.0 licence: you may reuse it on that licence's terms (keep the author's notice, and for a copyleft licence share your changes alike).

MatthewAHarvey/SmartEncoder
Arduino friendly, serially addressable, ATTINY85 based rotary encoders. Reduce the pin count from 3 * n where n is the number of encoders (pins A, B and button C) to 2 total. Serial in, Serial out.

MatthewAHarvey/SmartEncoder
Arduino friendly, serially addressable, ATTINY85 based rotary encoders. Reduce the pin count from 3 * n where n is the number of encoders (pins A, B and button C) to 2 total. Serial in, Serial out.

MatthewAHarvey/SmartEncoder
Arduino friendly, serially addressable, ATTINY85 based rotary encoders. Reduce the pin count from 3 * n where n is the number of encoders (pins A, B and button C) to 2 total. Serial in, Serial out.


joypad-ai/joypad-os
Universal controller firmware for building adapters, dongles, and custom controllers.

OLIMEX/OLINUXINO
OLINUXINO is Open Source / Open Hardware, low cost from EUR 24 Linux Industrial grade Single Board Computer capable to operate -25+85C

jamro/tiny-engineer
A small desktop robot that brings an AI coding assistant to life, physically acting out when it reads files, thinks, writes code, and finishes work.

hackclub/OnBoard
💡 Join 1,000 teenagers and make your first PCB with a $100 grant!



Luos-io/luos_engine
Open-source and real-time orchestrator for cyber-physical-systems, to easily design, test and deploy embedded applications and digital twins.