Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

communication between pc and sensor by RS232

Status
Not open for further replies.

itmr

Member level 3
Joined
Nov 5, 2010
Messages
55
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,750
HI ALL
i am trying to get data from sensor that have rs232 output
i connect the rs232 pins to d type 9 pins and then through rs232 to usb adapter to pc.
when i open the hyper terminal i see gibberish signs and not a good data formats.
when i check the voltage level at the transmitting line at the rs232 output from the sensor - i get -5.5v that i think its good because rs232 represent negative voltage level for '1'- am i right?????
when i connect the adapter i measure -1v at the same point, is it sounds good?
although i get worth data at the hyperterminal
does someone have any solution for me?
am i need to use transceiver to "talk " right to the PC?
my be the fault is a the adapter???
my be i need to connect the sensor directly to the RS232 input in the pc chassis?

thanks
 

just short circuit the pin 2 and 3 in RS232 in PC and type some thing in hyperterminal (select echo mode). Then if you could see the same letter received then no problem with RS232 to USB convertor.
 
  • Like
Reactions: itmr

    itmr

    Points: 2
    Helpful Answer Positive Rating
what is the baud rate your sensor supports???? and what is the baud rate set in your hyper-terminal.. instead of adaptor use rs232 cable if possible...

garbage values is an indication of wrong or baudrate mismatch.

keep changing the baudrate of the hyper-terminal and see for which baud rate you get correct output if you dont know the baud rate of the sensor...........

---------- Post added at 12:26 ---------- Previous post was at 12:24 ----------

just short circuit the pin 2 and 3 in RS232 in PC and type some thing in hyperterminal (select echo mode). Then if you could see the same letter received then no problem with RS232 to USB convertor.

if you select echo mode then all the characters will appear even if you dont use any cable or short pins 2 and 3.... better test it.... before giving answer....

---------- Post added at 12:27 ---------- Previous post was at 12:26 ----------

and if data is got on the window then , it has nothing to do with cable.. it means cable is fine and receiving some data if not correct data....
 
  • Like
Reactions: itmr

    itmr

    Points: 2
    Helpful Answer Positive Rating
Have you set the communication parameters for com port.

Settings are required for serial connections used for asynchronous start-stop communication, to select speed, number of data bits per character, parity, and number of stop bits per character.

Serial port - Wikipedia, the free encyclopedia

Regards KAK
 
  • Like
Reactions: itmr

    itmr

    Points: 2
    Helpful Answer Positive Rating
just short circuit the pin 2 and 3 in RS232 in PC and type some thing in hyperterminal (select echo mode). Then if you could see the same letter received then no problem with RS232 to USB convertor.


i tried it and its works good but sometimes the adapter automatically disconnect so i guessed that maybe the problem occurs because of untaching and taching

---------- Post added at 09:39 ---------- Previous post was at 09:28 ----------

i have set it all good (in the hyper terminal) - and the default baud rate of the sensor is 9600 so i set this at the hyper terminal to

i guess that the problem can occurs because Little endian/Big endian....should it?

some knows how should i change it in the hyper terminal?
 

when i connect the adapter i measure -1v at the same point, is it sounds good?
A sensor with a regular RS232 driver should have a more "stiff" output level, but it should still work. Even more interesting, does the positive level during character transmission reach the RS232 receiver threshold (at least + 3V). You'll need an oscilloscope to see the waveform clearly. I presume, that RS232 ground (pin 5) us connected properly.

In any case, you need to know the specification of the sensor baudrate and transmission protocol.

i guess that the problem can occurs because Little endian/Big endian....should it?
Unlikely. The term applies to binary data representations. In this case, you won't see readable characters with Hyperterminal at all. As said, you have to get clear about the sensor protocol.
 
  • Like
Reactions: itmr

    itmr

    Points: 2
    Helpful Answer Positive Rating
Thank U all and my problem occurs because someone that works with this sensor decided to work in 38400 bit/sec and once this sensor configured - u must works at the same br to configure it again - this sensor save the last br although u disconnect the power...thats what i missed. - so ckshivaram u right
so i run my design for all the br options and at 38400 it works good.
thank you guys for the advices..
have a good day
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top