CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

4x4 keypad and noise

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
championx



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

4x4 keypad and noise
PostPosted: Fri Aug 14, 2015 5:31 am     Reply with quote

Hi all! I'm testing a circuit that have a 4x4 matrix keyboard. The thing is when I put my hand near the traces, it detects some keypress, it seems that is a hardware design problem.. (no caps and no pullup/pulldown).

Is there something that i can do to reduce this problem? adding capacitors, or resistors, or something on the firmware that i can add to eliminate this?

thanks.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Fri Aug 14, 2015 6:52 am     Reply with quote

post a schematic of you circuit for keypad and PIC
championx



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

PostPosted: Fri Aug 14, 2015 8:08 am     Reply with quote

This is basically the keyboard:

https://electrosome.com/wp-content/uploads/2012/06/4x4-Matrix-Keypad.png

Where the row and col pins are directly connected to the pic pins.

Today I put some pulldown resistors to the input pins (ROWS) and it really got better. But, what do you think?

thanks.
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Fri Aug 14, 2015 8:33 am     Reply with quote

depending on your scan rate and dwell time -you can always reduce
stray signal by using input termination resistors.

if such sensitivity is extreme - i would use 5.1k or even 2.2k resistors for that task. capacitors are less good of an idea.
championx



Joined: 28 Feb 2006
Posts: 151

View user's profile Send private message

PostPosted: Fri Aug 14, 2015 8:37 am     Reply with quote

Thanks for your help asmboy, sorry, but what do you mean with "termination resistor" ?
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Fri Aug 14, 2015 9:49 am     Reply with quote

Hi,

Have you spent any time searching the forum archives? Here is a recent thread that will probably help to resolve your issue: http://www.ccsinfo.com/forum/viewtopic.php?t=54037&highlight=keypad

BTW, it's not surprising that you have noise. Your row and column inputs are 'floating', so when you scan them it's very likely that they may pick up some noise!

Termination resistors??? I don't get that solution!
_________________
John

If it's worth doing, it's worth doing in real hardware!
asmboy



Joined: 20 Nov 2007
Posts: 2128
Location: albany ny

View user's profile Send private message AIM Address

PostPosted: Fri Aug 14, 2015 11:03 am     Reply with quote

Quote:
Termination resistors

pull the PIC INPUT port ( rows ) LOW
unless pulled UP when the scan driven output(column) PIN
goes HIGH .
the "Termination resistors" maintain a sure LOW state for the ROW detect lines when the ROW inputs is read while ONE COLUMN at a time is pulled high during the scan.

w/o these resistors - the lines float and can appear HIGH due to environmental coupling etc.
ezflyr



Joined: 25 Oct 2010
Posts: 1019
Location: Tewksbury, MA

View user's profile Send private message

PostPosted: Fri Aug 14, 2015 2:40 pm     Reply with quote

Hi,

Sorry, my comment was poorly worded. I wasn't questioning that particular solution - I understand it - but, rather I was unfamiliar with that terminology as applied in this particular application!
_________________
John

If it's worth doing, it's worth doing in real hardware!
temtronic



Joined: 01 Jul 2010
Posts: 9134
Location: Greensville,Ontario

View user's profile Send private message

PostPosted: Wed Oct 21, 2015 1:35 pm     Reply with quote

You should never, ever be able to 'false trigger' a keypad. It's a sure sign of bad things to come ! EMI in any form an kill a PIC so you must follow proper techniques in interfacing a keypad to a PIC.

There's lots of info on this site as well as tons on the 'Net'.

Jay
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group