Troubleshooting help - CNC control signals?

Arbutus

Super User
Premium Member
I have two MCUs, a Teensy 4.0 and a Teensy 4.1. Both run at the same 600MHz (!) speed.
T4.0 generates a signal to control a stepper motor (Pulse+/Direction+). T4.1 receives that signal and synchronizes another stepper to pulse its motor once per N pulses received.

Observing the output signal at the T4.0 cable connection, I see on the scope that the output signal is almost perfectly square (at 5ns).

Observing the received signal at the T4.1 cable connection, the scope shows a ringing effect. It is extremely brief, but because the T4.1 is so fast, when it is monitoring the input pin, it sees dozens of transitions. So instead of one pulse it responds to many. My 'synchronized' motors are both doing a solo dance.

The cable between the MCUs is a 4 conductor 24ga shielded cable typically used for CNC machines, about 5 ft long. The connectors are GX-16, grounded and connected to the shield at both ends. I accept that the ringing is the natural state for this type of cable (could be longer or shorter, I suppose) but tuning the cable isn't going to solve the problem.

At the T4.1 inputs, there is a 1K pulldown resistor.

Its looking like I might need to add HF filtering on the receiving pins. Or is there an active circuit that might be appropriate? 74xx buffer/inverter perhaps?

I'm mostly bald already. But this is making it worse! Any ideas?

SignalNoise.jpg
 

Arbutus

Super User
Premium Member
With a small ferrite choke at the T4.1 inputs, the ringing signal disappears. Secondly, there is a Schmidt trigger option for the ISR pin which is on by default when using pinMode(pin, INPUT_PULLUP); Turning this off, slows the response just enough to avoid the false triggering. See, that wasn't so hard. :)
 
With a small ferrite choke at the T4.1 inputs, the ringing signal disappears. Secondly, there is a Schmidt trigger option for the ISR pin which is on by default when using pinMode(pin, INPUT_PULLUP); Turning this off, slows the response just enough to avoid the false triggering. See, that wasn't so hard. :)
...... Maybe, but I seem to speak a different language when it comes to electronics, so, yeah, for me, that seems pretty hard. o_O
Well done. :cool:
 
Top