The plug rage continues. Sixteen inputs, analog and digital in any mix:
I haven’t routed the connections yet so the layout and dimensions might still need to change.
This plug is an experiment. It does not use I2C, so it will need a dedicated port. The trick is that an on-board ATTiny45 is used to decode a pulse train of four pin selection bits from just the DIO pin.
Here’s the schematic:
The 16 inputs are multiplexed into the AIO pin. By defining this as an analog input, you can have up to 16 analog pins, using the 10-bit ADC built into the ATmega. But defining AIO as a digital input, you can use it as a digital pin. Even works with pull-up, but the pull-up will only be active as long as the same input remains selected. Unselected inputs return to a high-impedance state.
Needs some more work though, including some firmware for the ATtiny.