Audio protection circuit for microprocessor ADC?

Status
Not open for further replies.
Hi,

I'm developing a project that flashes LEDs to music, that will be used in night clubs and other places. I'm using an LPC2103 ARM microcontroller to digitally sample the input audio via built-in ADC, convert the data from time-domain to frequency-domain via FFT, and then create PWM signals (low/mid/high frequency) and output to three high-current LED channels (red, green, blue). A picture is attached of the unit doing it's thing.

While all this works great in the lab, I need to implement a protection circuit to be 100% sure the analog voltage never goes above 3.3v. My background is digital electronics and embedded C programming, so analog stuff isn't really my strong point.

So far I have a few ideas on how to do this:
  1. Using two 4N35 optoisolators biased for linear output (would guarantee nothing could kill the LPC2103)
  2. Use an operational amplifier with limiting output via resistor network
  3. Use an external audio ADC that's designed to handle higher voltages
  4. Use a TVS diode to catch anything higher than 3.3v.
    [/list=1]

    I would also like to have programmable gain... The only way I know to do this is with an I2C digital potentiometer an opamp.

    Any ideas?
 

Attachments

  • screenshot6.png
    screenshot6.png
    13.1 KB · Views: 215
A diode or two is about the easiest way to limit voltage, with a series resistor to limit the current of course. If you used a 4.7 volt zener, voltage would be limited to about 4.7 volts positive and about -0.7 volts negative. Does the MCU handle negative-going signals, and does it matter?

As for AGC, handling it in software would be best, if the ADC has enough bits. Input levels could easily vary by 30 dB or more depending on whether the volume is set for background music or full-on thumping. There's high-quality VCA (voltage-controlled amplifier) chips available from Analog Devices (who took over SSM who made then originally); SSM2018. I was going to suggest the SSM2120 which has almost everything in one package (and which was used by PAIA and RANE among others in compressor/limiters), but it seems to be discontinued. If you check the app notes for the 2120 it'll show you something about how AGC can be done.

There used to be a page with a design for a beat-trigger that included AGC using commonplace components. The designer said it had been used in some commercial light chasers and was superior to most other designs. The schematic can still be found here: http://www.epanorama.rackhost.net/s...rigger-Bass_Beat_Extractor_Schematic_Only.gif
You'd just need the first opamp stuff to do the AGC thang.
There's some other ideas here:
http://www.epanorama.net/links/lights.html#soundlight
 
Status
Not open for further replies.