Posted by Tony Pratt 1 on 02/05/2020 16:00:01:
Posted by Roy Vaughn on 02/05/2020 11:33:23:
… During the build I found that screened cable was needed to stabilise the display even without obvious sources of interference nearby. …I've found that when the cable is passed close to either the lathe's motor or the stepper, there is still occasional interference. … Obviously I will arrange the final installation to minimise the chance of interference but the fact that it could still occur with potentially unfortunate results convinced me that something needed to be done. I've therefore made a small modification to the code to disable keypad input when the spindle is turning….
Just my opinion but I like the flexibility of changing thing when the spindle is turning.
Tony
+1 to Tony. But also, it goes against my grain to cure a hardware fault like interference with a software fix. It's not mad, but I'd prefer to fix the interference first. There's a hint of a related, but different, cable problem in 'I found that screened cable was needed to stabilise the display'. Likely the signal is being distorted as well.
The LED&KEY display is based on a TM1638 chip. It communicates with a computer with a fast synchronised serial data stream, which is encoded and decoded at each end. It's data rather than plain switching. In addition to power, there are CLOCK, STROBE and DATA signals. My LED module runs at about 300kHz, a radio frequency that doesn't carry well on ordinary cable, being prone to radiate and receive interference and distort. The application really needs a data cable.
I suggest the problem is made for an Ethernet Patch Cable and RJ45 sockets.
Ethernet cable contains 4 twisted pairs and a shield.
![dsc06224.jpg dsc06224.jpg](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
So Power (+ and -ground) on first pair, STROBE & ground on second, DATA & ground on fourth, CLOCK and ground on the fourth. Then the POSITIVE, STROBE, DATA, and CLOCK signals are each independently balanced against ground to prevent interference and cross-talk. And all four pairs are further shielded behind an Aluminium foil wrap. Carrying high frequency signals on twisted pairs allows them to go further along a cable without losing shape and amplitude.
A standard ethernet patch cable can be bought: plug pin connections described here.
However, at the sockets, the pins are not Ethernet standard. Instead the ground side of each pair should be brought together and grounded at both sockets. Then the other 4 pins are run to POSITIVE, STROBE, DATA, and CLOCK; any pair can be used provided the computer and display ends match!
External RF interference to power and control circuits is almost always due bad practice inside the victim. It's the electronic equivalent of a leaky roof. Better to fix the roof than catch drips in buckets!
Dave
Edited By SillyOldDuffer on 02/05/2020 17:20:04