Author Topic: RS-422 to ttl serial converter  (Read 8675 times)

0 Members and 1 Guest are viewing this topic.

Offline ITman496Topic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: us
RS-422 to ttl serial converter
« on: August 26, 2016, 12:01:25 pm »
So I'm trying to make a very compact control system for a blackmagicdesign smart videohub hd-sdi switcher unit.

https://www.blackmagicdesign.com/products/smartvideohub

It takes RS-422 4 wire protocol to accept signals and I've already used it successfully with an rs-232 to rs-422 adapter from a laptop, sending commands manually.

My problem is I want to control it with an arduino, which, as we know uses 0-5v ttl.

I have not done much with rs-485 and rs-422 before.  It appears that every single adapter and ic meant to adapt these things to 5v ttl is compatible with both.  But I don't understand how?

I need TX+ TX- RX+ and RX- for the rs-422.  A lot of the shields and IC's don't even have the negative outputs for the differential pairs, only the positives, and yet they claim rs-422 compatibility.  How is this so? Do you just ground the negatives?

I found a chip that appears to have the negatives. Will this chip allow me to talk at 9600 baud from an arduino's ttl serial port to an rs-422 4 wire device at the correct voltages and stuff?

http://www.digikey.com/product-detail/en/stmicroelectronics/ST490ABDR/497-2091-1-ND/599092

Thanks again. I just don't really understand how people turn 2 wire 485 chips into 4 wire 422 transmitters, and the datasheets don't seem to mention it either, in an example circuit.
KD2CHS
 

Offline MosherIV

  • Super Contributor
  • ***
  • Posts: 1530
  • Country: gb
Re: RS-422 to ttl serial converter
« Reply #1 on: August 26, 2016, 12:15:56 pm »
Quote
It appears that every single adapter and ic meant to adapt these things to 5v ttl is compatible with both.  But I don't understand how?
My understanding is that RS422 is for point to point communication, hence only needing 2 wire.

RS485 on the other hand allows multiple users to tap into the comms lines.

Perhaps this WEB page explains it the best (that I could find) :
http://hw-server.com/rs-485-rs-422

Look at the diagram "Comparison RS422 - RS485" for an idea of how to wire it.

Quote
I need TX+ TX- RX+ and RX- for the rs-422.  A lot of the shields and IC's don't even have the negative outputs for the differential pairs, only the positives, and yet they claim rs-422 compatibility.  How is this so? Do you just ground the negatives?
I suspect they need a Tranciever chip to do the physical transmission, they only claim "compatibility"
If these are Arduino sheilds then they are aimed at home hobbiests who will probably just join the 2 shields together and it will work but to get the Tx distances that RS422/RS485 can do you need to do the differential lines.
« Last Edit: August 26, 2016, 12:17:35 pm by MosherIV »
 

Offline ITman496Topic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: us
Re: RS-422 to ttl serial converter
« Reply #2 on: August 26, 2016, 12:52:52 pm »
RS-422 is 4 wire as far as I can tell but all the rs-485 chips only have 2 wire outputs?  How do they become 4 wire?

Like in this:

https://www.tindie.com/products/Conceptinetics/rs485-rs422-shield-for-arduino/
KD2CHS
 

Offline NW27

  • Regular Contributor
  • *
  • Posts: 53
  • Country: au
Re: RS-422 to ttl serial converter
« Reply #3 on: August 26, 2016, 01:31:02 pm »
RS... communications use a differential signal. RS422 is typically 4 wire. Two for Tx and Two for Rx. It is usually point to point as per RS232. Ie a single PC at either end. It is not used very much these days as the RS485 chips have become the industry standard with significantly better specifications.
A typical RS422 ic was made by National Semi DS8820 for Rx and DS8830 for Tx. They did also make a DS8832 which allowed RS422 to be multi drop communications like RS485.
As above, RS485 is designed for multidroping numerous devices ie typically up to 32 on a two wire communications bus.
A typical ic is DS3695 or MAX485 etc etc.
ALL of the above RS... chips have a ttl interface for connection directly to the micro.
On a RS485 chip, one of the pins is the signal direction ie the +&- pins or either set for Rx or Tx.
So for your above interface in the above post, just use two RS485 chips. One set to have the +/- as Tx and the other set for Rx.
One of the other pins is the output enable pin so make sure this is also set correctly.
Finally there is not a negative output voltage ie <0V. The positive and negative signal pins are just swapped around. The +/- signals would be better thought of as A/B signals. Join all A's together and all B's together.
Neil.
 

