Basic 'clap ON' switch.

Thread Starter

PFFT

Joined Dec 2, 2022
12
Hello,

I came across this basic clap-switch circuit demo on YouTube:


In theory, it does pretty much what I need. The idea is that when I turn on the over-sink bathroom lights, a 12V LED driver powers the clap circuit. When I clap, instead of switching a bulb, it would trigger a relay that feeds a 5V supply to a DAB radio.

I don’t need an “off” function, as the whole setup would lose power when I leave the bathroom and switch the lights off.

It’s obviously a bit frivolous, but it does solve the problem of the radio coming on in the middle of the night when I turn the lights on.

My question is: am I kidding myself trying to build this from the YouTube example?

I’ve already noticed that the SCR (Y1112) doesn’t seem especially easy to source, and I suspect the sensitivity control may not be particularly effective either.

I can machine simple PCBs myself and I’m happy to buy decent components and experiment a bit, but I’m very much a beginner with electronics, which is why this example appealed to me.

I know there are plenty of ready-made clap-switch modules available cheaply, but most seem to overcomplicate things with extra functions I don’t need.

Any advice would be appreciated.

Wal.
 

AnalogKid

Joined Aug 1, 2013
12,142
Yes, this circuit will do what it says. IOW, this isn't an innergoogle junk circuit or scam circuit.

Once you know (and tell us) the relay vendor / part number / coil voltage / coil current / coil power (datasheets vary), we can suggest a more common SCR. There are many to choose from.

What is the 12 V power source? Be aware that many LED power supplies have a constant current output, not constant voltage as is way more common and what this circuit expects.

Is an non-touch (acoustic or other) trigger really necessary? IOW, why not trigger the SCR with the pushbutton switch and eliminate the microphone?

ak
 
Main problem is unreliable clap detection stage. Microphone signal is extremely weak and noisy. LED driver noise worsens triggering stability. Echo and bathroom acoustics add confusion. Simple SCR circuits lack proper filtering.
Sensitivity controls are usually poorly effective. False triggers are the main failure mode. Here is another tutorial that you can check for a better build.
You can also add a voltage follower. It is not mandatory but it can make the circuit better. It isolates microphone from loading effects. It can stabilize impedance between stages. It helps ADC or comparator inputs slightly. Here is a good write-up on what is voltage follower. You can check it out.
 

crutschow

Joined Mar 14, 2008
38,522
Filtering of higher frequency sound components would help minimize false triggering.
A clap duration is around 5ms, so the filter should be designed to suppress any sounds above that duration.
 

panic mode

Joined Oct 10, 2011
4,995
you can use different SCR, just make sure it is sensitive. that means low gate current (2mA for Y1112 ). other things can be used as trigger too, like PIR or RCWL module. then you don't even need to clap.
lightbulb like shown in video easily draws 0.5-1A or more. be mindful of that because button carries full load current and many push buttons have very low rating (50-100mA).
 

AnalogKid

Joined Aug 1, 2013
12,142
Here is another tutorial that you can check for a better build.
Nope.


I’m very much a beginner with electronics, .
I scrolled through that pile of mostly high-level borscht from top-to-bottom-to-top, and guess what? Despite the title of the page having the word "Circuit" in it, *** there is no circuit***.

Paraphrasing Rear Admiral Joshua Painter,

"Engineers don't take a dump, son, without a schematic."


s.c.h.e.m.a.t.i.c.

ak
 

Thread Starter

PFFT

Joined Dec 2, 2022
12
Heh - yeah, that 'simple' example was a bit impenetrable to my feeble mind...

Ok, so my low voltage DC power sources (a 12VDC and a 5VDC) are CV - basically this sort of thing:

https://ledsone.co.uk/products/waterproof-dc12v-ip67-20w-led-driver-power-supply-transformer

The relay, perhaps this?

https://uk.rs-online.com/web/p/signal-conditioners/0325332

It'll be switching 5VDC 1A to go to the DAB radio - the relay in the pic has 0.5A printed on it, so I'm guessing it's just illustrative - the specs state:

RS PRO Signal Relay, 12V dc, 2 Poles, 2A, 14.3 x 9.3 x 5mm

I could have a push button to turn it on/off, but that'll mean dangling a wire down from the ledge where the radio will be positioned - it has to be up there as there's nowhere else in the bathroom for it to take power from, just the over-sink lights. A clap just seemed like a nice easy way to do it. It's just me in the house, the environment is noise free and a false trigger would only occur when I'm in the bathroom with the lights on so no big deal.

The most straightforward way would be to have a 2 gang switch (one for lights and the other for the radio) but the cable is behind plaster and tiles and I'm fairly certain it's not in any sort of conduit, so feeding through an extra cable isn't going to be straightforward - or impossible without removing tiles and plaster - and that's a hard no.

So yeah, I guess at this stage - will that relay do the job and what can I use instead of the Y1112?

Wal.
 

AnalogKid

Joined Aug 1, 2013
12,142
1. Where are you located? Europe with 220V mains? The relay you linked is not rated fro this.

2. Do you want to switch the low voltage DC to the radio, or the mains that feeds the power supplies? That relay was clearly intended for DC use, but should handle a 20 W supply's mains.

There are others on this forum with way more experience with what parts are commonly available in GB / Europe. Let's see what they say.

ak
 
Last edited:

Thread Starter

PFFT

Joined Dec 2, 2022
12
1. Where are you located?

2. Do you want to switch the low voltage DC to the radio, or the mains that feeds the power supplies?

ak
UK.

Yeah, everything I'll be doing will be on the low voltage side - just taking 240VAC from the switched lighting circuit to feed the two DC supplies.
 

panic mode

Joined Oct 10, 2011
4,995
that cannot work... both Q1 and Q2 are lacking biasing circuit...
EDIT.. .same goes for LM393... also C1 and C6 polarity is wrong.
1779366002084.png
 
Last edited:

AnalogKid

Joined Aug 1, 2013
12,142
Had a convo with CGPT and we're at this stage...
Wow, that's a lot of parts. And as noted, incomplete.

But if you can tolerate a higher parts count, it does raise an option. The only reason to use an SCR to drive the relay is that the right component eliminates a lot of other circuitry. But there are other circuit options.

For example, you can do the mic amplifier, level detector, latch, and relay driver all in 2-3 transistors.

ak
 
Last edited:

Thread Starter

PFFT

Joined Dec 2, 2022
12
OK, this has now changed a bit...

Instead of a clap I'm going to use a motion sensor located above the basin (the radio is out of reach, but the sensor can be viably positioned).

There are two ways I can do this, with a DPDT relay (as seen in attached pic)

DPDT-CIRCUIT.jpg
but I'm more likely to use this:

https://thetechstation.co.uk/produc...tching-bistable-interlock-relay-module-switch

As then I'll be able to turn off the radio with a second wave of my hand. Could be useful.
 
Top