Clap switch with latching relay

Discussion in 'The Projects Forum' started by Copey84, May 13, 2017.

  1. Copey84

    Thread Starter Member

    Jul 27, 2015
    188
    0
    Hello all, I've started another project this time it's a clap switch controling lights.
    The circuit I got of internet is showing a 9v supply, would like to keep it that way and use a battery.
    However I think the relay coil will shorten battery life, so would like to know how could I incorporate a latching relay into the circuit.
    Think a latching relay operates when a momentary pulse is sent to the coil instead of a constant signal, so therefore saving battery. Only problem is my circuit sends a constant signal to the relay when clap activated.
    How could I change the output signal to a pulse instead, or is there a better more efficient way of doing it, given that I want to use a 9v battery and keep current demand low.
    Included schematic below, as always appreciate any replys.
    Sensitive-Clap-Switch.png
     
  2. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    5,655
    1,606
    If you add a differentiator between IC2 and T1, the T1's collector will pulse even though the drive to the base is constant. Series capacitor instead of R6 might be all that is needed, although a proper differentiator would have a resistor from the base to GND. Depending on the relay coil current, consider changing T1 to a 2N7000/7002. Also, a 741 is an older part, and therefore much hungrier that some new CMOS opamps. Search for one that will run on 12 V. Also, R2 and R3 can be scaled up by 500x or 1000x to reduce static current. Every little mA helps. Eliminate R4.

    As for the relay, what is the load you are controlling?

    ak
     
  3. Copey84

    Thread Starter Member

    Jul 27, 2015
    188
    0
    Hi ak thanks for reply.
    To create the differentiator what value cap would I need and what size resistor from base to ground?
    If I go for a 12v CMOS opamp will it run ok at 9v?
    Also why is R4 not needed?
    Still to get relay, will use it to turn on 4 led lights, just over 20watts in total.
     
  4. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    7,127
    1,488
    Consider using a MOSFET instead of a relay to control the lights. That will reduce standby current further.
     
  5. Copey84

    Thread Starter Member

    Jul 27, 2015
    188
    0
    Hi Alec_t, is there a MOSFET that latches instead of needing a constant supply from ic. ?
    If so could a differentiator circuit as suggested by ak be used?
     
  6. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    7,127
    1,488
    The MOSFET gate draws no current from the IC, except for a very brief period at the instant of turn on or off, so a differentiator would not be needed.
     
  7. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    5,655
    1,606
    A single MOSFET cannot switch household AC power to standard lights. What are you going to control with this circuit?

    ak
     
  8. Copey84

    Thread Starter Member

    Jul 27, 2015
    188
    0
    Plan to switch on four led lamps, over 20watts. I'm in uk so 230v
    Think aks right about mosfet and mains voltage.
    Differentiator and relay then!
    What value cap and resistor would I need for differentiator, had a read over diff circuits still not sure though.
     
  9. Alec_t

    AAC Fanatic!

    Sep 17, 2013
    7,127
    1,488
    Yes, a relay will do the job if the lights are AC mains powered.
     
  10. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    5,655
    1,606
    Depends entirely on the relay, its coil power requirements, and how long it takes to activate. There are several different types of latching relays, some with one coil and a magnet, some with two coils, and some with one coil and a ratchet.

    ak
     
  11. Copey84

    Thread Starter Member

    Jul 27, 2015
    188
    0
    Ok, had look online this afternoon to find a relay and CMOS.
    Think the lpc661 CMOS will suit my circuit and I've found a latching relay by Te Connectivity/Axicon
    Product range P2/V23079 series.
    Spec for relay seems ok apart from 5v coil, but don't think 9v will do damage as it's only a short pulse each time to operate relay. Anyone disagree?
    Had a read up on differentiator circuits but still non wiser about size of capacitor and possible resistor needed to create a pulse for relay trigger. Could someone advise?
    Ak you mentioned leaving out resistor R4 but I read in notes that came with circuit diagram it was needed to stop false triggering of circuit, is that the case or can it be left out?
    As always appreciate your replys.
     
  12. Copey84

    Thread Starter Member

    Jul 27, 2015
    188
    0
    Still can't figure out how differentiator circuit is supposed to work.
    Going to replace the bc547 with a 2n7000 as suggested, so I assume it will still need the diff circuit applied.
    Could someone explain what value of capacitor and resistor is needed to create the diff circuit, and if possible a breif explaination of how it creates the pulse to relay.
    Thanks
     
  13. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    5,655
    1,606
    The 2N7000 has a near-infinite input impedance, which makes things much more simple. It turns on at around 2-3 volts, or around 1/2 of one time constant in a 9 V circuit. If you want the relay coil activated for 0.5 s, then 0.5 s = 0.5 x R x C, or R x C = 1. One example of that is a 10 uF capacitor and 100K resistor.

    ak
     
  14. Copey84

    Thread Starter Member

    Jul 27, 2015
    188
    0
    Thanks for that ak.
    Just couple of other things, if I take R4 out will the circuit false trigger? As suggested in notes that came with diagram. And is the CMOS lpc661 a suitable replacement for 741 op amp, or is there a better one for this circuit?
     
  15. Copey84

    Thread Starter Member

    Jul 27, 2015
    188
    0
    Hello thought I'd ask again if anyone knows of a suitable CMOS type op amp to replace the 741.
    Checked on line and found two possible replacements, lcp661and tlc272.
    Would either be suitable or is there a better choice?
    Also from data sheets negative feedback is shown, would I need to include a feedback resistor?
     
  16. AnalogKid

    AAC Fanatic!

    Aug 1, 2013
    5,655
    1,606
    Negative on the negative feedback. You are running the opamp as a comparator. You can eliminate R4. You might add positive feedback to create hysteresis. This will prevent the trailing edge of a clap (room reverberation) from creating a noise burst on the 4017 clock pin. Start with a resistor 10 times the size of R2, from IC1 pin 3 to pin 6.

    I'm not wild about TI opamps, but I like them better than Microchip or Maxim. An alternative is the classic LM358.

    ak
     
    Copey84 likes this.
  17. Copey84

    Thread Starter Member

    Jul 27, 2015
    188
    0
    Thanks ak, I'll add a 220k resistor to create the positive feed back.
    Going to use LM358 as I found two of them in a pack I recently got, so saves buying.

    Also think I'll leave out red led D1, should I just connect in a large value resistor from pin 3 on IC2 to ground.
    Was thinking something in Mohms to reduce current flow as much as possible?
     
  18. Copey84

    Thread Starter Member

    Jul 27, 2015
    188
    0
    Ok, so I've made the changes to circuit that have been suggested, but I'm not getting a consistent on off when clapping. Had to lower R1 to 10k to get circuit to begin responding to clapping, have also adjusted VR1 but no change.
    At moment I'm powering circuit from 5v bench supply instead of 9v batt that I intend to use, don't think it should make any difference but I thought I'd mention it anyway. Have also used 12v, same result
    Basically what else can I do to improve the clapping response? Would replacing R1 with a variable resistor allow finer adjustment of the mic?
    Just to note there's no relay connected still using LEDs to prove on off, when circuit does operate the on led pulses as it's supposed to now that the cap and resistor has been fitted.
    So circuit is working apart from the unpredictable on off, can it be improved?
     
  19. Parkera

    Member

    May 3, 2016
    58
    3
    Consider using a TRIAC driven by IC2, pin 2. When the gate pulse is positive, the lamp will go on. When the gate pulse goes negative AND the line voltage crosses through zero (~50ms), the lamp will go off. Sorry, no specific recommendations on a low gate-current TRIAC.
     
  20. Copey84

    Thread Starter Member

    Jul 27, 2015
    188
    0
    Hi Parkera I've ordered up 2N7000 to switch on the relay so will have to go with it now.
    Any ideas how to adjust circuit so clapper is more consistent?
    Tried changing R1 and VR1 but no use.
     
Loading...