Author Topic: Led triggered by sound  (Read 17172 times)

0 Members and 1 Guest are viewing this topic.

Offline Mixerman

  • Newbie
  • *
  • Posts: 24
  • Karma: +2/-0
Re: Led triggered by sound
« Reply #30 on: April 23, 2012, 06:18:29 pm »
If you can draw it Ill try it!

My only experence in electronics is Glen's controler!

I supose the reason we would do this is to make the LED Brighter?

Thanks for your time!

Denny


Offline MadScientist267

  • Impossible Condition Curator
  • Hero Member
  • *****
  • Posts: 1514
  • Karma: +44/-4
  • Rules? What rules?
Re: Led triggered by sound
« Reply #31 on: April 23, 2012, 07:35:07 pm »
Well, since you're not interested in audible output, there's little point in having the 386 in there. Just extra parts that may or may not do much in terms of the LED.

Just as in the last diagrams you posted, the earphone/peizo/whatever acts like a microphone. The first opamp takes this tiny signal and gets it where the second opamp can generate an output that swings rail to rail. In effect you have an amplifier that has so much gain that it isn't really practical to use for reproducing audio, but is perfect for picking up on the tiniest vibration and alerting you by flickering an LED.

As I mentioned before, the flashes may be too quick for your eyes to perceive them as full brightness. To test for this, take the "probe" and rub it on something like a piece of cardboard that will give it some noise at the input. While you're actually dragging across the cardboard, there should be almost solid light coming from the LED.

If it's working properly, but isn't perceived to be bright enough from the pulses from the injector, then you need what's called a "Schmitt trigger" and a couple of other components to make the pulses at the LED "stick around" so that the light is more perceptible.

Steve

EDIT - Don't forget to adjust the gain pot (1M, R3) and "volume" pot (10K, R4) to get the output set right. If you're inside around a bunch of electronic equipment, there's a quick and dirty method for obtaining a "test" signal for something like this - your fingertip. Disconnect the peizo element, and touch the connection going to pin 2 of the opamp with your finger. It should cause the LED to light up full brightness.

Wanted: Schrödinger's cat, dead and alive.

Offline WooferHound

  • Technowhiz
  • Global Moderator
  • Hero Member
  • ******
  • Posts: 897
  • Karma: +40/-3
  • Huntsville Alabama USA
    • My personal webpage
Re: Led triggered by sound
« Reply #32 on: April 23, 2012, 09:16:13 pm »
Using op amps like that is producing AC on the output
you could double the output by putting 2 LEDs parallel but revers one of the LEDs so that light is produced on both halfs if the cycle
or run the output through a bridge rectifier before a single LED would make it brighter too

A piezo is capable of producing 1000 volts when struck sharply, I suggest a 1000 ohm resister between the piezo and the op amp
----- W o o f e r h o u n d -----
My Renewable Energy Projects

Offline Mixerman

  • Newbie
  • *
  • Posts: 24
  • Karma: +2/-0
Re: Led triggered by sound
« Reply #33 on: April 23, 2012, 10:08:11 pm »
I haven't done any thing yet!  This it Wolf?

Offline Mixerman

  • Newbie
  • *
  • Posts: 24
  • Karma: +2/-0
Re: Led triggered by sound
« Reply #34 on: April 23, 2012, 10:11:27 pm »
gun mockup:

Offline MadScientist267

  • Impossible Condition Curator
  • Hero Member
  • *****
  • Posts: 1514
  • Karma: +44/-4
  • Rules? What rules?
Re: Led triggered by sound
« Reply #35 on: April 23, 2012, 10:25:35 pm »
Quote
Using op amps like that is producing AC on the output
you could double the output by putting 2 LEDs parallel but revers one of the LEDs so that light is produced on both halfs if the cycle
or run the output through a bridge rectifier before a single LED would make it brighter too

Actually, since it's a single ended supply, and no coupling cap at the output before the LED, the LED only sees strictly fluctuating DC, so one of the two LED's will never light up because it will always be reverse biased.

The bipolar LED or bridge idea would work with the split supply version earlier in the thread, however, and in fact actually is drawn as such.

As far as a peizo generating 1000V, while this is entirely true, it only really applies to a specially designed type of peizo crystal assembly. A buzzer element would shatter with the force it would take to get that spike.

