Master Slave Comms - How Far?

Go To Last Post
9 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi

We have an application in which we have two PCBs, each carrying an AtMega 162, within a commercial machine.

As a system enhancement, we have decided that it would be a good thing if we could make one of the boards pass a single byte of data to the other, each millisecond, to achieve a level of operational synchronisation between the two.

The MISO/MOSI/SCK interface looks ideal for the job!

However, as that is also the reprogramming interface, I gather that we can't put buffers or transistors in the way and we are going to have to connect the three signals directly together.

Anybody got any experience of this? How far ought we be able to space the boards apart and still expect reliable comms. At what kind of transmission rate? I know that we could implement some flavour of protocol and checksumming, but just passing a byte (reliably) per millisecond would make our lives very easy.

The host machine should not be very noisy electrically, though there will be low power stepper motors running and the occasional solenoid firing.

Any "wet finger in the air" advice from you hardware bods out there?

TIA
Andy G.

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Seems to me that if you put buffers on the transmitting board, you would still be able to use the circuit programming. The buffer input would be a small extra load on the programming drive circuit, but probably insignificant.

John Brown

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Of course, if this is really a problem, connect the buffers to the pins via a jumper block. Then, during reprogramming, remove the jumpers.

Sean.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Gents

The real problem with the buffers is that we want to avoid changing the connector that we already have and that we can possibly use both for programming and for real operation.

Just putting three extra cores in the cable that interconnects the two boards (hopefully) will give us our synchronisation without further hardware design effort, leaving "just a bit of typing" for the software guys.

Of course, if it turns out that we can only expect to transmit about 15 cm without doing something proper with buffering then we will have to re-spin the layout.

I am looking for about 2 m of comms and am just trying to save a few quid. :))

Andy

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Andy,

you could put the buffers in the cable itself. With SMD components this wouldn't take to much space.

Gerrard

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Andy;
You should be able to carry ordinary CMOS signals at least five feet through
ribbon cable. If you need more, use a shielded cable.
If you are really serious about attenuation through a cable, measure the capacitance of two adjacent conductors, then calculate the Z at the maximum
frequency you expect to pass through the cable, then calculate the loss with this impedance as another load in parallel on the transmitting circuitry.
As long as the Z is over, say, 100K, you should be fine.
Since your byte-data rate is extremely low, you could also hedge by slowing down the bit-rate to a crawl, perhaps 10 kHz.

Best Wishes,
Jud H.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Thanks for the answers, folks.

If 5 feet should be fine, especially at a relatively low data rate, I think I'll give it a whirl and see what happens.

Thanks again,
A.

admin's test signature
 

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

I'd try it with 10 feet first before assuming it'll work with 5.

Four legs good, two legs bad, three legs stable.

  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Sage advice, John.

I've never been one to rely on "skin of my teeth" engineering.

A.

admin's test signature