Introduction: Touch Button to Trigger Anything

Picture of Touch Button to Trigger Anything

Hi! In this Instructable, I will be showing you how to build a button that you can touch or wave to trigger. You will need:

- An Arduino Uno
- A piece of glass
- An enclosure smaller than the glass, but bigger than an Arduino. Can be made from cardboard or 3D printed. I don't have a 3D printer (yet...) so I made mine out of cardboard. The back does not look very nice.
- A 10M mohm resistor
- Wires
- An L.E.D.
- Aluminum Foil
- A printed decal

- Something to trigger

Step 1: Assemble Glass

Picture of Assemble Glass

Take your piece of glass. Print a photo or text to put behind the glass. Fasted it to the glass with tape (try to keep it hidden) or glue it to the glass (you will not be able to change it). Take a piece of aluminum foil. Tape or glue it behind the glass and attach a wire to it. Tape or glue the LED (with extended leads) above the foil so that it can be seen through the the glass. You are now finished with the glass for the button!

Step 2: Assemble Back

Picture of Assemble Back

Now, take your enclosure and put it around the foil on the back of the glass. Fasten it with glue or tape. You now need an insulator so the Arduino does not short. Take a piece of cardboard and cover the foil. I'm sorry if this was too hard to understand, but you are now finished with the enclosure!

Step 3: Assemble Electronics

Picture of Assemble Electronics

You should now have a piece of cardboard with three wires sticking out, as shown in the picture. Place the Arduino there. Make sure the wires can reach the Arduino. Put the resistor between pins 8 and 9, with the gold band facing pin 9. Attach (solder or twist) the wire connected to the foil to the side of the resistor with the gold band. If you are using breadboard cables like me, you should be able to squeeze them both into pin 9. Attach the ground LED leg (shorter) to GND and attach the positive LED leg (longer) to pin 13. With the wires attached, move your Arduino's USB port to the side of the enclosure. Cut a hole to access it (you can also cut a hole to the power connector if you want. I used USB power). After you cut a hole, mount it. I used 3M mounting tape to stick the Arduino in place. I just put a piece on the back, aligned the USB port to the hole, and pressed it down. Before you close up the case, connect anything you would like to trigger to pin 12 and GND. You can also use pin extenders to extend the pins outside the case. This means you will be able to access it at any time and change things connected to it. Once everything is connected, place the backing on the enclosure.

Step 4: Software

The code is attached to this Instructable. If you want the LED to flash five times when activated, choose the Touch_Button_LED_Flash code. If you want the LED to light up only when touched, use the Touch_Button code. Upload the one you like to your Arduino. The code is based off of Paul B's capsense.

Step 5: Sensitivity

Picture of Sensitivity

You can adjust the sensitivity for the button. By default, you just touch the button. You can adjust it so that you have to place your whole hand on the button, or so that you can wave your hand in front of the button. To adjust, open the serial monitor (with the Arduino plugged in). You should see numbers scrolling down in the serial monitor. Try touching it. The values increase by a lot. Now try waving in front of it. The values increase as you move your hand closer. Place your hand how you would like the button to be activated. Record the value shown while you do this. Save that number. Find the highlighted value from the image above in your code. Change to 90 to the value you recorded before. Now, upload the updated code and place your hand in the same spot. The button should be triggered.

Step 6: Improvements/Mods

The touch/wave button can trigger many things. Plug anything low powered into pin 12 and GND to activate it. It can activate Halloween decorations, automatic doors, doorbells, audio recorders, alarm systems, etc. These are just a few ideas. Be creative! You can also remove the glass to make it more sensitive, but it won't feel as nice. This was originally meant to trigger a recorder module to output to a stores PA system or radios for assistance, but I realized it can be used for many other things. If you do not want an LED, you can just leave it out. No need to change up the code. Thanks for reading and a vote in the Epilog VII Contest would be greatly appreciated!

Comments

0xffff (author)2015-10-23

Nice instructable :)

More detailed description can be found directly on Arduino website, using the standard "capacitive sensing library".

http://playground.arduino.cc/Main/CapacitiveSensor

another example with video demo

http://www.pjrc.com/teensy/td_libs_CapacitiveSenso...

TimothyJ999 (author)2015-10-22

Cool idea. You could crank it up a notch by adding an Arduino relay, which would allow you to trigger things that run on house current: lights, TV, fan, sound system, etc. A single-channel relay only costs a couple of bucks (and you can buy multiple-relay modules as well):

http://www.amazon.com/Channel-Relay-Module-Shield-...

joseph07 (author)TimothyJ9992015-10-22

Thanks! That's a great idea! You would just have to change the code to stay on when touched and go off when touched again.

tomatoskins (author)2015-10-20

This is such a cool idea! I love the simplicity of it!

joseph07 (author)tomatoskins2015-10-20

Thank you!

Slk_Stephane (author)2015-10-20

Bruh! This is awesome! I love it I could us for my project to turn on or off by simply touching it or waving at it

joseph07 (author)Slk_Stephane2015-10-20

Thanks!

graydog111 (author)2015-10-20

Shouldn't you have an Arduino in the supplies list? You lost me when I got to the part of wiring resistor to Arduino. I will have to learn about Arduinos. LOL

joseph07 (author)graydog1112015-10-20

Yes! Thanks for pointing that out. I updated my Instructable. I'm really sorry about that :(.

About This Instructable

4,627views

89favorites

License:

More by joseph07:Touchless Toilet Mechanism With ArduinoEasy Mega TreeTouch Button To Trigger Anything
Add instructable to: