8 channel FFT sound to light

Title basically says it all

Postby vvvv » Wed Apr 21, 2010 12:00 am

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.
vvvv
 
Posts: 48
Joined: Thu Jan 02, 2014 10:36 am

Postby vvvv » Wed Apr 21, 2010 12:00 am

since AV line outputs provide a nominal 750 mV o/p a suitable preamp must be connected between the phono line o/p and the ADC input of the DSpic.
Suitable audio amplifiers can be found at Maplin:
N48FL, N64AN,K8066
vvvv
 
Posts: 48
Joined: Thu Jan 02, 2014 10:36 am


Return to Home, Garden, Games, Hobby

Who is online

Users browsing this forum: No registered users and 1 guest