Opto resistor circuit - diyAudio
Go Back   Home > Forums > Amplifiers > Chip Amps

Chip Amps Amplifiers based on integrated circuits

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
Reply
 
Thread Tools Search this Thread
Old 1st March 2006, 02:54 PM   #1
2sb18 is offline 2sb18  Canada
diyAudio Member
 
Join Date: Jul 2005
Location: Ottawa, Canada
Default Opto resistor circuit

Hi guys,

I'm building a circuit that has an adjustable gain. The gain is controlled by an opto-resistor. I've attached the schematic.

The circuit runs on a single supply, hence the voltage dividers. At the front is a low pass filter, then a buffer, then the inverting gain stage. The opamp I'm using is a OPA2134. +V is around 8.5V.

The circuit works really well on the breadboard, but when I PCB it it oscillates like crazy when the opto-resistor resistances goes into the megaohm range.

If you're looking at the circuit and going "man this guy's green" you're right. I'm pretty new to audio design. If you could provide any suggestions that would help with either the oscillating problem or anything else you might see that's blatantly incorrect, I'd appreciate it.

Thanks,

Steve.
Attached Images
File Type: jpg opto-resistor-schematic.jpg (25.4 KB, 402 views)
  Reply With Quote
Old 1st March 2006, 03:03 PM   #2
diyAudio Member
 
Join Date: Dec 2005
Location: Kuala Lumpur
I measured an opto resistor for this sort of application ages ago and found tht it was grossly non-linear.
A voltage controlled amplifier is a much better solution.
  Reply With Quote
Old 1st March 2006, 03:35 PM   #3
2sb18 is offline 2sb18  Canada
diyAudio Member
 
Join Date: Jul 2005
Location: Ottawa, Canada
Hi David,

Do you mean that the opto resistor doesn't behave like a nice resistor when a constant current is fed into the LED, or do you mean that the output resistance of the LDR is nonlinear with respect to the input current?

I'm assuming you mean the latter. The circuit is for a guitar effect. The gain of the circuit doesn't have to be precise. What's most important is that the gain is varying.

As for the oscillating, I cured it by putting a 100pF cap across the 10k feedback resistor. My remaining problem is that control voltages for the opto resistor are showing up in the audio signal. I'm getting a weird "digital" sound when I change the gain.

Thanks for having a look at my circuit Dave.


Steve.
  Reply With Quote
Old 1st March 2006, 03:41 PM   #4
lineup is offline lineup  Sweden
diyAudio Member
 
lineup's Avatar
 
Join Date: Dec 2005
Location: the north
Default Re: Opto resistor circuit

Quote:
Originally posted by 2sb18
The circuit works really well on the breadboard, but when I PCB it it oscillates like crazy when the opto-resistor resistances goes into the megaohm range.

If you could provide any suggestions that would help with either the oscillating problem or anything else you might see that's blatantly incorrect, I'd appreciate it.
Maybe first OP-amp does not like being 'unloaded'.
1 MOhm is almost no load.

Try to put a 100 kOhm resistor, from first OP-amp output to the ground.
This way, whatever high value the following, LDR, light dependent resistor will have,
the OP-amp will have 100 kOhm load to work into.

You see such a resistor, 100 kOhm, at the very Output to the right.
.............................

Otherwise.
I would avoid using such high values resistors in any audio circuit.
I see you have 4M7 and 2M2.
I should not use any resistor higher than 1 MOhm.
Not even around OPA2134 which is a JFET input Op-amp.


Besides, 1 MOhm is easy to find, while 2.2 4.7 MOHM is not everywhere.

For example input bias to first OP-Amp ( to set input at 50% of power supply)
could be 1MOhm-1MOhm (not 2M2-2M2)
__________________
lineup
  Reply With Quote
Old 1st March 2006, 03:59 PM   #5
pixpop is offline pixpop  United States
diyAudio Member
 
pixpop's Avatar
 
Join Date: Jan 2005
Location: Los Angeles
Send a message via Skype™ to pixpop
A couple of things..

1. Put a resistor to ground between the opto-resistor and the 3.3 uF cap.

2. Put a capacitor in parallel with the lower 100k resistor from the + input of the second op amp, to ground. 10 to 100 uF would be good.

