Go Down

Topic: 4017 problem driving me nuts! (Read 887 times) previous topic - next topic

bobthebanana

So I've been trying to build a clap detector which switches a relay on and off when a clap is detected. I ended up with this schematic (modified from some website) . As far as I can tell, it amplifies whatever the microphone puts out, triggers the 555 which sends out a pulse to the clock pin of the 4017, making Q1 go high. When another clap is detected Q2 goes high, resetting the 4017 back to 0. If I disconnect Q1 from the resistor and check the state of Q1 with an led to ground then things work as expected, it turns on when I clap once and turns off when I clap again. However, if I attach Q1 back to the resistor - enabling the relay -, then whenever I clap Q1 goes high and within a few milliseconds it goes low again as if it had reset itself! I've messed around with the resistor value and adding a diode across the relay without success. Does anyone know what could be wrong?

majenko

Relay drawing too much current from the power supply?  What are you powering it from?

bobthebanana

That was one of my initial thoughts as I'm only powering it from a 200 mA wall wart. however I disproved this by manually pulling transistors base high and seeing if the Q1 goes low when previously high, which it didn't.

winner10920

Did you try powering the relay directly too? Maybe not enough voltage?

bobthebanana

yep, relay works fine with this power supply.

winner10920

How much does the relay draw? Maybe you could try a 1k resistor or even lower like 480 to more saturate the transistor

bobthebanana

It draws about 50 mA, so ~1mA to the transistors base should saturate it, but just in case I've tried it with as low as 470 ohms with the same results. The problem just seems to be that the 4017 resets itself for some reason.

bobthebanana

Ok, problem(s) solved. It turns out that the relay was clicking in so loudly that it triggered itself! so I moved the microphone to a seperate board and increased the RC time constant of the 555 timer so that it wouldn't trigger so fast and now it works most of the time. It's not sensitive enough though; I need to clap so hard that it hurts my hands. Oh well, I'll fix that later.

winner10920

Lol that's a funny one,
maybe make it need a double clap to turn on?

Go Up