PDA

View Full Version : Button with bad contact



exelanoz
- 19th November 2008, 07:53
Hello,

Awhile back, I made an automated weekly timer for my fish tank, to power on the heaters, co2 etc. In the recent weeks, the buttons have not been responding as they used to.

I used Darrel's routine for external interrupts on RB0 to detect button push in combination with other pins. Unfortunately I couldn't use the timers for it as they were used in other parts of the program. Nonetheless the exisiting setup had been working well for the last 8mths.

The buttons are normall held high via 10k resistors and pulled low on button press. I have included the part with the button connections (See attached JPG)

However, I suspect the buttons are not the best, contacts may have corroded over time, sort of cheap and nasty. They have 1.2 Ohm, sometimes 1.8O hm resistance across the terminals on press. The pic sometimes has difficulty detecting this.

Now the sensible thing to do, is to replace the buttons with higher quality ones, right?

Bit of a dilemma, I machined a nice aluminium case for it, so I would prefer not to change the case.

Any suggestions on how to detect presses on a crappy button would be appreciated.

Cheers

Darrel Taylor
- 19th November 2008, 08:23
What kind of diodes did you use?
Schottky will work best, with a lower forward voltage drop.

You can also lower the value of the pull-ups.
Drop to 1K if you have to.

The INT input on RB0 is a Schmidt trigger, so it has to go above 4V to trigger a "Rising edge", or below 1V to trigger a "Falling edge".
It must see a rising edge, before it will recognize a falling edge.
<br>

mackrackit
- 19th November 2008, 08:32
What about replacing with the same button, but this time seal them some how.

Even a "good" switch will fail under the wrong conditions. Some of my stuff is in dusty and caustic environments. Depends on how the switch is constructed, use a rubber boot and some brand of sealant, (polyurethane, enamel, lacquer) electrical supply house will have it.

exelanoz
- 19th November 2008, 08:36
Many thanks Darrel,

Sorry I cleaned up the schematic to make it look less cluttered and left off the diode names. They are 1N4148, small signal diodes. I can easily change the resistors to 1K, I'll give it a go.
I'll also check the voltage on RB0. Much appreciated
Many thanks

exelanoz
- 19th November 2008, 08:43
What about replacing with the same button, but this time seal them some how.

Even a "good" switch will fail under the wrong conditions. Some of my stuff is in dusty and caustic environments. Depends on how the switch is constructed, use a rubber boot and some brand of sealant, (polyurethane, enamel, lacquer) electrical supply house will have it.
Hi Mackrackit,
The aquarium timer control sits under the aquarium cabinet that is seperated from the pumps etc. It is surprisingly dry, but I'm convinced it is a dodgy switch. I used these http://www.jaycar.com.au/productView.asp?ID=SP0700
I have used these for other projects and honestly not real happy with them.
Cheers