+ Post New Thread
Results 1 to 7 of 7
  1. #1
    Member level 4
    Points: 1,777, Level: 9
    Achievements:
    7 years registered

    Join Date
    May 2012
    Location
    Mumbai, India
    Posts
    77
    Helped
    1 / 1
    Points
    1,777
    Level
    9

    Connecting RS232 out to raspberry pi through cp210x.

    Dear friends hope you all are doing fine!
    I have one temperature logger with RS232 out on its back panel. which throws out the instantaneous temperature reading every second.
    I need to connect the RS232 output of temperature logger to one of the USB ports of raspberry pi 3b+. I dont wish to use Tx/ Rx of pi. Understanding that raspberry pi is operating at 5V, I will have to use the following approach:

    DATA LOGGER --> RS232 to TTL Converter (MAX232) --> Serial to USB converter (CP210x/FT232) -->USB port of raspberry pi.

    My plan is to further transmit the temperature reading on web server.
    Please let me know if I am following the corret way. Also I would like to receive your suggestions/ better approaches if any.
    Thanks.

    •   AltAdvertisement

        
       

  2. #2
    Super Moderator
    Points: 29,872, Level: 42
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,916
    Helped
    1129 / 1129
    Points
    29,872
    Level
    42
    Blog Entries
    9

    Re: Connecting RS232 out to raspberry pi through cp210x.

    You did not provide enough information about what is the electrical interface of your Logger (RS-232/ TTL, USB), BTW there are many approaches; as the first (and quick) attempt, I would suggest using Phyton.
    Understanding that raspberry pi is operating at 5V, I will have to use the following approach:
    The TX/RX levels of Raspberry is rather 3,3v, directly connected to the core, not 5v.

    I need to connect the RS232 output of temperature logger to one of the USB ports of raspberry pi 3b+
    Worthy to mention that on the Raspberry '3', the Serial port externally available is not the standard one with several capabilities, this one were redirected to work exclusively with the Bluetooth module; the remaining built in on chip serial HW module for example don't have parity check, and it is let's say, partialy soft-coded, therefore you need to provide a some integrity check on the higher layers on the receiving side of the protocol.
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



  3. #3
    Member level 4
    Points: 1,777, Level: 9
    Achievements:
    7 years registered

    Join Date
    May 2012
    Location
    Mumbai, India
    Posts
    77
    Helped
    1 / 1
    Points
    1,777
    Level
    9

    Re: Connecting RS232 out to raspberry pi through cp210x.

    Thanks andre for your reply. I will try to be more clear.

    I have one temperature logger with RS232 out on its back panel. which throws out the instantaneous temperature reading every second.
    As mentioned Data logger has RS232 interface.

    DATA LOGGER --> RS232 to TTL Converter (MAX232) --> Serial to USB converter (CP210x/FT232) -->USB port of raspberry pi.
    I need to know about this interfacing approach. Am i interfacing both in a correct way?



  4. #4
    Super Moderator
    Points: 29,872, Level: 42
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,916
    Helped
    1129 / 1129
    Points
    29,872
    Level
    42
    Blog Entries
    9

    Re: Connecting RS232 out to raspberry pi through cp210x.

    I have one temperature logger with RS232 out on its back panel
    Ok, I had overlooked this, anyway your original approach is not correct...

    DATA LOGGER --> RS232 to TTL Converter (MAX232) --> Serial to USB converter (CP210x/FT232) -->USB port of raspberry pi.
    You need just an RSR-232/TTL converter, something like this:

    DATA LOGGER --> RS232/TTL Converter --> (TX w/resistive attenuator / RX directly connected)* pi
    *Once the RPI's I/Os dedicated to Serial port are 3,3v supplied, and since RS-232's TTL converter input see the RPI active outputs as logic level 'HIGH', you can connect TX from Raspberry directly to the TTL converter, but the RPI's RX need to have a resistive attenuator just to decrease 5v downto 3,3v.
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )



  5. #5
    Member level 4
    Points: 1,777, Level: 9
    Achievements:
    7 years registered

    Join Date
    May 2012
    Location
    Mumbai, India
    Posts
    77
    Helped
    1 / 1
    Points
    1,777
    Level
    9

    Re: Connecting RS232 out to raspberry pi through cp210x.

    Hello andre, as already mentioned
    1. I want to use one of the USB port of RPi3b+.
    2. I don't want to use Tx/Rx of pi (because I know how it can be done with these pins. ).
    So what could be the solution in this case? I am sure that it is possible. I have thought of the solution mentioned above based on my understanding and/or knowledge. If it is not possible, please let me know why?



  6. #6
    Super Moderator
    Points: 29,872, Level: 42
    andre_teprom's Avatar
    Join Date
    Nov 2006
    Location
    Brazil
    Posts
    8,916
    Helped
    1129 / 1129
    Points
    29,872
    Level
    42
    Blog Entries
    9

    Re: Connecting RS232 out to raspberry pi through cp210x.

    Ok, now I got, so if you want to use the USB, there is no need to have any TTL converter between both sides; Don't seem this would suffice?

    DATA LOGGER(RS-232) <--> Serial(RS-232) to USB converter <--> USB port of raspberry pi.
    Anyway, from the RPI side, this USB interface would be dealt as a UART, I mean, the code that handles the serial port would work with the USB converter, just by changing the target UART.
    --------------------------------------------------------------------------------------------------
    Part of the world that you live in, You are the part that you're giving ( Renaissance )


    1 members found this post helpful.

  7. #7
    Member level 4
    Points: 1,777, Level: 9
    Achievements:
    7 years registered

    Join Date
    May 2012
    Location
    Mumbai, India
    Posts
    77
    Helped
    1 / 1
    Points
    1,777
    Level
    9

    Re: Connecting RS232 out to raspberry pi through cp210x.

    Don't seem this would suffice?
    Yes. I have this doubt in mind, and I don't want to damage my Rpi.



--[[ ]]--