Go Back   Home > Forums > >
Home Forums Rules Articles diyAudio Store Blogs Gallery Wiki Register Donations FAQ Calendar Search Today's Posts Mark Forums Read

Digital Source Digital Players and Recorders: CD , SACD , Tape, Memory Card, etc.

Audio protection circuit for microprocessor ADC?
Audio protection circuit for microprocessor ADC?
Please consider donating to help us continue to serve you.

Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving
Thread Tools Search this Thread
Old 25th June 2007, 07:27 AM   #1
Neil_J is offline Neil_J  United States
diyAudio Member
Join Date: Feb 2005
Location: Florida
Default Audio protection circuit for microprocessor ADC?


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:[list=1][*]Using two 4N35 optoisolators biased for linear output (would guarantee nothing could kill the LPC2103)[*]Use an operational amplifier with limiting output via resistor network[*]Use an external audio ADC that's designed to handle higher voltages[*]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?
Attached Images
File Type: png screenshot6.png (13.1 KB, 164 views)
  Reply With Quote
Old 26th June 2007, 08:33 PM   #2
dangus is offline dangus  Canada
diyAudio Member
Join Date: May 2004
Location: Vancouver Island
Audio protection circuit for microprocessor ADC?
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/sc...matic_Only.gif
You'd just need the first opamp stuff to do the AGC thang.
There's some other ideas here:
  Reply With Quote


Audio protection circuit for microprocessor ADC?Hide this!Advertise here!
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
no DC protection circuit ? commstech Class D 20 24th January 2006 04:30 PM
Yet another DC protection circuit bremen nacht Solid State 7 2nd June 2005 04:49 PM
Protection Circuit for ICE Amp Steve M Class D 7 13th April 2005 11:24 PM
Trouble with speaker protection circuit (Randy Slone's circuit) whalefat Solid State 3 13th April 2005 11:13 AM
Protection circuit palesha Solid State 5 28th March 2002 07:13 AM

New To Site? Need Help?

All times are GMT. The time now is 10:07 AM.

Search Engine Optimisation provided by DragonByte SEO (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 15.79%
vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2018 DragonByte Technologies Ltd.
Copyright ©1999-2018 diyAudio