Go Down

Topic: Strange sensitivity issue..  (Read 975 times) previous topic - next topic

bsohn

May 20, 2018, 06:39 am Last Edit: May 20, 2018, 07:10 am by bsohn
OK, First off I am not sure if this is  the right location to post this..

But the issue is I have a program that works fine that does a 7 Button Matrix using the keypad library.. for compatibility and that I want to do an alternative program using the same pins I have all 7 buttons in one row with only a single column..

Anyway the interface for connection it through an ethernet socked and the buttons are on the other end of the NON crossover ethernet cable..

I have tested the program on a breadboard with some wiring and everything works fine, I added the Ethernet socket interface and all still works fine however the MOMENT I attach an ethernet cable I get major crosstalk issues..

EDIT: the longer the ethernet cable the sensitivity appears.. If I use a .5 Meter it works, I use a 1.8M it works, Use a 3M it starts acting wonky.. This is with Cat6 unshielded as well as CAT7 Shielded Cables..



I have tested multiple sockets along with different ethernet cables as well as checked the continuity of all the pins and everything is separated but every time I plug the ethernet cable into the Socket (any of the Sockets) the same 4, 5, and 7 pins trigger buttons Pin (8) is the column pin, (1, 2, 3, 4, 5, 6, and 7) are buttons.

The only thing I can think of is that the Pins are being VERY Sensitive but I am not sure how to go about desensitizing the pins to reduce the crosstalk.. I believe the Keypad Library already enables the Pull_up resistors but I don't know that for sure.

BTW the ethernet cable is an open cable when connected in that nothing is connected to the other side.

Any Ideas would be greatly appreciated.

TomGeorge

#1
May 20, 2018, 10:22 am Last Edit: May 20, 2018, 10:22 am by TomGeorge
Hi,

Can you please post a copy of your circuit, in CAD or a picture of a hand drawn circuit in jpg, png?

Have you got pullup or down resistors on the switch array?

We need to see a schematic please.

Have you got a DMM to measure some voltages?

Tom... :)
Everything runs on smoke, let the smoke out, it stops running....

Robin2

This is with Cat6 unshielded as well as CAT7 Shielded Cables..
How many wires in the Cat6 cable are you using?

Cat6 is 4 twisted pairs - that is, 4 signals and 4 GNDs.

I believe if you try to treat it as 8 separate wires you will run into problems.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

DrDiettrich

Most probably your inputs are not terminated properly. Use at least mode INPUT_PULLUP, or add external pullup resistors to each input pin.

For better assistance a circuit diagram is needed.

bsohn

OK Now that I think I have found the right place to post this question I am having an issue.

I have a sketch that is fully functioning that used the Keypad library to create a button matrix in a 1x7 array. The Reason why this is run through the keypad is that I will have a switch to effectively change the 8 wires designated in the 1x7 matrix into a 4x4 matrix if wanted (hence not going 7 buttons directly to ground).

These pins run to 8 pins in a Ethernet Socket, Through the ethernet cable, and then to another ethernet socket at the other end of the cable where the buttons are attached so they can be used.

The Problem I am having is that the read on the pins becomes very unstable with longer wire length.

If the Wire is .5M it works perfectly.
If the wire is 1.8M it stays stable until a button is pressed and then it will trigger multiple buttons
If the wire is 3M or more as soon as I plug the Ethernet cord in it goes completely crazy triggering and releasing buttons.

The KeyPad Matrix from what I understand about the workings keeps Row Input Pins High and the column pins low.. I have verified this with a Volt meter and get 3.3V on the single row pin and .1-.2v on the Low column pins..

The weird thing is it triggers seemingly random pins when it does this as Pin 3 is the Row and 4, 5, 6, 7, 8, 9, and 10 are the columns.. It will trigger pins 4, 6 and 7 when it goes crazy by just plugging in the Ethernet cable (nothing is attached to the other end).

I have tried reversing the Row and Columns making for a 7 row one column matrix and that becomes more stable with all of the rows High but this will trigger a button 1 press with every normal button press .. BUT it doesn't have the errant signal.. I could work around this in software (BUT) there might still be issues with the 4x4 matrix switch.

