I was searching how to drive by something "intelligent" my guitar preamplifier, a project started more than 3 years ago, which is "valves only" (vacuum tubes) on the audio path for some personal preference for the sound when satured.
The first target is to multiplicate the audio channels number, from only one "de facto" at starting, to "a maximum" to have something as it's usual on great brands for musical intruments amplifiers, to switch quickly when playing a music, from one "sound color" to another, from clean to saturated, or clear as cristal to dark, as examples.
The second target is to be able to store all the parameters and levels in memory, to recall them later.
The third target is to add Midi protocol to my preamp to include it into any instruments Midi loop to remotely drive it, from a computer Midi software, looper or sequencer, a midi pedalboard or any external equipment.
And the last but not least target is to have something as universal as possible for "anything audio" other projects, not only fix what I have to immediatly do for my own current electric guitar preamp.
I have choosen to write it in pure ANSI C for easy portability, as reusable libraries, and to be as close as possible to hardware, to run it into a Raspberry Pi 2 under Linux (Raspbian) due to it's great and rich community and so low cost, possibilities, quantity of GPIO and communications buses (I2C and SPI for DIGIPOTS and external digital or analog extensions, UART for Midi RS232C protocol, local mass storage) regarding other embedded microcontrolers solutions.
Actualy, the uncompleted prototype is running correctly with :
- 8 rotaty encoders, with 3 adjustable speeds detection
- 2 x quad I2C DIGIPOTS (Digital Potentiometers) for different preamp audio level and filters adjustements (you can have more)
- a bicolor LED bargraph (you can have more too) used to display internal voltage values for any control and action (grid polarisation as exemple) or used as an audio VU-Meter, and rotary encoders position during adjustment (linear, log, with zero dB at right (full scale) or centered)
- an I2C analog to digital converter used as a voltmeter, (in partnership with the bargraph to display values, and you can have more)
- several digital I/O to detect front pannel buttons or pedals, activate features or change audiopath
- an I2C LCD Display to play with features, parameters, to avoid any HDMI display, etc... (you can have more, again, depending the I2C addresses availability)
As all connected items are stored into ANSI C language structures which describe how they are working and how many they are, the limitation is realy only the number of available GPIO and I2C available adresses on the 2 I2C buses provided by the Raspberry Pi.
Midi is missing for now, but will be the next step, after have embedded the Raspberry Pi into the preamp 19" x 1U rack chassis... It will probably limitated to a strict minimum of features realy expected from such a system : it's an electric guitar preamp, in my case, not a master keyboard or other Midi instrument.
This project can also be a "starter kit" for any other similar for audio projects, as a midi analog mixer, an upgrade for a Home Theater system, driving a multichannels Volume digipot (I must re-use a part for my Yamaha to upgrade it with DSP active filtering and multi-amp for my horns loudspeakers), guitar pedal effect, master Midi pedal keyboard, etc...
If you want to participate or follow this project, it is downloaded and shared as an Open Source under GNU LESSER GENERAL PUBLIC LICENSE at GitHUB web site: https://github.com/F6HQZ/audio-controler-driving-I2C-rotary-encoders-digital-potentiometers-24xLEDs-bargraphs-LCD
Some pictures of my valves guitar preamp prototype are on the Wiki page:
Any comments, ideas, suggestions or participations are welcome.
2015-12-04 : updated the LEDs Bargraph library used as real audio analog VU-Meter/Peak-meter or digipot value/level display during rotary encoder rotation or axis button pushed for 0 dB centered rotary encoder as any BASS/MIDDLE/TREBLE must work.
2015-12-15 : updated LOG and 0dB CENTERed rotary encoders source part, which works corrrectly now for dB negative values.
2015-12-17 : updated LOG and CENTERed bargraph display mode to represent the rotation of a rotary encoder using same method, with a special ZERO dB indication for easy use
2016-01-03 : added the possibility to stack a group of digipots in SERIAL to offer a bigger one "SUPERDIGIPOT" as, for exemple, 2 x 200 kOhms 255 steps grouped in "only one" 400 kOhms 512 steps ! I needed a single 1MOhms digipot but the one found is obsolete. I replace it with a 4x200k serial stack by this way, with a better resolution for LOG use.
2016-01-05 : you can have PARALLEL stacked digipots grouped/synchronised as only one "SUPERDIGIPOT" with only one human command from a single rotary encoder, offering a stereo volume (2 digipots) or a bigger 7.1 volume (8 digipots) as exemple, one digipot for each audio channel in the desired quantity. Good for a main output volume control behind your own prefered Digital to Analog Converters for your Home Theater Preamplifier.
2016-01-16 : digipots and rotary encoders accept now a serial resistance between digipot B pin and analog ground. All "dB" displayed values are corrected depending its value.
2016-01-31 : found the time to integrate the Raspberry Pi 2 and 4 new PSU regulators into the rack. How the mechanics is more difficult than programming !