Turn Your Lights on With Clapping?!

73,629

433

84

About: Awesome Electronics Tutorials, Projects and How To´s

Intro: Turn Your Lights on With Clapping?!

Wouldn't it be nice to turn on your lights without getting off the couch? In this project I am going to show you how to build a simple Arduino clap circuit which can turn on and off all kinds of AC appliances. Let's get started!

Step 1: Watch the Video!

The video gives you an overview on how to build this project. But I am going to present you more detailed information in the following steps to make your life easier.

Step 2: Order Your Parts!

Here you can find a list of all the components with example sellers:

Ebay:

1x ATtiny85: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x NE5534: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

2x IC Socket: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x Electret Microphone: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x 20kΩ Potentiometer: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x Knob: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x Resistor Kit (various): http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x 100nF Capacitor: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x 1N4002 Diode: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x BC 637 NPN Transistor: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x FRS1B-S-DC05 Relay: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x Power Supply 230V/5V 500mA: http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x AC Socket (Input): http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

1x AC Socket (Output): http://rover.ebay.com/rover/1/711-53200-19255-0/1?...

Bridge Wire: -

Shielded Wire: -

AC Wire: -

Amazon.com:

1x ATtiny85: http://amzn.to/1hPDkQp

1x NE5534: http://amzn.to/1NzwvOP

2x IC Socket: http://amzn.to/1MCbdj0

1x Electret Microphone: http://amzn.to/1MCbkuU

1x 20kΩ Potentiometer: http://amzn.to/1MCbAKp

1x Knob: http://amzn.to/1hPDCGP

1x Resistor Kit (various): http://amzn.to/1NzwL0l

1x 100nF Capacitor: http://amzn.to/1hPDF5u

1x 1N4002 Diode: http://amzn.to/1MCbLFz

1x BC 637 NPN Transistor: http://amzn.to/1hPDM0S

1x FRS1B-S-DC05 Relay: -

1x Power Supply 230V/5V 500mA: -

1x AC Socket (Input): http://amzn.to/1MCbX7H

1x AC Socket (Output): http://amzn.to/1LmTI4r

Bridge Wire: -

Shielded Wire: -

AC Wire: -

Amazon.de:

1x ATtiny85: http://amzn.to/1E9ubfB

1x NE5534: http://amzn.to/1MHZjp7

2x IC Socket: http://amzn.to/1Nzv6aZ

1x Electret Microphone: http://amzn.to/1E9unLZ

1x 20kΩ Potentiometer: http://amzn.to/1E9up6B

1x Knob: http://amzn.to/1E9uzeb

1x Resistor Kit (various): http://amzn.to/1E9uEhN

1x 100nF Capacitor: http://amzn.to/1PpxLCz

1x 1N4002 Diode: http://amzn.to/1E9uKGd

1x BC 637 NPN Transistor: -

1x FRS1B-S-DC05 Relay: -

1x Power Supply 230V/5V 500mA: -

1x AC Socket (Input): http://amzn.to/1FIc7b5

1x AC Socket (Output): http://amzn.to/1MHZZeh

Bridge Wire: http://amzn.to/1Ppyh3B

Shielded Wire: -

AC Wire: http://amzn.to/1E9vmvw

Amazon.co.uk:

1x ATtiny85: http://amzn.to/1E9xqDR

1x NE5534: http://amzn.to/1PpzAzw

2x IC Socket: http://amzn.to/1NzxoqD

1x Electret Microphone: http://amzn.to/1Nzxpem

1x 20kΩ Potentiometer: http://amzn.to/1Nzxv5E

1x Knob: http://amzn.to/1NzxxKR

1x Resistor Kit (various): http://amzn.to/1NzxNJR

1x 100nF Capacitor: http://amzn.to/1MI20Hp

1x 1N4002 Diode: http://amzn.to/1PpzVSG

1x BC 637 NPN Transistor: http://amzn.to/1MI21Lw

1x FRS1B-S-DC05 Relay: -

1x Power Supply 230V/5V 500mA: -

1x AC Socket (Input): http://amzn.to/1PpAdcc

1x AC Socket (Output): http://amzn.to/1NJmZGM

Bridge Wire: http://amzn.to/1PpAcFf

Shielded Wire: http://amzn.to/1E9ynfm

AC Wire: http://amzn.to/1NJn8Kv

Visit your local hardware store to get your screws, nuts and different connectors.

Step 3: Build the Circuit!

Here you can find the schematic and veroboard layout to create your own clap circuit. I recommend to build it firstly on a breadboard to test the circuit before moving it over to a stripboard.

Step 4: Program the ATtiny85!

