The silver-paper switch

Hi all

In the almost illegible Arduino Projects Book that comes with the Arduino Starter Kit, if you use strong reading glasses, a magnifying glass and a bright light, you should just be able to see at the end of the description of Project 1 (it's on page 30) that one of the suggestions for further experimenting is to make a switch with two pieces of foil and a bit of wire.

Has anybody been able to make a switch like this? I can see a “switch” being made of two pieces of wire – just touch the ends together – but how would one make a switch with wire and silver foil?

Thanks for any suggestions.

I used to make aluminium foil switches to fire a flashgun using a 35mm slide frame with foil taped or glued to each side of the frame and a wire connected by croc-clip to each side.
An air gun pellet shot through the centre would cause a short between two sides and fire the flash.

Hi AWOL

Thanks for your reply. It sounds very ingenious, and I will definitely bear it in mind for future photographic projects when I want to take some of those high-speed flash pictures that you see from time to time.

However, for the moment I am just thinking of a simple switch (nothing as dramatic as an airgun!) on a breadboard and using Arduino's 5V power from a USB.

If you set

pinMode( pin, INPUT_PULLUP )

then the AVR will supply the pin 5V through a 20+K internal resistor. The pin reads HIGH until grounded, all the switch needs to do is ground the low-current pin.

I found that paper clips are good to hold wire and foil together when I made capacitive sensors.

school door mat project from many years ago.

2 pieces of semi ridged thin plastic (cheap plastic binder) glue foil to one side of each piece of plastic. glue very thin insulators about every 2 inchs on the foil side of one sheet then tape a bare wire end to the foil. Tape a bare wire end to the other sheet in roughly the same place then put the sheets so the foil sides face each other. The sheets should now have a tiny gap between them due to the insulators and the taped wire ends should be separated by the tape. place under door mat and connect to door bell. (arduino in this case).
when someone steps on the mat the plastic will deform causing the foil sheets to make contact thus causing the door bell to ring.

How about make a switch by attaching absolutely nothing to the Arduino?
I sometimes use this when I want to give input to a sketch and don't want to hook up a switch or any wires (am I too lazy?). Just touch the Arduino or ATmega pin. It is fun to experiment with, and useful. You can run a wire to a piece of foil or a coin to make a button.
http://playground.arduino.cc/Code/ADCTouch

That's good as long as you don't zap your pin with electrostatic discharge (ESD).

I suppose that is a caveat of capacitive touch. I haven't fried one yet, but that doesn't mean I won't fry one shortly. :slight_smile:

I wouldn't call touching a pin capacitive touch.

Capacitive touch can easilly sense a finger through 6mm of glass.

That makes true capacitive touch ESD safe.
Leo..

Hi GoForSmoke

Thanks for the reply.

"pinMode( pin, INPUT_PULLUP )

then the AVR will supply the pin 5V through a 20+K internal resistor. The pin reads HIGH until grounded, all the switch needs to do is ground the low-current pin."

I'll make a note of it for future use. However, for the moment it's beyond the level of skill assumed after only Proect 1 in the Projects Book.

Hi gpopl

gpop1:
school door mat project from many years ago.

That's it! That's great. Many thanks. Now I've got the idea. I'm going to try to rig up something along these lines

Hi djmlambert

Thanks for your reply

dmjlambert:
How about make a switch by attaching absolutely nothing to the Arduino?
I sometimes use this when I want to give input to a sketch and don't want to hook up a switch or any wires (am I too lazy?). Just touch the Arduino or ATmega pin. It is fun to experiment with, and useful. You can run a wire to a piece of foil or a coin to make a button.
Arduino Playground - HomePage

This sounds interesting, but again perhaps not quite for directly after only Project 1 in the book. I'm going to remember the idea about taking wires to some foil or a coin. Thanks.

Hi CrossRoads

Thanks for this warning. As always, trying to run before one can walk is a risky business, so I'll prefer to remain over-cautious. Thanks.

CrossRoads:
That's good as long as you don't zap your pin with electrostatic discharge (ESD).

ecollen:
Hi GoForSmoke

Thanks for the reply.

"pinMode( pin, INPUT_PULLUP )

then the AVR will supply the pin 5V through a 20+K internal resistor. The pin reads HIGH until grounded, all the switch needs to do is ground the low-current pin."

I'll make a note of it for future use. However, for the moment it's beyond the level of skill assumed after only Proect 1 in the Projects Book.

I promise you are ready for this. It will save you a resistor for every button/switch and no need to figure out where the power will come from.

The big important part is that when you read LOW, the button is pressed. And that is all besides less to wire up. Learn the easier way while you're learning anyway, and you will save time and parts.

I don't use buttons to test my button code. I use a jumper that I ground on the USB port housing. The INPUT_PULLUP pin cannot supply enough current to make trouble there.

It's not like I ask you to debounce buttons yet, but remember that word debounce for later when your code gets fast enough to notice contact bounce.

Wawa:
I wouldn't call touching a pin capacitive touch.

Capacitive touch can easilly sense a finger through 6mm of glass.

That makes true capacitive touch ESD safe.
Leo..

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

It measures capacitance which does change when yours couples with that of the pin.

Instead of sticking a pin in the hole I have found that a capacitor (10 MF) with one lead in the hole and the other out also works, but it works better with a foil for surface area button on the end.

Hi GoForSmoke

Many thanks for your reply again.

GoForSmoke:
I promise you are ready for this. It will save you a resistor for every button/switch and no need to figure out where the power will come from.

Don't forget that by page 30 of the book the word "code" hasn't been mentioned yet. When I hear "code" I think of the morse code (which I am in the process of re/learning), however I understand "code" in this context to refer to some kind of computer instruction - I'm getting there!

I'm taking note of all this though, thanks again.

There is a lot of background to cover for new to all of it people. There's things you know and things you don't and it is best to get filled in before getting ambitious.

How does the Arduino Comic compare to the starter book?

There is a translation project for the comic book.

You also have a host of learning and reference materials through the Arduino site when you're ready.

GoForSmoke:
There is a lot of background to cover for new to all of it people. There's things you know and things you don't and it is best to get filled in before getting ambitious.

How does the Arduino Comic compare to the starter book?

There is a translation project for the comic book.

You also have a host of learning and reference materials through the Arduino site when you're ready.

Many thanks for these links. There's a lot to learn, that's for sure. I'll use all these to make my way slowly.

you can also make a switch using two thumb tacks and a paperclip

Hi Boardburner2

Thanks for this.

Boardburner2:
you can also make a switch using two thumb tacks and a paperclip

Oh, yes. I remember this from years gone by. Couldn't make it simpler than that, I don't think. Many thanks.