Connect with us

Sound activated switch advice

Discussion in 'General Electronics Discussion' started by GreyGnome, Nov 1, 2015.

Scroll to continue with content
  1. GreyGnome

    GreyGnome

    10
    0
    Nov 1, 2015
    Hello,
    This is my first post. I am trying to build a voice-activated switch circuit. That is, when you speak into the microphone it will turn on an LED for some time (based on an RC circuit), then automatically shut off. So the LED should not display any fade-out, but that's not a big deal if it does.

    Requirements that I have created for this circuit:
    1. Powered by 6 AA batteries; about 6.2-7 volts single-ended supply.
    2. it must be extremely low power; essentially this is the on-off switch for a couple of watts of LEDs, so any drain during downtime is simply wasted power.
    3. extremely low cost. I could spend a buck on an op-amp and get this done with say a voltage comparator but I would like to use transistors for learning about them and because 7 cents for a2n2222 mic preamp beats 30 cents for an LF353-based one.
    Here is what I have so far. The microphone preamp works, and puts out an A/C waveform that can peak to a couple of volts if I get close to the mic. I'm stuck when I get to the MOSFET. Essentially I was hoping that the Gate Threshold voltage would mean that the device would start conducting very well once the input rose above the threshold by a few tenths of a volt but it seems much more linear than that.

    Is there a way I can utilize these two, or maybe one more transistor, to achieve the effect I want? Or should I just get an op-amp comparator and be done with it?

    Thanks.
    Amp0_schem.png
     
  2. Arouse1973

    Arouse1973 Adam

    5,164
    1,081
    Dec 18, 2013
    You have your LED in the wrong place. Connect your LED to the drain, and connect the source to your common 0 Volts and try that.
    Adam
     
  3. GreyGnome

    GreyGnome

    10
    0
    Nov 1, 2015
    Oh jeez... Thanks Adam. It would be hard to get a threshold voltage when the forward voltage drop across the LED is over 2 volts as it is! Criminy.

    Anyway, I had missed a capacitor on the gate to the MOSFET. I will include that in an uploaded doc as soon as I've made the changes...
     
  4. Arouse1973

    Arouse1973 Adam

    5,164
    1,081
    Dec 18, 2013
    No probs, good luck.
    Adam
     
  5. BobK

    BobK

    7,682
    1,686
    Jan 5, 2010
    You can get higher gain in your mic preamp by using a larger collector resistor. 10K should work, but you will have to redo the biasing as well.

    Bob
     
  6. AnalogKid

    AnalogKid

    2,407
    683
    Jun 10, 2015
    The DC level on the Q1 collector is where you deal with the FET threshold voltage. Your circuit is a source follower, by definition *not* a level sensing switch. As mentioned above, if you want a more snappy response, change the output stage to be a saturated switch.

    It still might come on more slowly than you want, because a FET has a much "softer" knee between non-conducting and conducting states compared to a bipolar. Consider another 2N2222 as the output transistor, emitter grounded, LED in the collector circuit. This means the ON voltage is 0.6 V above GND. If that is too low, put a diode or zener diode in series with the base to change the turn-on potential.

    ak
     
  7. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    GreyGnome,
    Besides learning about BJT's.
    Would you be interested in doing it in an "all digital way" for 20 cents or so?

    BTW,
    what batteries are you using?
     
  8. AnalogKid

    AnalogKid

    2,407
    683
    Jun 10, 2015
    Don't be tempted by the dark side...
     
  9. GreyGnome

    GreyGnome

    10
    0
    Nov 1, 2015
    Thanks BobK
     
  10. GreyGnome

    GreyGnome

    10
    0
    Nov 1, 2015
    Well, as it *is* simply an on-off switch... yes, yes I would be interested in an all-digital way, for 20 cents.

    I have 6 AA batteries powering the circuit... about 6.5-7volts, depending on freshness.
     
  11. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    O.K here it is an "all digital " amp and circuit.

    The circuit is based on a single un-buffered hex inverter IC CD4069.
    It's drive capability is limited.
    If more drive is needed the 74HCU04 can be used,in this case use only 4 AA batterys
    to work it with 4.8V to 4.1V

    The AMP uses the linear high gain property of the inverter when it's input is biased around it's mid VDD point.
    Applying a negative feedback makes the gain controllable.
    The Gain is -R3/R2
    R5-C3 set the one-shot time the led will be on (after speech has stopped).

    D1=1N4148 or the like.
    C1=C2=0.1uF
    R4=100K

    R1=1K (as per your circuit,depends on mic)
    R6=120(as per your circuit,needs changing for 74HCU04)

    R5=100K(as per your circuit)
    C3=1uF(as per your circuit)

    for a gain of 10 use
    R3=1M
    R2=100K
    4069-amp.JPG
     
  12. GreyGnome

    GreyGnome

    10
    0
    Nov 1, 2015
    Here is my latest rendition. I've got the transistor part *mostly* where I want it. By mostly, I mean that it's a little sensitive; I can bark at it from a good distance and it will drive the MOSFET so that there are a lot of 0 pulses. I'm experimenting with a capacitor on the drain to make the output of the transistor stage not so jittery.

    I have two questions:
    1. I was seeing a regular glitch on my scope, right at the collector of Q1, which is then amplified greatly. This drives the MOSFET to 0 momentarily and constantly triggers the 555, keeping the voltage at output high. I suspected the glitch has something to do with the power supply... when I removed the 555 the glitch went away. When I replaced the 555 with a 555C the problem remained. When I bypassed the 555C with a 100 uF capacitor, the problem disappeared. I know the 555 is known for large transient current draws but I thought the 555C mitigates this issue.
    2. The output of the 555 stays high as long as I keep the input of the 555 at 0, Is this expected behavior? I was expecting the one-shot to be a one-shot based on the input transition from high to low.
    3. Are there any other suggestions for this circuit? I am learning, after all, so I am happy to toss this whole enchilada out the window. As a matter of fact, I'll probably discard this circuit in favor of dorke's 4069-based digital circuit. It's simpler.
    ...that's 3 questions, I know. :) Can't keep an experimenter down!
    VO OneShot_schem.png
     
  13. GreyGnome

    GreyGnome

    10
    0
    Nov 1, 2015
    That's awesome, thanks! I'm going to play with it. Much simpler than what I've been working on.

    I am wondering about the 4 inverters in front of R6- is that just to be able to supply a greater output current? I'm not worried about that, as my circuit has to supply a power MOSFET... couple of megohms input impedance... :)
     
  14. dorke

    dorke

    2,342
    665
    Jun 20, 2015
    Yes,just to get more output current.
    For driving a MOSFET one inverter is enough.

    In this circuit the LED is "on" when the output is "0"
    If you need a "1" to drive the MOSFET "on",
    use one of the 3 inverters you "freed" to invert the current output .
     
Ask a Question
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Electronics Point Logo
Continue to site
Quote of the day

-