But, even with that being said, if it were to ever see 1000V from a peizo at the input, a 1K resistor would represent little more than a short, dropping next to nothing from it (the op-amp's input impedance is MUCH higher than 1K, so there would be little if any drop across the resistor).

If you're worried about it, a 1K might be prudent in parallel (ie from pin 2 of the op-amp to ground).

EDIT - On second glance, it a resistor there will probably do more harm than good, as it will have a significant effect on the feedback provided by the gain pot. I'd just leave it out.

Steve
Wanted: Schrödinger's cat, dead and alive.

Offline rossw

  • Senior Moderator
  • Hero Member
  • *******
  • Posts: 879
  • Karma: +35/-0
  • Grumpy-old-Unix-Admin
Re: Led triggered by sound
« Reply #36 on: April 23, 2012, 10:41:49 pm »
EDIT - On second glance, it a resistor there will probably do more harm than good, as it will have a significant effect on the feedback provided by the gain pot. I'd just leave it out.

If you're that concerned about it, either a zener to clamp the input, or two 1N914/1N4148 etc, from opamp input to Vcc and Gnd will clamp any spikes that might happen, to the supply rail.

Reality is as you say - highly unlikely you will get even a few volts, much less a thousand.

Offline oztules

  • Forum Advisors
  • Hero Member
  • ****
  • Posts: 1177
  • Karma: +105/-8
  • Village idiot
Re: Led triggered by sound
« Reply #37 on: April 24, 2012, 05:49:11 am »
It strikes me that this is just amplitude modulating a led. This means noise will still light the led, and there is no real "squelch" control.

What if you were to just use the first op amp as a normal amp, and drove a second one with the inverted input tied to a reference voltage.

Feed the signal from the output of the first amp to the non-inverting input of the second op amp, and you will have a level filter.

It will produce square wave pulses, but only if they are above the "noise" threshold of the reference voltage (variable if need be, or just control the output of the first amp)

This allows you to screen all the noise out  below the pulses you are looking for, and stop the led lighting on dull for low level noise, bright for the signal you want....... it will be bright for your signal (as that is a steady amplitude once you find it), and won't respond to any signal less than that reference and gain composite......

The wanted signal will then be obvious, as it's pulse will be full rail, and the noise will be zero....... the pulse will be all ....or .....nothing.... no in between.


Just another idea to consider before the build.



..................oztules

ok I'll shut up now... more complications you didn't want to hear perhaps, but I think it's worth some thought.
Flinders Island...... Australia

Offline MadScientist267

  • Impossible Condition Curator
  • Hero Member
  • *****
  • Posts: 1514
  • Karma: +44/-4
  • Rules? What rules?
Re: Led triggered by sound
« Reply #38 on: April 24, 2012, 09:40:36 am »
You make a very good point Oz, and yes, there are several improvements I can think of on the design as well.

However in the interest of simplicity, I haven't added anything mainly because I believe the basic design is being worked out on an electronics experiment kit which has limited part count. While it wouldn't take much more than what appears to be available to make the threshold trigger, I held off making much mention since there are so many unknowns.

Steve
Wanted: Schrödinger's cat, dead and alive.

Offline Mixerman

  • Newbie
  • *
  • Posts: 24
  • Karma: +2/-0
Re: Led triggered by sound
« Reply #39 on: April 24, 2012, 11:10:42 am »
Yes Steve, The circuit is on a " Radio Shack Learning Lab"  The Fire ant mo niter is one the projects included in the kit, in the project book! It is also on line for free!

The assembled project responds (blinks) when the injector makes noise, I could see it and hear it! (speaker)

It sorta adjusts by turning the gain control, I can make the LED dim with volume up then when something loud is detected, it comes on, it seems the louder the brighter. I don't think the light can get any brighter then what I'm seeing now! Could be wrong.
One thing I haven't done yet is to connect the circuit and monitor the injector, then unplug it to see if the light is still on!

Here are 3 pictures of sound wave of injector firing:

http://ecomodder.com/forum/member-superturnier-albums-injector-opening-delay-picture2854-injector-voltage-signal-injector-sound-signal-resolution-between.html

If I'm reading OZ right he's saying the LED will be maxed out every detection and only the high end of the sound would be amplified.

The gun probe will be easy to use on some injectors, but on others not so easy!, Car's will be hot and running, at the firewall side you will be laying inside the engine compartment, using mirror's and light to find them, probes will have to be bent to get to some of them. This is a cheap way to check them, of course you could take it to a shop and let them do it, at the tune of about 90 to 120 dollars a hour!

I thank all you for the input! I'm all ears!

Offline MadScientist267

  • Impossible Condition Curator
  • Hero Member
  • *****
  • Posts: 1514
  • Karma: +44/-4
  • Rules? What rules?
Re: Led triggered by sound
« Reply #40 on: April 24, 2012, 11:47:02 am »
Essentially what he's saying is that the circuit has no noise immunity. Every vibration will be amplified equally, which can make distinguishing the injector noise from background noise (other engine sounds, etc) difficult if not impossible.

You've got a pretty good system for pinpointing as close to the source you want to monitor as possible, as far as the rod -> peizo element goes, which is important of course to getting the signal you're actually after.

What he's referring to exploits that further, by making the circuit ignore input that is below a certain threshold, leaving the LED dark most of the time. If the loudest sound available at the input is the injector firing, then this portion of the waveform will be higher than that coming from unwanted background noise. The result is that the LED only fires when this threshold is exceeded.

Depending on what you've got for parts, you may be able to do something like this with little more than what you currently have wired up. There are a couple of ways to go about it...

One, as Oz mentioned, you can set a reference voltage that must be exceeded by the first opamp in order to trigger the second, which fires the LED.

Another is to put some negative bias on the input to the second opamp, which effectively does the same thing, just with a slightly different mechanism. It holds the second opamp in cutoff until the first one puts out a signal high enough to overcome the bias, firing the LED. This approach is a bit easier however if you're using a split supply instead.

Easiest in this case will probably be Oz's approach.

They both will require slightly different configurations in terms of the feedback loop (which is currently set for a gain of 30). You'll likely need to end up with a much higher gain than that in the second opamp in order to make it work effectively.

Steve
Wanted: Schrödinger's cat, dead and alive.

Offline oztules

  • Forum Advisors
  • Hero Member
  • ****
  • Posts: 1177
  • Karma: +105/-8
  • Village idiot
Re: Led triggered by sound
« Reply #41 on: April 24, 2012, 05:08:20 pm »
It does a little more than just screening the noise as well.

It means any part of the spike passing the threshold will drive the led to full brilliance for the duration of the spike being above the threshold.... regardless of shape.

In normal amplifier mode (original) the led will light in proportion to the amplitude of the spike... so as it passes the volume setting you have set, it will gradually light up until the max amplitude of the spike has been achieved and then decay accordingly.

With the referenced system, any and all parts of the spike crossing the threshold will drive the led full on for the entire duration of the spike being over the threshold.... so the blink will be full brilliance for the entire width of the spike, more energy (brighter to us) than a spike can drive it with it's own native waveform..... it will be much more lucid in it's visual result..........



..............oztules
Flinders Island...... Australia

Offline Mixerman

  • Newbie
  • *
  • Posts: 24
  • Karma: +2/-0
Re: Led triggered by sound
« Reply #42 on: April 24, 2012, 07:08:32 pm »
Made another video this time on the bench top, no Sunshine in here! The duration of the blink is a bit fast, that's as slow that I can get the drill to turn, I estimate that it need to turn 10 or 12 times in 1 minute , 200 hits! Should be about 800 rpm's. It's turning about twice that!

Maybe its just a matter of more LED's about 90 degree's apart for sure viewing while in use. Has anyone ever used reflectors?

The batterys in the learning lab were at 8.8v I put some freash ones in now Its at 9.6v! I seen no difference in the brightness of the LED's though!

http://www.flickr.com/photos/18130316@N07/6965039142/in/photostream

Thanks for the input!!!

Offline ghurd

  • Global Moderator
  • Sr. Member
  • ******
  • Posts: 442
  • Karma: +22/-0
    • GHurd Solar
Re: Led triggered by sound
« Reply #43 on: April 24, 2012, 09:22:57 pm »
I knew this was gonna get complicated.
G-

Offline Mixerman

  • Newbie
  • *
  • Posts: 24
  • Karma: +2/-0
Re: Led triggered by sound
« Reply #44 on: April 25, 2012, 05:41:07 pm »
YA! Its over my head! I got this mouse trap working! I just don't have the know how, to improve it.!

I think maybe adding some leds might help seeing it operate from any position the gun happens to be in!

I dig the head out of one of these flashlights thay giveaway at harbor freight, it has 9 white leds in it, could this somehow become part of this circuit without alot of altering? Use's 3 AAA bats I see no resistor's being used! It's about the size of a quarter!

What do you guys think?