SPI distance

Thread Starter

Shagas

Joined May 13, 2013
804
Hello


I am making a project which is going to have to be functional on a small musical stage so there will be audio and power cables lying around . There will also be a strobe light.

I am going to need to communicate one Pillar on the left side of the stage with the right Pillar on the right side of the stage with SPI. The distance will be about 3-4 meters .
The communication will be sent from the master to the slave only with no feedback.

Would 3-4 meters be ok for SPI?
Would it be better if I used a slower clock for the SPI?
Would it improve noise shielding if I used RCA or even shielded Mono jack audio cables to transmitt the SPI signal?
 

Sensacell

Joined Jun 19, 2012
3,453
SPI would work if you sent it via differential line driver/receiver over twisted pairs, properly terminated.

Single-ended TTL will be a nasty unreliable mess.
 

Thread Starter

Shagas

Joined May 13, 2013
804
SPI would work if you sent it via differential line driver/receiver over twisted pairs, properly terminated.

Single-ended TTL will be a nasty unreliable mess.
So how would I do that? If I used an inverter to generate the mirror of the signal and then sent the signal and the mirror with a shielded cable and on the transmitter side used a differential op amp configuration would that be okay?
 

Thread Starter

Shagas

Joined May 13, 2013
804
I've decided to scrap the SPI transmittion and use an electret mic on each pillar for independent functionality simply due to lack of time for testing and building this because my deadline is on Friday .

Having said that , i'm still interested in how I could go around this problem for the future when I'm going to have to deal with it so if anyone has any feedback i'll be glad to listen.
 

Thread Starter

Shagas

Joined May 13, 2013
804
There is a slight change of plan .
What I'm actually going to do is keep the SPI transmittion on one PCB .
The spi will transmitt to 4 shift registers out of which 2 of the registers (16 outputs) will go to bases of transistors controlling Leds which will be 3-4 meters away from the Pcb.
The shift register to transistor base will be done by a 16 wire bus . That should be resistant to noise right?

In case I decided to use the RS-485 could you give me a quick overview? ,
So I just connect say 3 of these MAX485CPA to a single 5volt supply and just input each spi wire into each and have 3 of them as recievers? Or is there any additional circuitry that I will have to build?
 

Papabravo

Joined Feb 24, 2006
21,227
You can use transceivers as transmitters or receivers or both. That way you only have to learn one part instead of separate parts. You have the essential idea.
 

Thread Starter

Shagas

Joined May 13, 2013
804
Thanks for the info Papabravo .

What I'd usually do is learn what you guys advised ( in this case the rs-484 ) and apply it but in this case I'm really constrained by component inavailability and time so as much as I don't like to do this , I have to cut some corners.

What do you think about my last suggestion?
"if I keep everything on one PCB and just send a bus of 16 wires out of the shift register into the bases of the transistors 4 meters away will I still get a noisy signal?
Also let me redefine noise . For me in this case noise would be anything higher than say....300mV since the minuscule flicker of the leds will not even be seen.
The refresh rate will be about 100hz
 

Sensacell

Joined Jun 19, 2012
3,453
Keep in mind that the chip OUTPUTS can also pick up glitches- especially when there are flip-flops involved- (shift registers) I would buffer the outputs of the shift registers with some line drivers. The base of the transistors should have a resistor to GND, so it takes about 2V at the input to turn them on.
 
Last edited:

ErnieM

Joined Apr 24, 2011
8,377
Why are you putting transistors 4 meters away with the LEDs?

Just drive the LEDs directly on each channel. More current = less sensitivity to noise.

At most you just need a heavier return wire.
 

Thread Starter

Shagas

Joined May 13, 2013
804
Thanks for the info Sensacell .

ErnieM:

The second pillar is going to be on the other side of the stage and I'm going to have rows of 6 leds so I need a transistor to power each row
 

ErnieM

Joined Apr 24, 2011
8,377
The second pillar is going to be on the other side of the stage and I'm going to have rows of 6 leds so I need a transistor to power each row
I get that. My point is as long as you are sending each it's own turn on signal just send them all their power on current. Control them all from one side of the stage. The remote box is just LEDs and wires. Local box does all control.

Can't get simper then that.
 
Top