Go to Post I will gladly be pied if that's something you guys want. I know I have people from the Clarkson FIRST dorm floor who will shell out PLENTY of cash for the chance to pie me in the face! - Libby K [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 02-03-2013, 01:38
efoote868 efoote868 is offline
foote stepped in
AKA: E. Foote
FRC #0868
Team Role: Mentor
 
Join Date: Mar 2006
Rookie Year: 2005
Location: Noblesville, IN
Posts: 1,413
efoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond reputeefoote868 has a reputation beyond repute
Re: Sensor "de-noising"

Could you post more information about the sensors you're using, along with how you're using them?

If I were programming a micro controller and I were using a push button switch as an interrupt, I would need to add either a debouncing circuit or a debouncing function in software to ignore unintended repeated taps on the same button as it settles.

Two different ways to accomplish this - in hardware you might add an RC circuit to the button as a low pass filter to remove the bounces, in software you might use a timer to terminate all subsequent interrupts in the range of a millisecond or two.


Not sure what problems you may be having with the proximity sensor.

Another suggestion is to look at your software - what you're interested in the switch might not be if it's pressed or not, rather the state has changed from 0 to 1 or 1 to 0 (rising edge or falling edge).
This is accomplished by storing the old value and XOR'ing it with the new value (state has changed), then AND'ing the result with the old value or the new value.
This won't debounce your circuit, but it will prevent you from running a function in your main loop more than once per button press.
__________________
Be Healthy. Never Stop Learning. Say It Like It Is. Own It.

Like our values? Flexware Innovation is looking for Automation Engineers. Check us out!
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 04:48.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi