Pages: [1]   Go Down
Author Topic: Wiring external reset button  (Read 661 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi All,

I have an Uno and a Duemilanove installed at a site taking inputs from some buttons and sending outputs to AO2223's switching some lights and relays. I was having a few stability issues with the Uno where the odd time, the first input (which has a NO button wired to it) would trigger the event associated with it. The wire running from the button to the Uno is an 8 core alarm cable and it is unavoidably running very close to the mains cable for a lamp for nearly all of its 10 meter run. I think there is some transfer from the mains cable and it is triggering the Uno from time to time. I had a 1K pull down resistor on each input which I assume was way too large, so I changed it to 220R instead.

I also wanted to have a reset button in the room, on another pair on the same cable. I wired it up with a 220R resistor on it also. It functioned properly as a reset button but immediately drove the controller nuts. After each reset, it seemed to selectively trigger events in the program. I didn't have much time to troubleshoot as the customer needed to do some testing. I disconnected it for the time being and everything went back to normal.

Any suggestions as to how I should do this to avoid problems? What is the correct value of resistor for pulling up or down the input pin, or is there some other way to do it?

Logged

Valencia, Spain
Offline Offline
Faraday Member
**
Karma: 144
Posts: 5358
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Any suggestions as to how I should do this to avoid problems? What is the correct value of resistor for pulling up or down the input pin, or is there some other way to do it?


Use shielded wire for the connections, or at the very least a twisted pair.
Logged

No, I don't answer questions sent in private messages (but I do accept thank-you notes...)

Australia
Offline Offline
Sr. Member
****
Karma: 13
Posts: 444
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You need to reverse the logic in electrically noisy situations. You are getting false highs on the input pin, from the power cable.
 So use a pull-up on the input pin so that it is already high. i.e. a spike wont change this condition as it can only make it 'higher'. Then use the switch to pull the input pin to low to trigger the event. Even a huge spike will not produce a false high when the switch is pulling it to ground.  Of course you need to change the logic in your code. A high on the pin means off and a low ,means on.

I use a reset button for some of my boards but rather than run the reset button to the reset pin, insert a NC push button in the power line to the Arduino. This allows me to reset not just the ATmega chip but also all the devices attached to it.
« Last Edit: October 20, 2012, 06:36:07 pm by lemming » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 7
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

That's great advice. I should have known better than to use a non shielded cable but its too late to change that now.

I really like the simple power cut to reset advice. I can implement that really easily (I think)

Thanks Guys.
Logged

Pages: [1]   Go Up
Jump to: