40 years ago I built a 3 channel sound to light unit using 3 transformers (one for input impedance matching), RC filters and 3 thyristors.
Today,I designed an 8 channel unit based on the DSP project found in ELEKTOR book 'PIC cookbook for virtual Instrumentation'.This uses a DPSpic with the addition of 8 opto isolated triacs.Slightly better design than the analogue version since very accurate digital 'bandpass' filters for each channel can be implemented using FFT technology under software control.
However the original DSP project uses a sampling rate of 8000 samples/second and therefore some mods are required in file 'DSP.C' file to increase the sampling rate to 16000 samples/second in order to accommodate an audio frequency band of 8Khz (i.e. Nyquist sampling theorum of sampling at twice the highest frequency).
DSP.C software mods:
to increase ADC conversion rate to 16000 samples/sec
ADCON3bits.SAMC = 31;
ADCON3bits.ADCS = 20 ; //16000/sec
In procedure 'FFT':
peakFrequency =62.5 * peakFrequencyBin;
/* sampling frequency 16000 /no. samples =62.5 */
In the main program :
FFT();
PORTG =0; //ALL LAMPS OFF
number =peakFrequency2 ;
if (number >= 100 && number <=150)
bass frequency range (Hz)
{
PORTG =1; //channel 1 light on
}
PortG outputs to 8 opto triacs
etc
It can be seen that each channel light will respond will respond
to the frequency bands as above and can be easily modified.
