Go Down

Topic: Arduino to Arduino - Cable and Speed? (Read 349 times) previous topic - next topic

SimLego

Apr 10, 2013, 02:47 am Last Edit: Apr 10, 2013, 02:49 am by SimLego Reason: 1
At last, I'm almost there when I can connect the Playfield Arduino Unit to the Display Control Arduino Unit in my pinball project. It will be a one way communication where the Playfield unit sends updates on which Player is up, Tilt, Ball In Play/Game Over, Game Credits, and of course the scores for up to 4 players. In other words: All the information displayed on the Top Box.

Data will be sent in "packages" of 3, 4, or 8 bytes depending on which kind of information is sent. If it proves necessary, I can save some bytes by sending them binary instead of human readable ASCII, but I prefer not to for debugging purposes.

I thought I would need help with the serial communication code, but it proved to be much easier than I expected.

But I do need some expert advise when it comes to choosing the best cable and setting the speed. The original 50 wire flat cable that went from the Master Unit to the Driver/Multiplexer Board on the playfield was 1 meter (3 & 1/3 ft). I have a 1.7 meters long shielded cable made for video signals that I plan to use for the serial communication. I suppose this is much better to use than a plain wire without shield, right?

If I got it right, transfering 8 bytes will take somewhere between 6.7 to 7.5 milliseconds at 9600 baud. Say 10 ms to be one the safe side. An interrupt from the display strobes that short shouldn't be possible to notice, should it?

But OTOH, with a shielded cable that short, and only one way communication without handshake, the baudrate could be higher I think.

And finally, should I have any capacitor or anything in one or both ends to filter out any noise? I have very little knowledge on noise elimination, just wildly guessing here.

TIA,
/SimLego

CrossRoads

With that cable, I would boost the data rate way up. 115200 even.
No caps, that will just screw up your signal.
Designing & building electrical circuits for over 25 years.  Screw Shield for Mega/Due/Uno,  Bobuino with ATMega1284P, & other '328P & '1284P creations & offerings at  my website.

Go Up