Home › ELEKTOR FORUMS › Home, Garden & Hobby › 8 channel FFT sound to light

ELEKTOR FORUMS

Please log in to post a reply or subscribe / unsubscribe to topics

Topic: 8 channel FFT sound to light

Author Post

vvvv

75 posts

Frequent Visitor
Frequent Visitor

Read post 21-04-2010 10:31

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.

Post edited by vvvv on 21-04-2010 10:33

Post edited by vvvv on 21-04-2010 10:35

Post edited by vvvv on 21-04-2010 10:43

vvvv

75 posts

Frequent Visitor
Frequent Visitor

Read post 21-04-2010 20:55

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

Please log in to post a reply or subscribe / unsubscribe to topics

Follow Elektor

      

Act now!

Package Deals

Elektor Bundles

Check our Package Deals and save money! Discounts up to 19% now available!

Price Slashed

Elektor OSPV

This Open Source People Vehicle is perfect for factory halls, warehouses, hospitals, colleges, schools etc.