Need help with RS232 wiring

tsopkow

New Member
Hi, I am trying to make an RS232 cable to connect a digital pressure module to a PLC. I purchased a cable that the maufacture supplies that uses a usb-->RS232 convertor (Note: The convertor supplies 5 VDC power to the module). I am able to communicate with the module using a terminal emulator with the command they supplied.

However, a PLC will not accomodate a USB connection so I need to make up my own cable. I have connected as follows

Module Rx pin to DB9 pin 3
Module Tx pin to DB9 pin 2
Module VCC pin to External Power supply V+
Module GND pin to External Power supply V-

This will only echo back the commands I send (even garbage commands).

I opened up the ends of the manufactures cable (See attached photos). It appears I have wired it the same, except for the GND, which I think could be the problem.

I think it is the GND that is the problem, the power and the communications could be two separate sources. Where do I connect the DB9 GND (pin 5) to?

Thanks in Advance.
Terry
 
DB9 connectors always need pin 5 connected, in my experience. I think that all you have to do is to wire 0 V to pin 5 and to the -ve power input of the pressure sensor.

DB9 RS232 uses the original voltage levels, so logical 1 (idle) is between -5 V and -15 V, while logical 0 is between +5 and +15 V.

A lot of "RS232" converters use 0 - 3 V or 0 - 5 V with logical 1 (idle) at 3 (or 5) V and logical 0 at 0 V

A USB to RS232 converter can come in two forms, one that outputs at the original levels and the other that is just 0 - 3 V or 0 - 5 V. I don't know which yours is.
 
It looks like the converter only has a USB – UART chip, meaning it's using 0-5v (or 0-3.3v) signals. It needs a MAX232 chip to convert 0-5v signals to the bipolar levels required by RS232.

Look for a converter that explicitly states it's a USB – RS232 converter.
 
I think that the OP could communicate to the pressure module using the USB converter and a PC. It was the PLC he was having trouble with.
 
Ok, I missed a detail....

If the computer can talk to the sensor using the pictured USB – UART module, then the sensor is using TTL levels, not RS-232 levels. I would expect this to be the case with the sensor, especially as it's powered by 5 volts.

Therefore, it's still an issue of RS232 levels vs. TTL levels. The DB-9 connector of the PLC will be using RS-232 levels, so a MAX232 chip is still needed.

Something like this. They are available with either male or female pins, start with whatever mates to the existing DB-9 connector. Pins 2 & 3 may still need to be swapped, with pin 5 (ground) connected between the PLC and converter.

 
I guess this is where my electronics knowledge is lacking, because I did not think the external voltage was going to be an issue, so I never mentioned it. The external voltage required for the modules is 5 volts to 10 volts. The manufacture states that modules of lower accuracy modules require lower voltage (i.e 5 volts) and higher accuracy modules require high voltage (i.e <7 volts). I only tested the manufactures USB converter cable with a low accuracy module. I have two modules that are low accuracy and one that is high accuracy. I rented a device from the manufacture of the modules that a module can be connected to it. All the modules worked on it. So, I measured the power that the device supplied, and the voltage was 7.85 volts.

Each of these modules can be given an individual address. My plan was to daisy chain all these on one serial line. However, each would be connected to an external power supply at around 7 to 8 volts).

Will this TTL convertor work in this senario?

Terry
 
RS232 cannot normally be connected as a daisy chain.

I think that a diagram would help us give you advice. Or some part numbers or links or something.
 
Are the pictures I provided at the top of this thread not good enough? I what to create this cable without the USB convertor and connect directly to a Serial Port + external Power Supply.
 
The ground would be the reference for RS232. Also, it is TTL level, so the 3 - 5 V version of RS232.

If the PLC has a DB9 connector, it is almost certainly the original RS232 voltage levels which are below -5 V and above +5V, so you need a converter like the ones that For The Popcorn suggested.
 
The ones that Popcorn suggested only allow 3.3 to 5.5 VDC. I am assuming there are others on there that will accept higher voltage and regulate it down to 5 V? I need 7 to 10 VDC to run the module.

I found a model with the following specs. Will this work?

 
Do you have a datasheet to the actual sensor? The drawing you posted states TTL level serial. That's a 5 volt signal. The voltage required by the sensor is a completely different subject.

I'd like to see the entire datasheet. Those little details like "TTL serial" would have lead to a resolution much quicker.
 
Sorry, all the manufacture supplied me with is the dawing I posted in an earlier post. Also a list of commands and the comm port settings. They indicated that the device is "RS232 communications". The commands are an ASCII format. The people that I am dealing with are in the US and the manufacture is located in Europe. I have asked multiple times (this is going on for 2 months) for more information and have yet to receive any. So therefore I though if I purchase their USB cable and it works, I could reverse engineer and make a cable that connects directly to a serial port. It is looking like it is not that easy.

The USB convertor that I have in my first post works, but I don't know if this is a TTL convertor
 
I am not going to take up any more of anybodies time. As I mentioned I thought this was going to be easy. I will continue to work with the manufacture and hopefully get a resolution soon.

Thanks for the input so far.

Terry
 
You might have a look at this page from my PIC tutorials, it explains a fair amount about connecting logic level to proper RS232 levels. It uses the classic MAX232 chip.


Notice that unlike the USB example, there's no power on an RS232 interface - although it is possible to 'steal' some if you have full software control of the host device.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…