
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
ATTINY841Version 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 6 parts on 21 nets, routed with 13 tracks and 0 vias.
It is built around the ATTINY841-SSU and WS2812B. Its parts include 2 capacitors, 1 IC, 1 diode, 1 switch and 1 crystal. 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 | C | Capacitor_SMD:C_0805_2012Metric_Pad1.15x1.40mm_HandSolder | C1, C2 |
| 1 | ATtiny841-SSU | Package_SO:SOIC-14_3.9x8.7mm_P1.27mm | U1 |
| 1 | Crystal | Crystal:Crystal_SMD_3225-4Pin_3.2x2.5mm_HandSoldering | Y1 |
| 1 | Rotary_Encoder_Switch | MatthewFootprints:RotaryEncoder_Alps_EC12E-Switch_Vertical_H20mm | SW1 |
| 1 | WS2812B | LED_SMD:LED_WS2812B_PLCC4_5.0x5.0mm_P3.2mm | D1 |
6 parts, built around the ATTINY841-SSU and WS2812B. 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/ATTINY841Version/ATTINY841Version.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.




Franzininho/Franzininho-Tiny
Repositório para Franzininho Tiny - Uma placa com attiny841 da família Franzinho



BarnabyShearer/pcb_workshop_sensor
Simple lowpower MSP and Temp sensor PCB for a PCB design workshop.
