Here's my completed project: A high-end remote controlled preamplifier.
I wont go into all the audio side, if you are interested in that you can read through this thread here.
Basically I'm using an Arduino Uno to control a DAC8812 R2R MDAC IC (for an attenuator) and a MCP23S08 (for the input selector) via SPI. I'm also using a Adafruit NeoPixel to show volume level and mute by colour. I didn't want to use an LCD display, I think unless implemented in a very high end aluminium enclosure they look tacky.
Inputs include a high resolution encoder (128PPR) and IR.
Features written in Arduino code:
- Changing of volume, input and mute via Apple remote and encoder
- Periodic saving of volume level to EEPROM (limited to every 60 seconds, only if value has changed)
- Fading to previously set volume after power on
- NeoPixel fades from blue to red as volume increases
- NeoPixel flashes when changing inputs
- NeoPixel flashes green when mute is enabled
- Startup and power off mute to avoid pops/thumps
- Different volume increments for encoder and remote
- A debug boolean to print information
I've never coded anything in C before so not sure if my code is optimal but it works great and is very responsive to use. It's attached in a zip file.
preamp.zip (24.8 KB)