Use the given sketch to program your ATtiny85. If you don't know how to do this with an Arduino Uno then have a look at my previous video about the subject:

Step 5: Get the Wiring Done!

With the help of the pictures you should be able to see which wire connects to which connector. As I mentioned in the video 230V can kill you, be careful!

Step 6: Success!

You did it. You just created your own clap circuit!


Feel free to check out my YouTube channel for more awesome projects:

http://www.youtube.com/user/greatscottlab

You can also follow me on Facebook, Twitter and Google+ for news about upcoming projects and behind the scenes information:

https://twitter.com/GreatScottLab

https://www.facebook.com/greatscottlab

4 People Made This Project!

Recommendations

  • Furniture Contest 2018

    Furniture Contest 2018
  • Tiny Home Contest

    Tiny Home Contest
  • Audio Contest 2018

    Audio Contest 2018

84 Discussions

0
None
MichelleV60

Question 12 hours ago on Step 6

Hi!

Nice, I would like to make this :) I am ordering the components now and I have some difficulty finding the right power supply. The ones you used aren't connecting in terms of links so I'm not sure what I am looking for. I expect a 230V to 5V step down buck converter? Does the amperage matter? Thanks!

1
None
tayebm

2 years ago

greeting scott

this is a really cool project as always and i'll try to make it

i'm kinda beginner and i have a silly question about the arduino sketch

"digitalWrite(transistorpin, !digitalRead(transistorpin));"

this line

does it reverse the pin status when we add "!" before the digital read ?
thank you so much for ur work

2 replies
0
None
ahmedsiddMrNXT45.

Reply 2 months ago

Thanks a lot, I had the same question Thanks!

0
None
MarekT11

6 months ago

I made this circuit myself today and, apart form working properly sometimes, i often encounter these 2 problems:

1 - i had to use NE5532 opamp ic and it often delivers constant 4.7V to the ATtiny so the code can never sense low treshold value

2 - it works but very unreliably. Sometimes it works with one clap, it triggers randomly if i just talk near the microphone. Is there any way to improve it?

0
None
inguiT

Question 7 months ago on Step 3

What program are you using to create schematics?

0
None
hanazono23

8 months ago

It possible to replace the bc637 to other transistor i cant buy here in my country

1 reply
0
None
SamS430

1 year ago

I have a question. What is the red squares?

1 reply
0
None
NicolasG125SamS430

Reply 8 months ago

It's where you need to cut the conductive bord

0
None
hanazono23

8 months ago

It possible to replace the relay 5v 6pin to relay 5v 5pin?

0
None
JoscelM

10 months ago

Is or are there any alternatives/ equivalent to the BC 637 transistor? I'm kinda having troubles finding one here in my country. Cool project though!

0
None
Plongkie

1 year ago

Hi, Im having some issues opening the program.. after I download it and open, it says "-

-need to be inside a sketch folder names F3HVWGOIDOCVU9E, creat this folder, move the file and continue?

when I say yes, it says again

-A folder name f3HV etc, already exist. Cant open sketch.

and when I say Okay

-It said, Failed to open sketch "C:/User etc.

and wont open, I need help..

0
None
ShermS1

1 year ago

Also I had built a similar circuit, I was happy to see I built it close to this one, my code is a little different, but same Idea. I happened to be looking at Op Amp information and ran across this. I'm surprised I did not see it earlier, since I do watch GreatScott and I'm glad he shares.. This is great for people starting out.. Also I did not use AC, I used it for solar lighting at 12v. But this is a great way to start, I would just suggest isolating Mains voltage more.. But I love it..

0
None
ShermS1RaghavT7

Reply 1 year ago

I love nano's as much as I love the Attiny85's.. But it will be a waste of pins, but if that is all you have, I would use pins 25 and 26 (they match the Attiny 85's A2 A3 the best). Hope that helps..

0
None
RaghavT7

1 year ago

Hey, I want to use Arduino nano on the place of ATtiny85. Can you please tell me about wiring?

0
None
AMSR1

1 year ago

Hi! :) I made an AMATURE pcb design (diptrace) of Great Scott's project (with relay included).

Please do "DOUBLE CHECK" if I made any unnecessary connections.

Top view.png
0
None
pauly.linus

1 year ago

I have a problem. My electret mic is much smaller and i dont see any other peaks on the oscilloscope than mains received by my oscilloscope cabel as antenna. Any idea how i can get peaks as well?

0
None
shivakumar1995

1 year ago

I am using this to amplify the signal of my CT and convert it to a DC signal. what i realised was that the output is staying at 5 volts even when there is no signal. Why is this happening?