3. Your schematic doesn't show any decoupling caps.

4. Not sure, but you may also need a resistor to ground between the 3.3 uF cap and the - input of the second op amp. Or, just get rid of the 3.3 uF cap.
  Reply With Quote
Old 1st March 2006, 07:38 PM   #6
2sb18 is offline 2sb18  Canada
diyAudio Member
 
Join Date: Jul 2005
Location: Ottawa, Canada
Thanks for your suggestions guys. I tried all of them, my PCB is becoming progressively uglier :-) Unfortunately, none of the ideas did anything to squash this control voltage that's getting through. I have a feeling it's a grounding problem. This is because even when the circuit is bypassed (but has it's ground still connected to system ground) you can hear the control voltages.

The whole circuit has three parts. A PIC microcontroller running at 2MHz connected to an inverting opamp D/A. That's connected to a simple opamp voltage-to-current circuit which controls the opto resistor. The opto resistor draws between 0 and 30mA. Then there's the audio signal circuit that I attached above. Each of the three circuits has it's own LM317 regulator.

Right now I have the power grounds connecting to the signal ground near the LM317 regulator used for the audio circuit. Is there somewhere else where I should be connecting the signal ground?

Thanks,

Steve.
  Reply With Quote
Old 1st March 2006, 11:55 PM   #7
oPossum is offline oPossum  United States
diyAudio Member
 
oPossum's Avatar
 
Join Date: May 2005
Location: Michigan
Using a simple voltage divider to bias the opamps at 1/2 V+ is injecting power supply noise into the audio. You should make a voltage divider with relativly low value resistors (~ 1k to 4.7k), and have a large cap between ground and the divider output (~ 100 to 1000 uF). Use this filtered 1/2 V supply to bias the opamps thru relativly large value resistors (~ 10k to 1M).

A bipolar (+/- 9 to 18 V) supply would be even better.
__________________
Possum - the other white meat
  Reply With Quote
Old 2nd March 2006, 12:30 AM   #8
diyAudio Member
 
Join Date: Dec 2005
Location: Kuala Lumpur
Unfortunately the LDR was very non linear with constant light. I tried both a discrete LDR and one of the opto isoolator package types with a light sensitive jfet. Both were unusable for my purposes.
  Reply With Quote
Old 2nd March 2006, 04:02 AM   #9
2sb18 is offline 2sb18  Canada
diyAudio Member
 
Join Date: Jul 2005
Location: Ottawa, Canada
Thanks for the idea Possum. I implemented your filtered voltage divider and although it cut down on white noise it didn't stop this digital noise I'm hearing.

But I think I'm onto something. I've attached the general layout of my pcb. The resistors under the uP are for the inverting op amp D/A which controls the opto resistor. The trace attaching all the resistors is the virtual ground. The resistors go from 10K to 1.3M. I found that when I disabled the outputs going to the 1.3M and 649k resistors, the digital noise was reduced by quite a lot. So I'm guessing that parasitic capacitance is coupling the D/A to the analog section. Is there something that says that bigger resistors causes bigger stray capacitance?

So I'm trying to think of ways to decouple the digital noise from the analog section. I'll try moving the sections farther apart. Maybe use a ground plane too. But if I use a ground plane, should it be on the digital side, or the analog side, or both?

I feel I'm pretty close to a solution. Thanks again guys for all your help.

Steve.
Attached Images
File Type: jpg basic-opto-layout.jpg (32.5 KB, 219 views)
  Reply With Quote

Reply


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
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
diode/resistor clipping circuit yeto Instruments and Amps 1 14th December 2006 11:05 AM
Dual opto/spdif input circuit ( for DIR170x ) 246tNt Digital Source 0 19th April 2004 10:18 PM
a resistor in input circuit is confusing me john-china Pass Labs 2 15th September 2003 08:27 AM
Opto Couplers blu_line Solid State 5 5th June 2002 12:38 AM


New To Site? Need Help?

All times are GMT. The time now is 03:22 PM.


vBulletin Optimisation provided by vB Optimise (Pro) - vBulletin Mods & Addons Copyright © 2014 DragonByte Technologies Ltd.
Copyright 1999-2014 diyAudio

Content Relevant URLs by vBSEO 3.3.2