Help said:
Hi, ktec1
I need some infor about the RS485 serial communication. Please advice. Thank You.
Hi, xxargs
Thank you for shared your knowladge and a wealth of advice to me.
Yes, it's new design. I just plan to use parallel method to transmit the data. I just want to take experience on it. Hope can use parallel method to solve it.
I know serial method can solve this problem but the problem is... my MCU only got one serial, I have to use one RS232 interface with my PC. RS485 can looping alot of serial module. I don't have much idea how to use RS485 to design and write the firmware.
Read some RS485 application note to make new idea - its easy find on Internet.
RS485 it's self a dumb differentiell buffer/driver with no protocol, i think you can using eight of them (one RS485 each dataline) per port as driver and simular reciver (also RS485) in B unit and simple shielded ribbon cable (for minimize RF-radiation) between units or two shielded CAT-5 cable (one twisted pair each dataline) - but here important make same electrical length if you make very fast data transport to minimize time skew between bits in word.
If you make this way - you not need a common gnd for signal, and need only grounding shield on cable in each end to make equal gnd-level in both end.
1) If there is the long cable problem. We try to lowest down the transfer rate 1-10KHz. 1mSec-0.1mSec transfering data. Is it much more better?
If you can using slow data speed - try this - old RS232 can using 20 - 100 meter cable pretty well if baudrate is 9600 baud or slower.
But if you using eigth parallell RS485-driver/reciver you can using any speed between zero and 2 MHz, even if range around 100kHz - 1 MHz still little more tricky than higher and lower speed if you using very long cable (~1-2 km).
2) If using core cable, how can we do better design on cable grounded? If using core cable the 'common' ground will be bundle up already.
Think transmissions line simular coax - each datawire shall have return/gnd line very tight to dataline (one twisted pair or coax per dataline is perfect) to not spread out static field and magnetic field between datawire and return wire to neighbour wires - if you force return lines to only one line (one wire common ground) for all eigth datalines, you also mixing up more or less data between datalines (overhearing) ie. all dataline now is magnetic and static coupled to same common ground lines, noise and inteference margin between datawire itself decrase to low and you possible make noise and inteferens-sensivity system...
3) If I try to design the RC circuit before we transmit out the data? Is there got any improvement?
This is one of many method to try to make better cable matching - but study how transmissions line really work so you understud how this work and make rigth solution in cooporative to your used drivers.
Spend some time in good spice-simulator with good intergation digital and analog component and se how this works with long transmissions-line between units.
4) I think another reason because for long distance transmission of low level signals, if higher up the voltage signal make the signal voltage the more reliable.
Do you have any concern?
You talk on very early and very expensive misstake in begining of telegraph era, this telegraph company also thinking this way and try rise voltage to higher and higher level for make better signal to noise and hopfully faster speed on first atlantic cable between USA and Europa (is was paining slow and this actually rate cannot pay back ever of investment even in 100% payed load in infinite time... so companys was desperate...) with result burning whole Altantic cable... and ground problem in this case is wrong designed cable without respect of physic laws for used modulation type (telegraph). This misstake was acceptable in this time ie. nobody know this laws - later knows as telegrapher's formula, but remake same kind of missake in design of IDE-bus and USB 1.1 in 90:s is unforgive!!....
You must rise voltag typical 1.4147 time of old value for every dubbling capacity or dubbling signal to noise ratio (3 dB...), so rise voltage is not right way to save from beginning really bad designed, noising and interferene, unbalanced, transmissions line.
Unbalanced connection and common, one wire ground/return line for many data line is not good solution if you want high immunity from outside noise and low overhearing between data wire, so compare to rising voltage for higher signal to noise ratio, is much better to redesign wire to balanced version - this way can make improvement compare to rise 100 - 1000 Volt sving from 1 volt for same impovement in term of more signal to noise ratio (40 - 60 dB) .
You can't catch up bad designed transmissions line geometry and unbalance with improved strength of drivers in each end. You must pay attention to select right transmissions line solution and geometry, fit to used modulation type already from beginning.
Digital designer common ignore above, depend of design in most case seems working directly on testing board (but have no idea how much inteference and noise margin...), but you can't ignore this if you want working on longer distance communication, here starting from around 0.5 m length (or shorter) for high speed link....
Modern time (90:s) embarrassing bad design as same rate att telegraph company as above, but here also forced to standard from computer industries is a IDE/ATA-bus standard (why you think ATA/IDE only can handle 40 cm expensive high density ribbon cable??, and SCSI in same time can handle dubble rate on each datawire pair on 5-15 meter cheap ribbon cable - ATA/IDE is a scandalous bad design in transmission line eye, but everybody shut on eyes on it) , and do it again on USB 1.1 !! (and somewhat forced to learning transmissions theory and using impedansmatching and terminators in hard way from USB 2.0 and higher with very complex USB-interface to make compatible back to old misstake eeh... USB 1.1...).
This 90:s digital people really forgot all knowhow from 80:s (time to doing SCSI and ST506 etc. and make this correct), no learning of history and make everything wrong again - twice!!! - and whole computer industry adapt to this mistake as max range as 40 cm for connection to ATA-hard drives and 4 m as USB... Ghaaa
I already did the design but is on testing board. But haven't test it in long distance.
It seem like very not suitable for this application. But we try to learn something..
Long haul testing is awlays intresting and is rare this working as you thinking, if you not calculate it from begining - and skipped/missing long distance test on long cable is many case difference between well working system in lab enviroment to non or unsteady working system in field using and customer no paying for you work and possibly sending lawsuit...
To day is not best solution using straight parallell solution for longer distance - in old time is only alternative depend of slow circurit and no widely know of transmissions theory (is know only on phone people and radio guy this time, and Shugart... (made SASI/SCSI, ST504 and floppy interfaces - all correct terminated))
Remember parallell port on PC and make only few hundred kB/s if try transport data between computers via parallell port and special paralell cable... now, HDMI, SATA etc. using parallell converter to very fast single serial link in many Mbit to GBit-speed over matched coax, twisted pair or opto and convert back to parallell again if nesserary, and make 'virtual' parallel cable connection with more or less instant response over only single serial link.
This can implement as autonom machine in FPGA (and using external drivers with matching to used transport media), using special circurit for this purpose etc., or using simple TTL/CMOS parallel to serial and serial to paralell-circurits ala SPI (motorola), but remember at long distance connection must always going over transmissions line as twisted pair, coax etc. witch matched drivers and/or terminate in each end in fast link.