UART/USART serial communication over a few meters cable

Hi there,

I recently bought a SmartGPU 2 for my automotive project and I'm trying to connect it over a distance of about 3 meters.
I don't have an oscilloscope to investigate the issues I'm facing but I can tell that the gpu is not receiving the serial data correctly.

The reason why I need such a setup is that the display will be placed in the van's dashboard while my Arduino DUE is at the back, connected to various sensors.

I guess this has something to do with serial communication reliability over long distance rather than the GPU.

What I've done so far.

  1. run my sketches with the provided short cable (TX,RX,RST,3.3v,GND): Everything works
  2. replace the short cable with a 3 meters long one: consistent (predictable) errors
  3. use the long cable only for the TX and RX pins and short wires for the other pins: Everything works
  4. tested voltage across long and short cables: no difference

I'm quite new to electronics therefore... yes, I'm missing something :slight_smile:

Any hints?
Cheers!
Nico

The problem is you are trying to run logic signals over a long wire.
Try a simple 1K pull up resistor. That is from the RX to 3V3. On both devices.
Otherwise you will have to use a buffer with a higher voltage. A common way is to use an RS232 buffer at both ends.
I am assuming that both ends talk with 3V3 signals at the moment.

Thanks for your reply.

Yep, both devices at 3.3v.

N.

Mmmh, the 1k pull up resistors didn't make any difference.

You mentioned an RS232 buffer. But the sound of it, you're suggesting to use RS232 for transport. Is there an easy way to do it?

Best,
Nico

something like this? :roll_eyes:

I had this problem, and it was caused by voltage drop in the GND line. the "far" device(The one further from the power supply) is consuming current to power itself, and the ground wire acts like a resistor, so the "ground" at the far device is above the ground at the near device. Since that device can't pull the voltage lower than it's ground, when it sends a zero, the "near" device doesn't see 0v, it sees whatever voltage the far device ground is at, which might be above the threshold that the reciever considers a 1.

Also, when the near device sends 0, the far device sees a voltage below it's ground, which could cause damage unless there is a resistor in the line.

A possible awful hacky workaround would be to use 2 1k resistors or so to make a voltage divider on each input. By halfing the voltage into the rx pins you might be able to bring the level back down to what is considered a low(the threshold is usually less than half of 3.3v)

Do it to both devices RX pins, and the resistance will also protect against the slight negative voltages.

It could also be the gpu just isn't getting enough power over the long wires.

The MAX232 is not a 3v3 device it is a 5V device.
For a 3v3 system, use a MAX3232

Yup, I figured the MAX232/3232 thing up by reading the specs.

I ended up buying a couple of out of the box MAX3232 adaptors (http://www.ebay.com.au/itm/111228758957?ssPageName=STRK:MEWNX:IT&_trksid=p3984.m1439.l2649) and I'm going to test them tonight before sleeping in the van. At those voltages I shouldn't catch fire, right? :stuck_out_tongue_closed_eyes:

Gaak! they should write an electronics book for IT people eheh