New to this! How to switch an Op Amp on using a DC signal

Thread Starter

JW_Bryncelynnog

Joined Mar 25, 2020
12
I am a bit of a novice builder, and have just started using op amps. I building a dog bark deterrent.

I have a microphone, the signal is passed through a 10th order sallen key band pass filter so it is only triggered by 750 - 800Hz ( i signal analysed the bark and it is primarily 780Hz)

This signal is then rectified and charges a capacitor as an integrator which will give a pulse when the dog barks. This is inverted and put into a 555 monostable which then gives a DC output for about 1.5 seconds. All built and tested up to this point - when the dog barks an LED comes on for 1.5 seconds!

I am now in the process of designing a 25kHz sine wave generator (use an op amp as a phase shift ocillator) and a power amplifier to give ultrasound output to a speaker.

My question is .... what is the best way of only switching the oscillator on when I have an output signal from the 555? I want to avoid the power amp being switched on when there is no bark - ie both FETs need to be off so the speaker is not biased either way so as to reduce power consumption.

I have been looking for an OP Amp with an inhibit/enable pin, but cant seem to find one. Also considering a SPST relay triggered by the 555 in between the oscillator and the power amp, but this seems a bit of a bodge!

I have a +/-12V supply with a centre tap. Any suggestions welcome - sketch diagram preferred!

John
 

crutschow

Joined Mar 14, 2008
24,711
sketch diagram preferred!
Us also!
That's why, to get a diagram from us, you need to post your schematic, rather than us wading through a long, convoluted description of the circuit to try to figure out what you have (and likely make errors in the process).
Schematics are the language of electronics.
Or, to paraphrase and old saying, one schematic is worth a thousand words.
 
Last edited:

PaulNewf

Joined Mar 24, 2020
10
No need for a relay unless you need isolation. You may need DPST relay to cut both + and - power.

You can probably use a lighter weight part, but this pair of matched FETs can drive several Amps with sufficient copper pour heatsinking on the PCB: DMC4040SSD.
Appropriately wire one FET to the +, and one to the - power lines.
As said, without your schematic can provide driver circuit ideas.
Also take care with your input/output connections when part of circuit powered down, as other signal voltages could fry pins.
You might want some larger series resistors (10K, 100K) on input signals so any remaining voltage doesn't fry any ESD protection on input pins.

Paul
 

Thread Starter

JW_Bryncelynnog

Joined Mar 25, 2020
12
Us also!
That's why, to get a diagram from us, you need to post your schematic, rather than us wading through a long, convoluted description of the circuit to try to figure out what you have (and likely make errors in the process).
Schematics are the language of electronics.
Or, to paraphrase and old saying, one schematic is worth a thousand words.
Attached is a diagram of my intended output system.

The 555 will give an output pulse of approx 1.5s duration. ( I already have an inverter on the board, so this pulse could go high -->low -->high)

The oscillator produces 25kHz and the power amp will drive the speaker.

The question is, what is the best way to use the pulse to switch on the output for the 1.5 seconds? (pink band on diagram)

I have looked for an op amp with an enable pin but I cannot seem to find one, unless I am searching for the wrong thing!

Also considered using a relay between the oscillator and the power amp. However, the other reply to my question suggests a double pole relay to cut the +/- power rails which would also disable the oscillator and cut power consumption.

Any suggestions welcome!Wave Generator & Amplifier.JPG
 

AnalogKid

Joined Aug 1, 2013
8,377
Two things.

1. What is the purpose of the T1 T2 circuit?

2. You show a linear amplifier suitable for medium-quality audio reproduction. However, your application doesn't need anything close to that. Consider a simple square-wave oscillator. Way fewer parts, no need for the -12 V rail, etc. 1 CMOS gate and one power MOSFET. Gating the oscillator off reduces the current drain to leakage currents in the gate and FET. Other gates in the package can replace the 555 function, eliminating that chip.

ak
 

danadak

Joined Mar 10, 2018
4,057
For future reference this can be done with one chip pretty much.

Example is just of the filter, you can see by right hand window many resources left for
use in other design / circuit needs. Again all on one chip.

1585226346151.png

Filter is digital, I chose cascaded BiQuad, could also be done with FIR topology choice. Digital filter vs analog approach
much better freq accuracy/drift/tolerance than high order cascaded sallen-key and its passive tolerances / drift.

1585228872156.png


IDE (PSOC Creator) and compiler free - https://www.cypress.com/products/psoc-creator-integrated-design-environment-ide

Board for PSOC 5LP family part $ 10 - https://www.cypress.com/documentation/development-kitsboards/cy8ckit-059-psoc-5lp-prototyping-kit-onboard-programmer-and


Tons videos, example projects available in tool and PSOC community.

https://www.element14.com/community/thread/23736/l/100-projects-in-100-days

https://github.com/cypresssemiconductorco/PSoC-4-BLE/tree/master/100_Projects_in_100_Days