So I am a little confused at what to do.. I think I need some sort of stronger Pull-up or Pull Down resistors but because of the change in matrix type this might not be feasible to do..

So I guess what I am trying to find out is if anyone has experienced something similar AND if they have what was their solution.

Grumpy_Mike

Quote
The weird thing is it triggers seemingly random pin
It is not weird it is to be expected. The long wires act like antenna and inject picked up crap into the circuits.

Try a pull up of 510R, if that doesn't fix it then you need some differential buffers at each end of your cable. Something like an RS485 buffer.

pert

DON'T CROSS POST!!!!!!!!!!!!!!!!!!!!

I HAVE REPORTED THIS THREAD TO THE MODERATORS

When you post the same thing in multiple places it causes the people trying to help you to waste their time due to duplicate efforts. You should carefully choose which section to post and then post one time and one time only to that forum section.

ReverseEMF

#7
May 21, 2018, 03:08 am Last Edit: May 21, 2018, 03:24 am by ReverseEMF
This sounds like a crosstalk issue.  I.e. the signal on one wire is being inductively impressed on one or more of the other wires.  There are, typically, 4 twisted pairs in an Ethernet cable.  The twisted pairs will, most likely, have the greatest inductive coupling.  Try arranging the wires so you're using two twisted pairs for the Row lines, and the two other twisted pairs for the Column lines.  Hopefully, the other Row lines will have a low enough impedance, when LOW, to dampen out the crosstalk.

Another thing you may be contending with, is line reflections.  Sending pulse waves down a transmission line [which is what you're using your Ethernet cable as], that is not properly terminated, can result in reflected energy that can muddy up the pulse.  Typically, the termination resistance needs to be fairly low -- i.e. around 120Ω for twisted pair.  The outputs on your MCU probably won't be able to drive something like that [typically a Line Driver is used for this], but, you might be able to dampen some of this by including pull-ups with as low a value as you can get away with.

You don't seem to say what MCU device you are using.  I see a voltage of 3.3, so I'm assuming it's a 3.3V Arduino, or ESP of some sort(?)  But, try adding a pull up resistor to each Column pin [assuming they are the inputs], using the following formula:

3.3V/I = R

Where I is the maximum recommended output current [NOT the ABSOLUTE MAXIMUM Current] for the MCU that you are using.  For an Arduino Uno/Pro Mini that's 20mA [I know the TECH SPECs show 40mA, but that's the ABSOLUTE MAXIMUM, and really shouldn't be the value listed there].

BUT, if you choose to not be as conservative as I am, and if you are using an MCU that has an ABSOLUTE MAXIMUM output current drive of at least 28mA, and is running at 3.3V, then you could get away with 120Ω pull-ups. 

Other than that, consider a Line Driver. 
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

Wawa

Did you look at the keypad library examples.
It might have extra commands (debounce time?) for this sort of problems.
Leo..

ReverseEMF

Did you look at the keypad library examples.
It might have extra commands (debounce time?) for this sort of problems.
Leo..
If 0.5M length works just fine, then how to you see this as a "debounce" issue?
"It's a big galaxy, Mr. Scott"

Please DON'T Private Message to me, what should be part of the Public Conversation -- especially if it's to correct a mistake, or contradict a statement!  Let it ALL hang out!!

Wawa

Not a debounce issue, but a longer debounce time could slow things down and fix the crosstalk issue.
There might be other functions in that library to slow things down.
No harm in trying this.
Leo..

ted


allanhurst

Why not put your encoder electroncis close to your keys, and send the results over as long a cable as you want eg by uart style protocols over RS422?

Allan

Southpark

#13
May 21, 2018, 05:41 am Last Edit: May 21, 2018, 05:44 am by Southpark
Try arranging the wires so you're using two twisted pairs for the Row lines, and the two other twisted pairs for the Column lines.
Nice! But quick question only....which two pairs? Any two pairs?

MorganS

Any two. The pairs are electrically identical.
"The problem is in the code you didn't post."

Go Up