Troubles to read data with RS232, send = ok.

Discussion in 'Wireless & RF Design' started by Warch, Nov 8, 2010.

  1. Warch

    Thread Starter New Member

    May 4, 2010
    4
    0
    Dear,

    I’m working at the R&D section of the university of Antwerp. I’m currently developing a RFID-reader based on the OMINKEY 5553 module from HID. Now I’m testing the communication with the module true RS232. But this is the part where the troubles rises. When I enter the command “c” for a continuous read of the RFID module, the module enables the green led (reading led). When I enter again the “c” command the module stops reading the RFID tag by disabling the green led. Also when I enter a wrong command, by example “w”, the red led (error) flashes once. I also did several other tests by entering different commands and trying to understand the reaction of the module on the commands that I entered. So my guess is that the communication from the pc to the module works fine.

    The hard part is that the commands that I enter by using a terminal (putty, HyperTerminal) give no single response to the terminal. But I’m able to read the TX signal from the module to the PC on a digital oscilloscope. When I connect the pc to the module, the TX signal fluctuates between +0,6V and -4,6V when I disconnect the RS232 cable from the PC (see 1.jpg) . When I connect the RS232 cable to the PC the voltage level of the TX drops to +0,6V and -3,6V (see 2.jpg). The RX channel when I enter server commands in the terminal and the RS232 cable is connected with the module, fluctuates between -0,6V and +4,6V (see 3.jpg). I find this quite strange because I always thought that RS232 signals fluctuates between -5V and -15V or +5V and +15V for the sender of the signal (Omnikey module).
    I also tried to connect the RS232 signal trough a MAX232 (RS232 driver) by placing the MAX232 between the module (TX/RX) and the PC (TX/RX). But this resulted in no communication between the PC and the module. Since the datasheet indicates that the module TX and RX pin is a USART port that needs to be connected with the PC, I don’t think that I need to connect the MAX232.

    Also I would like to add that I didn’t connect the signal ground (pin 5) from the RS232 connector since this also resulted in a failure of communication. But since RS232 can be used without a connected ground, I don’t see what’s causing my problem of communication with the PC.
    Due to the strict deadline of the project I hope that it’s possible to receive a positive answer soon. Many thanks in advance for the time u took to instigate this problem.

    Sincerely,

    Toon

    1.jpg (TX without connecting PC):
    [​IMG]

    2.jpg (TX with connecting PC):
    [​IMG]

    3.jpg (RX with connecting PC):
    [​IMG]

    Manual ominkey module: <snip>
     
    Last edited by a moderator: Nov 8, 2010
  2. Warch

    Thread Starter New Member

    May 4, 2010
    4
    0
    I think that the reason why the terminal can’t read the TX signal from the module to the PC is because the level fluctuates between +0,6V and -4,6V. That could be also the reason that the MAX 232 driver, (which converts TTL signal levels to RS232 signal levels) couldn’t convert the signal to higher voltage levels because he expects max 0,8V for a low signal and minimal 2V for a high signal (source: datasheet MAX232). And also explains that when I connect the ground from the RS232 signal (pin 5) to the ground of my circuit that I can’t communicate.
    But is it normal for the module that the TX channel from the 5553 module (pin 12) fluctuates +0,6V to -4,6V signal to the computer (see 1.jpg) ? Shouldn’t this be fluctuating between -0,6V and +4,6V ? The RX channel to the module from the PC fluctuates between -0,6V and +4,6V (see 3.jpg), which seems to be ok because the module responds at the commands by enabling the corresponding leds.
     
  3. eblc1388

    Senior Member

    Nov 28, 2008
    1,542
    102
    Never heard of the case of leaving out the ground connection on RS232. Sometimes it seems to work because both sides are grounded separately via their power supply but the common(ground) is definitely required in RS232 connection. Show me proof or reference otherwise.
     
  4. davebee

    Well-Known Member

    Oct 22, 2008
    539
    46
    True RS232 does swing from negative to positive, but the datasheet for the OMNIkey 5553 says its interface is CMOS/TTL, so it should not show a negative swing when wired correctly.

    I also have never heard of a wired serial connection that does not include a well-defined, connected ground connection, so if you are seeing negative signals for this device, I would suspect that your ground is not properly connected.

    Try checking the signal and ground pinouts for correct connection.
     
  5. Warch

    Thread Starter New Member

    May 4, 2010
    4
    0
    Dear,

    First of all I would like to thank you guys for helping me sort this problem out.

    Today I also connected the MAX232 and the ground (RS232 pin 5) like it should be. The previous oscilloscope images where when I disconnected the MAX232 and ground from the RS232, then I tried to communicate directly at TTL level. The TX channel from the omnikey module (see 1.jpg) to the MAX232 (T2IN) seems to be ok. The voltage levels are between +0V and +5V, which I expected. The MAX232 didn’t give any response at the RX_OUT (R2IN) to the RX at the RS232 port (pin2). That’s why I measured the TX channel from the RS232 port (pin3) to the MAX232 (T2OUT). This resulted in the oscilloscope image (2.jpg). This seems to be ok because a sender (PC) can send between -5 and -15V for a mark state (1), here this voltage level is at -10V. The PC also sends +7V for a space state (0), which should be between +5V and +15V. These measurements are done with the load (RFID module) connected.

    I triple checked and measured all connections that I made and can’t find any mistake. Now it seems that with the MAX232 and the ground connected the MAX232 doesn’t want to convert the TTL levels to RS232 and vice versa. For the moment I can’t communicate with the module. I am not able to enter a command in the terminal and the module doesn’t answer at any command. The module seems to be able reading the tag because he enables the green led.

    Sincerely,

    Toon Van Assche

    1.JPG (TX from module to MAX232):
    [​IMG]

    2.JPG (TX channel from PC to MAX232):
    [​IMG]

    My circuit:
    [​IMG]
     
Loading...