Nomenclature, a component in PSOC is an onchip resource. Attached is a component catalog
for the 5LP family. Core is ARM M3, other families have M0, M0+, and M4/M0+ dual core.

There are many components already in tool, and with capability to design custom components
the PSOC community has a library that can be imported as well.

https://www.cypress.com/validated-components


You can do power management of each internal component via its supplied APIs. And of
course APIs for general manipulation of each component.



Regards, Dana.
 

Attachments

Last edited:

PaulNewf

Joined Mar 24, 2020
10
a) Is all the green one signal? Looks like a direct short from +12 to -12 through T3/T4 unless you add something to switch off T4.
b) Strange to have R5/R6 on Amp power, won't that make the OpAmp noisy?
c) Move T3/T4 to before R5/R6 then the FETs will control power to the Amp Circuit. Drive the FETs from 555 output signal, though need circuits to let gates go open circuit and pullups/pulldowns pull FETs to off. You are within 20V of typically FET gate limit so shouldn't need a Voltage divider on Gate input with the pullup/pulldown.
 

Audioguru again

Joined Oct 21, 2019
1,272
I had to use Audacity to hear the 775Hz sound of a small hound dog like a Beagle? Many cars and airplanes also produce 775Hz.
Where did you find a speaker that can produce 25kHz. Few tweeters can go as high as 20kHz. The cheep piezo horns claim 27kHz but they are lying about it.
If you could produce 25kHz then the dog will bark at it.
 

Attachments

AnalogKid

Joined Aug 1, 2013
8,377
a) Is all the green one signal? Looks like a direct short from +12 to -12 through T3/T4 unless you add something to switch off T4.
Nope. This is a linear power amplifier. T3 and T4 receive complimentary drive signals. As the current through one increases, the current through the other decreases.
b) Strange to have R5/R6 on Amp power, won't that make the OpAmp noisy?
Nope. This is an old-time circuit to boost the output current of an opamp circuit called a current-follower. R5 and R6 are current sense resistors. As the opamp output current through R3, R8, and LS1 increases, the voltages across R5 and R6 increase, which increases the current through the FETs. R5 and R6 are sized such that there is no FET current at zero signal level when the only current through R5 and R6 are the opamp operating current. IOW, Iop x R5 < Vth.

ak
 
Last edited:

AnalogKid

Joined Aug 1, 2013
8,377
Here is a first pass at the circuit described in post #6. This assumes a positive-going signal out of the integrator. If the trigger direction out of the integrator is negative-going, delete U1A and use pin 5 as the circuit input.

U1B and C form a 1.5 s monostable, replacing the 555. U1D is a 20 kHz squarewave oscillator. The speaker will ring each half-cycle when Q1 turns off, but I doubt the dog will complain.

When the circuit input is low, the circuit current is the leakage current in each gate (20 nA per gate typ.), plus the leakage currents of C2 through R2, and Q1 through the speaker.

The component values are approximate and flexible; the ones shown are what happen to be in my design libraries and inventory.

ak
Dog-Bark-1-c.gif
 
Last edited:

Thread Starter

JW_Bryncelynnog

Joined Mar 25, 2020
12
a) Is all the green one signal? Looks like a direct short from +12 to -12 through T3/T4 unless you add something to switch off T4.
b) Strange to have R5/R6 on Amp power, won't that make the OpAmp noisy?
c) Move T3/T4 to before R5/R6 then the FETs will control power to the Amp Circuit. Drive the FETs from 555 output signal, though need circuits to let gates go open circuit and pullups/pulldowns pull FETs to off. You are within 20V of typically FET gate limit so shouldn't need a Voltage divider on Gate input with the pullup/pulldown.
a) Just found the diagram on the web i think they are ok - seen several designs with this configuration
not sure about the other bits!
 

Thread Starter

JW_Bryncelynnog

Joined Mar 25, 2020
12
Here is a first pass at the circuit described in post #6. This assumes a positive-going signal out of the integrator. If the trigger direction out of the integrator is negative-going, delete U1A and use pin 5 as the circuit input.

U1B and C form a 1.5 s monostable, replacing the 555. U1D is a 20 kHz squarewave oscillator. The speaker will ring each half-cycle when Q1 turns off, but I doubt the dog will complain.

When the circuit input is low, the circuit current is the leakage current in each gate (20 nA per gate typ.), plus the leakage currents of C2 through R2, and Q1 through the speaker.

The component values are approximate and flexible; the ones shown are what happen to be in my design libraries and inventory.

ak
View attachment 202446
I like this - I have some 4093 so I may build this out of interest. Is the oscillator frquency 1/(2 x PI x R2 x C2) ?
 

AnalogKid

Joined Aug 1, 2013
8,377
Is the oscillator frquency 1/(2 x PI x R2 x C2) ?
No. A better approximation is 1 / (2.2 x R x C), the same equation as for a 555. The actual equation is much more messy because the Schmitt trigger positive-going and negative-going transition levels are closer together than 33% and 67%, and are not tightly controlled. I've only once seen a complete analysis, and I can't find the PDF.

ak
 
Top