SPI, Stepper and Healthy Communications

Status
Not open for further replies.

BlueTurtle

Active member
Hey everyone,
I’m having a bit of a design dilemma and don’t really know how to proceed. In my project I need to read/write data over SPI to two different ICs. One of them is MCP3201 ADC and other one is TMC2130. I don’t necessarily need to read back from TMC2130 stepper controller but I definitely need to read from MCP3201.
Let me describe my circuit a bit,
Teensy 4.0 -> 74HCT245 -> SPI and other pins
Teensy 4.0 <- 74HCT245 <- My inputs
Currently in my setup I use SPI1 line for a device exclusively because I don’t want other ICs potentially messing with it. The cable I’m running to it is around 6 feet, twisted pair, and has shield over the cable, terminated at only board side. (not individual pairs) I also used all of the pairs as signals, power etc. I didn’t use the pairs as grounds. This device works fine, I don’t have any problems with it. Now, I need to add these MCP3201 and another TMC2130 to the existing SPI line with multiple devices that also work fine but they are on board. Now I need to run another 6 feet or so cable to attach these ADC and stepper driver right next to the critical SPI device I’m using. My worry is that running 24V power for stepper driver as well as 5V for ICs with 2nd SPI line, and stepper driver pins is going to create too much of an interference and the system won’t be robust. How can I make a robust SPI connection with these devices at around 6 feet with stepper motor very close to them. The stepper will draw about 300-400 mA at 24 Vs but running it right next to 20 or so cables seems like not the best idea. I can add anything after the 74HCT245s for reliable transmission and ideally don’t mess with anything in between Teensy and 74HCT245s but if I have no other option I will redesign my PCB
 
6 foot run is too long for reliable single-ended fast logic signals. 6 inches is more normal :)

You'd need to use something like RS485, LVDS, or an old fashioned line-driver / line-receiver pair to get robust high
speed logic travelling over distance. The medium must be a matched transmission line, properly terminated. Not sure
the '245 is strong enough a line-driver for typical twisted-pair or ribbon cable transmission lines (in the range 100 to 120
ohms usually).

Have you figured out if the HC245 can source/sink enough current to drive a termination network? Using ribbon cable with
alternating signal/ground, and proper termination would give single-ended signals the best change. 220 ohms to each of
Vcc and ground makes a 110 ohm termination network, but perhaps 2 x 270 ohms is possible as a compromise.
 
Status
Not open for further replies.
Back
Top