audiophile preamp + i/o selector (LCD, IR, relays)

its general job in life is to do volume control and input/output selection for stereo systems. (this is pre- home theater; back when audio meant 2 channels) :wink:

the volume control is quite extensive. it starts with a motorized pot (single black knob on far right) and an IR receiver (small hole to the left of the knob) and any old IR remote you have on hand. the preamp system uses learning IR on the receive side and the LCD display, during config-time, prompts you to enter each special key on your chosen remote and it stores that code in a jump-table for each major function. after learn is done (and saved in EEPROM) your remote is functional :wink: you then use vol-up and vol-down (and a LOT of other functions, too) to control the thing. when you use vol-up, the volume goes up, the motor pot scoots over to the 'right' position and stops. it does audio preamp style functions like selection 1-of-n for inputs (currently set up for 4 inputs) and m-of-n for outputs (also set to 4). inputs are always radio-button and outputs are configable (at runtime) to be radio-button behavior or toggle-button behavior. (idea is that you may want to switch on/off some amps at the same time, maybe a main amp and a sub) or you may want radio button style (a headphone amp and a speaker amp, only 1 at a time).

there is scalable volume via simple window clipping. you get to set what 'lock to lock' means on your volume pot. ie, you go into a config mode and you define what 'all the way left' means on the pot (maybe -80db) and what 'all the way right' means (often its 0db but it could be other values). maybe its late at night and you want to limit the volume, so you set the max at -10 instead of 0. or maybe you listen thru headphones and that amp is too sensitive, so you set the max value to be -20. then when you turn the knob, a full rotation is from -80 to -20 and you can change that on the fly.

oh, there's also a sleep timer, too (lol). first feature I added, actually.

the volume 'engine' is the other half of this project, really. it consists of an R/2R resistor ladder network and binary values to get 1,2,4,8 (etc) db from each relay. dial in the value you want for db, throw that binary value at the relay controllers (with a twist; we're using latching relays so they have to be pulsed) and you get the volume setting you want.

the i/o selector has 8 ports and you can jumper set the nature of each port, one by one. what happens is you are 'punching down' that port to 1 of 2 busses, an in and an out bus. punch down to the input bus and you are an input port. tell the system which bus you are on and now the arduino will send the radio button code or toggle button code (logical ORing them to share the same 8bit relay controller) to set the in and out ports.