Gentle people, I hope that some of you much more experienced than I will be able to answer a question that has plagued my rookie brain for several months now. I’ve built a circuit that is takes input from an electret mic (any sharp sound), runs through two op amps, one to boost the signal, through a peak detector, then one to compare it to a base line, (2 op amps, one chip) and when a signal from the mic is detected, uses a microprocessor to check a couple of switches and send a signal through a cheap 434 mhz transmitter. The software within the microprocessor simply polls a pin waiting on a pushbutton to cause it to go low. Once the pushbutton has been pressed, a yellow “ready” led is lit, and the micro starts polling a pin looking for a signal from the mic circuit. When the signal is received, the micro checks to see if the pins with slide switches are high or low, and assembles the proper message to be transmitted. Here’s the thing… it works just as expected as long as the xmitter is powered by the shared +5 volt power used in rest of the circuitry. Once the pushbutton is pressed, the ready light comes on, and it waits for voltage to come from the mic circuit. But, if I wire the xmitter directly to the 9 V supply (to get more power and distance) when the pushbutton is pressed, the micro immediately reads a high signal from the mic circuit, and triggers the xmitter. Somehow, just changing the power supplied to the xmitter is causing the Op Amp (comparator) to send the high signal even when no sound has been picked up by the mic to trigger this. I’m not sure I’m adequately explaining myself here, but hopefully someone will be able to follow these two images to understand what I’m trying to say, and what the problem is. I’m guessing that I’ve got some sort of feedback trouble going on, but I just can’t see how…
Measure the +5V rail with the 9V battery connected to the Xmitter.
It should be +5 (same as in second circuit). If not then we proceed further.
I do not see any by-pass caps in your circuit. Are they on every IC (just not shown)?
Waltr – I think you’ve helped me before - thanks for still being here!
Yes, I’m getting 5 v (actually 4.89) no matter how I have the xmitter connected; and I don’t know what a by-pass cap is, so I probably don’t have them… am I endangering my ICs??
BushWhacker:
Waltr – I think you’ve helped me before - thanks for still being here!Yes, I’m getting 5 v (actually 4.89) no matter how I have the xmitter connected; and I don’t know what a by-pass cap is, so I probably don’t have them… am I endangering my ICs??
Ahhh… just lost a long post…
A by-pass or de-coupling cap is a very local charge storage that supplies current when an IC demands it. PIC’s require a 100nF ceramic cap across the Vdd to Vss pins as close to the pin s as possible. All IC’s benefit from by-pass caps so add 100nF caps across the op-amps power to ground pins and it would not hurt to add the the xmitter power/ground.
If this doesn’t fix the problem you’ll need to trouble shoot.
With the xmitter powered from +5V, measure the voltage at every point in the circuit.
Then connect the xmitter to 9V and re-measure. Pay attention to the voltage at the op-amp inputs.
If you have or can borrow an O’scope look at the op-amp inputs/outputs to see if they are oscillating.
report back the results.
good luck.
Thanks again, Waltr – between your last post and this most recent one, I did a bit of googling for by-pass capacitors, and think I’ve got a handle on them. I understood using them as “decoupling” in order to stop DC voltage at the microphone, but thanks to you, I’ve learned a bit about the “by-pass” function to level out the signal as well; I’ll be implementing them tomorrow with the duel-op amp, the micro, as well as the xmitter - just in case. I’ve been probing all of the input/output points with the multimeter for the past few days before posting here, but duh, I never did it in any systematic way - so I’ll go back and do that and record the results to compare both configurations.
Waltr~
You sir, are a gentleman, a scholar, and a genius!!! I methodically checked various points along the working (5v) circuit recorded each value and then powered the xmitter with 9v and repeated the same checks. It jumped out at me that the input values at the first op amp varied dramatically (and of course, so did everything following that point). I added the 104 ceramic cap that you suggested from the op amp’s power pin to it’s ground pin, and presto chango magico… the circuit stablized and worked perfectly!!! Thank you so very much – I’ve only been able to play with this project in fits and spurts, but this problem has vexed me for weeks now. A simple little 89 cent capacitor made all the difference in the world, who knew!!!
Now, all I need to do is test the xmitter/receiver circuits to see if I’ve gotten the increase in distance I was hoping for. I’ll test that tonight (since it’s light based, it’s easier to test at night outdoors)… if I still don’t have the 60 to 70 feet I need (I was getting 45 - 50 feet with 5v), I’ll start experimenting with antennae!
Thanks again for all of you help and patience.
Couldn’t wait for nightfall, had to get out and test it already! Turns out that thanks to your help, I was able to even push the power supply up to 12 v for the xmitter – the circuit remained stable, and I was able to send the signal easily 100 feet with excellent reliability, even with just 6" wires for antennae on both the xmitter and receiver circuits! Couldn’t have done it without you.
Now onto taking this from a concept to an actual, useful unit – time to learn how to make a PCB and mount it in my project boxes.
Ok, great.
What I believe was happening is the the Op-amp was oscillating and producing a DC offset. An O’scope would have shown that easily but when you get an unexplainable voltage with a DVM then suspect an oscillation, especially when you have an op-amp running at high gain.
104 cap = 0.1uF = 100nF. I buy these by the hundred. Cost lots less that way and I put one across every IC in circuits I build.
Please keep us posted on this project.