Keypad noise issue

Thread Starter

anshuman_ag

Joined Mar 30, 2021
4
Hi,

I am using a 4 key keypad in my design where the microcontroller is PIC24FXXX. I have been using matrix keypads since more than a decade, however this time I have come across a noise problem in keypad. Before describing the problem I must tell that here is a 1K pull down already on key pad inputs, the scan rate s 20HZ and keypad debouce has been taken care of in firmware.

Coming to the problem, this system has a motor and VFD installed in a box with my board also in it. the key pad is connected via cable with 18 inch wire. My MCU is reading ghost input signals from keypad while system is running, I am not able to understand how to take care of such noise.
Please help

Anshuman
 

peterdeco

Joined Oct 8, 2019
347
Welcome. Try disconnecting the motor to see if the problem goes away. If so, we have to focus on motor noise/spikes depending on AC, DC and voltage.
 

djsfantasi

Joined Apr 11, 2010
7,639
Is the keypad in a separate box? If they’re all in the same box, does the cable need to be 18” long? Is the cable shielded? That could be a big antenna. Otherwise, can you use line drivers on the keyboard output? And what are you using for power supplies? Are they filtered?
 

DickCappels

Joined Aug 21, 2008
7,288
What do you mean by ghost signals? Are these caused by pressing other keys, generated without any human interaction, or...?

While asking questions, does the motor have brushes on it?
 

BobaMosfet

Joined Jul 1, 2009
1,653
Hi,

I am using a 4 key keypad in my design where the microcontroller is PIC24FXXX. I have been using matrix keypads since more than a decade, however this time I have come across a noise problem in keypad. Before describing the problem I must tell that here is a 1K pull down already on key pad inputs, the scan rate s 20HZ and keypad debouce has been taken care of in firmware.

Coming to the problem, this system has a motor and VFD installed in a box with my board also in it. the key pad is connected via cable with 18 inch wire. My MCU is reading ghost input signals from keypad while system is running, I am not able to understand how to take care of such noise.
Please help

Anshuman
And what is your oscilloscope showing you? Until you have a scope shot, you don't have anything signal-wise to look evaluate.
 

Thread Starter

anshuman_ag

Joined Mar 30, 2021
4
Is the keypad in a separate box? If they’re all in the same box, does the cable need to be 18” long? Is the cable shielded? That could be a big antenna. Otherwise, can you use line drivers on the keyboard output? And what are you using for power supplies? Are they filtered?
Every thing is inside the same box, cable has to be at least 15", it is a flat ribbon cable and I hope you are right, it is working as a Antenna,
You mean I should add line driver on keyboard side? I am using a 3.3V LDO for power supply of MCU.
 

Thread Starter

anshuman_ag

Joined Mar 30, 2021
4
What do you mean by ghost signals? Are these caused by pressing other keys, generated without any human interaction, or...?

While asking questions, does the motor have brushes on it?
Hi, by ghost signal I mean keyboard is sending signal without any key being pressed, it is a 3 phase Ac motor with VFD installed to control speed.
 

DickCappels

Joined Aug 21, 2008
7,288
In an earlier post you mentioned that the problem only occurs when the (3 phase) motor is running. I think that narrows it down to either conducted noise, possibly along the power lines into your microcontroller's power supply or something "through the air", which might be solved by adding decoupling capacitors to the motor's windings and if necessary shielding.

As I recall, you have a 1 k pull-down on each row or column. You might try adding a small capacitor across each, such as a 0.01 uf. Anything you can do to keep the noise at its source and to keep your susceptible circuit from picking it up should be investigated.

I used to design various parts of TV cameras. A few microamps of noise was a real problem. Sometimes during the de-noising operation the camera would be bristling with chokes, resistors, and capacitors soldered here and there until the noise became acceptable. After that the parts that tamed the noise were removed on at a time while the signal quality was monitored to see what had the greatest effect. What I am saying is that sometimes there noise problems require a lot of trial and error to pin down.
 
Top