Offline ITman496Topic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: us
Re: RS-422 to ttl serial converter
« Reply #4 on: August 26, 2016, 01:45:42 pm »
Okay, that sheds some light onto this, then.  Thank you!

Does that IC I linked before work, or should I use 2 chips set like you said? I'm all for reducing chip count if possible, but if not I'll just use two.
KD2CHS
 

Offline retrolefty

  • Super Contributor
  • ***
  • Posts: 1648
  • Country: us
  • measurement changes behavior
Re: RS-422 to ttl serial converter
« Reply #5 on: August 26, 2016, 01:46:58 pm »
Back to fundamentals:

The main reason for the existence of RS-422/485 is to accommodate multi drop communications over rather long lengths and or high baud rates. It's a proven, reliable, and economical standard long used in industrial environment.

First when setting up such a hardware network is to define if serial data must or will be flowing in both direction at the same time then a 4-wire link must be used to allow 'full-duplex' operation. Otherwise if only 'half-duplex' communications needs to be supported then the 2-wire link will be half the expense (except for conduit cost in some environment). So a 4-wire link can support both full and half duplex communications if desire, however a half-duplex 2-wire link can only support half-duplex operation or 'simplex' mode where signal data only ever moves in one direction only.

 The main difficulty in setting up RS-422/485 links that unless there will only be two nodes using the link, then there needs to be away to control the logic direction pin(s) inputs on the RS-422/485 converter chips (often named DE) to insure that there electrically only be one driver enabled (active not floating) at any one time. This direction pin(s) have to be controlled by the device(s) that can transmit attached to the link and normal TTL serial uart software library/driver software do not usually support a general purpose digital output pin used to support a direction control signal prior and released after sending character(s) to the link.

 







 

Offline NW27

  • Regular Contributor
  • *
  • Posts: 53
  • Country: au
Re: RS-422 to ttl serial converter
« Reply #6 on: August 26, 2016, 01:47:51 pm »
The digikey chip in the link will work for you. It is more of a RS422 chip than a RS485 chip ie it is made for permanent full duplex ie outputs all ways enabled.
For your requirements you only need one of these chips.
RS485 is half duplex and therefore has the separate enable pins for the transmitter and receiver as per figure 3.
The -7v input in the spec just means it will except a negative voltage down to -7v without being damaged.
RS422 never intentionally generates negative voltages. This only happens if the grounds of the equipment are at different voltages.
Remember that RS... was designed for driving long distances ie 50..1000m.
The grounds of equipment that far away can easily be higher/lower.
Neil.
 

Offline ITman496Topic starter

  • Regular Contributor
  • *
  • Posts: 161
  • Country: us
Re: RS-422 to ttl serial converter
« Reply #7 on: August 26, 2016, 03:22:38 pm »
I'm sorry, I should have specified what I'm doing. This is merely a 2 device system, with a remote controller, and a unit to be controlled. It's even only one way communication, the controller doesn't have to care what the unit says is happening, its just sending a command to change channels.  So multi-drop and high baud rates and data flow is irrelevant, in this case, I think.  The only reason I'm using rs-422 is because that's what the plug on the back of the unit asks for.

I'm glad that this sounds sane and workable, NW27. Thank you!

And thank you to everyone else for telling me how the RS-4XX works because I really had no idea.  Always learn a new thing every time I post here!
KD2CHS
 

Offline mikeselectricstuff

  • Super Contributor
  • ***
  • Posts: 13987
  • Country: gb
    • Mike's Electric Stuff
Re: RS-422 to ttl serial converter
« Reply #8 on: August 29, 2016, 09:43:28 am »
Some muddled statements here....
Rs422 is point to point, not multidrop.
neither 422 or 485 use negative voltages (but can tolerate them to cope with ground shift)
All you need is a 75179 type transceiver to convert arduino ttl to rs422. No transmit enable is needed.
Youtube channel:Taking wierd stuff apart. Very apart.
Mike's Electric Stuff: High voltage, vintage electronics etc.
Day Job: Mostly LEDs
 

Offline NW27

  • Regular Contributor
  • *
  • Posts: 53
  • Country: au
Re: RS-422 to ttl serial converter
« Reply #9 on: August 29, 2016, 10:31:36 am »
As I mentioned, the DS8832 is a RS422 transmitter that is designed for multidroping of RS422 communications. In fact i used to multidrop these RS422 networks over 25 years ago before RS485 was invented. So yes it does allow multidroping.
The negative questions were also addressed in the above posts.
The 75179 is the same as the ic in the first post and approved for the ops project.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf