Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Clap switch headache

Status
Not open for further replies.
Gene:

I have to buy new material for continuing experimenting, so I decided I'll try the circuit you've proposed, but I've got some questions for you about it.
**broken link removed**

I've never worked with a 555 so I do not understand it's use very well. Tell me if this theory about how does this circuit work is correct, please:

There are three parts corresponding to each IC. First getting the signal and amplifying it. This is a job for the op amp. After, with some caps and resistors a square wave is generated with the 555 which may change the output level with each clap. Finally the D flip flop mantains the level until the next clap. The following in the circuit is for exciting the relay.

If all this is true, then I could modify that circuit like this:

I want to use a PIC microcontroller because the status of the relay will be determined by more devices which I wanted to manage through the microcontroller.

Please, tell me if I'm right or not.
 

Attachments

  • modclap.GIF
    modclap.GIF
    5.3 KB · Views: 2,067
well the relay doesnt look well connected.........you uconnected it betwee the E and C of the thransistor. connect the relay between the C and the +5V
 
:?: :? I don't understand that conection you say, Bogdan; or, in another words, I don't understand why my arrangement is wrong. I connected the trt between the colector and ground. This way, when there's a high level on the PIC output the relay doesn't work. If there's a low level, the relay will work then. What I don't know is if my relay will be closed or opened when it has no 5V voltage between pins. Could you tell me where's my fault?

Apart form this. I know there's an inductor (coil?) inside the relay. It rings a bell about protecting it with a diode for high current peaks. Can anyone explain that feature to me and how should I put the diode? Thank you all.
 
i thought that you were going to have the raelay working when you have a H from the PIC. but the way you have it, when the output of the PIC is L then there is no current trough the transistor and the relay will get power trough the 10K resistor? is this how you think? well the 10K resistor is too large so the relay will not work. i suggest using a PNP transistor. here is how....
and about the diode. you need to connect it so that it will conduct in reverse to the way the current is flowing trough the circuit
 

Attachments

  • realayPNP.gif
    realayPNP.gif
    2 KB · Views: 774
Bogdan.......I've yet to come across a bb or forum where there are other criteria that determine the member status.........All seem post count based...but we digress....
 
Now we wre getting somewhere!!! This looks like a much better approach and, oh yes, reconfigure the relay as bogdanfirst recommended. What is your amp output now?
 
:D Hi there!

I can't wait for tomorrow, because today is Sunday and no electronics shop (or "whatever-shop") is opened today an there is no way to get those components to build the pretty-funny-cool clap switch. I can tell I've learned a lot these last three days (yes! I'm only three days old in this fantastic forum!) with your help and, even more important, I've realized how much have I still to learn :wink:

Although I'll use the last schematic I've posted with the 741 op amp, I would like to try something first: I've designed an amplifier, filter and rectifier for the clap signal in order to generate a 5V pulse from the weak microphone clap signal. Now, pleeeease, tell me your opinion about this circuit. What would you add and what would you change. The values will have to be explored by experimenting. So, what do you think about this :?:

Thank you all, once again, for your help and support. I can tell I've never seen such a friendly comunity :!: :D
 

Attachments

  • fullmodamp.jpg
    fullmodamp.jpg
    25.5 KB · Views: 678
--- The FINAL circuit ---

:D You won't believe this:

I've built the circuit shown in the previous page based on a 741 op amp (at almost the top of the page) with the change on the relay and it didn't work!!! :( :evil: I have to recognize I got in that arrangement better results than in any other before. I could measure up to 560mV (in a certain position of the pot) at the output of the amp stage (much more than the previous record of 200mV). But 0.560V wasn't a logical high level, anyway= It did not work. :cry: I was frustrated so I started messing that circuit up, changing things, and testing different combinations until... The Idea arrived :idea: :!: :eek:
I simply used the 741 in another way like is shown below, like a simple comparator.
Can you believe it? It worked at the moment :!:
This arrangement takes the signal from the microphone and compares it with a very small signal (selectable through the pot). The pot is positioned in order to equal the ambience noise, so this noise won't turn on the lamp. When the mic signal gets over the reference (a clap) the amp enters saturation, giving 5V at its output.
Awesome. It was hidden all the time. In front of my eyes while, blinded, I was trying once and again to amplificate 20mV to 5V. What do you think?

:D 8) Simple and killer :twisted: :mrgreen:
 

Attachments

  • compclap.GIF
    compclap.GIF
    4.5 KB · Views: 490
:) I have to thank now all the people in this forum for their help and support. I should give special thanks to Bogdanfirst and Gene, for their patience, knowledge and, even psychological support. Thanks too to Kinjalgp, Chippie and another people who helped me in the developing of the clap switch. You know? It will be a present for my girl Sonia and her birthday is the 20th of May. I thought I wouldn't be able to finish the project in time! I entered this forum with a terrible headache (I had been clapping all day long without success!!!) And, I think, this topic is not any "clap switch headache" anymore. :D

Once again: Thank you all! :wink:

Uxío
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top