+ Post New Thread
Results 1 to 9 of 9
  1. #1
    Newbie level 4
    Points: 45, Level: 1

    Join Date
    Jul 2019
    Posts
    5
    Helped
    0 / 0
    Points
    45
    Level
    1

    TTL to USB converter : RS232 to TRS

    Hi everyone,

    I need to program a ebike controller and the connection must be made with a USB/TRS cable. I could not find such cable in my city. The only serial port that i could find is a 9 pin RS232 model so i soldered a 3.5mm TRS plug on it with this pinnout :

    - Rx : pin n2 on the RS232, middle ring on the TRS
    - Tx : pin n3 on the RS232, tip of the TRS
    - Gnd : pin n5 on the RS232, sleeve of the TRS

    The laptop did recognised the COM port (it shows up on my ebike controller software in the serial port dropdown) but i still have the "Controller is not connected" beside it. I had no information about the chipset used in the RS232 cable so i removed the mold : the chipset is a PL-2303RA (see the PDF attached).

    So i first want to solder the wires back on the circuit board but i don't know which wire color goes where, on the usb side have a black, red, white and green wire. I would bet that the letters on the electric circuit stands for the colors? Then i'll be able to plug it back on my laptop to see if i can configure the wire to work with my controller.

    Thank you in advance for your help people!

    •   AltAdvertisement

        
       

  2. #2
    Newbie level 4
    Points: 45, Level: 1

    Join Date
    Jul 2019
    Posts
    5
    Helped
    0 / 0
    Points
    45
    Level
    1

    Re: TTL to USB converter : RS232 to TRS

    Here is the pinout of my USB cable if it can help. I didn't find the circuit board schematics nor a way to find it out myself...



  3. #3
    Super Moderator
    Points: 260,203, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,439
    Helped
    13824 / 13824
    Points
    260,203
    Level
    100

    Re: TTL to USB converter : RS232 to TRS

    PL2303 isn't suited as TTL level interface.



    •   AltAdvertisement

        
       

  4. #4
    Super Moderator
    Points: 81,387, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,340
    Helped
    4454 / 4454
    Points
    81,387
    Level
    69

    Re: TTL to USB converter : RS232 to TRS

    You have two different issues here:
    The wires you describe are the USB connections to the computer, if they are wrong the board wouldn't be seen as an extra com port so they must be OK.
    The connection to you ebike controller is what causes the "controller not found" error.

    You need to find out what the connections are at the ebike end. As FvM pointed out, the PL2303 IC is a USB to RS232 converter, it has an on-board charge pump to lift the output voltage levels to typically +6.5 to -6.5V and the data is inverted but for TTL you need 0V to 5V. If you want to use that module you will have to add an RS232 to TLL converter to it.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



    •   AltAdvertisement

        
       

  5. #5
    Newbie level 4
    Points: 45, Level: 1

    Join Date
    Jul 2019
    Posts
    5
    Helped
    0 / 0
    Points
    45
    Level
    1

    Re: TTL to USB converter : RS232 to TRS

    Hi,

    Thank you both for your answers! The controller maker says that the "TTL-232R-5V-AJ" serial cable is compatible. I have the detail about the pinouts (i've joined the PDF). I'll decide about adding another RS232 to TTL tonight :)

    Good evening.



  6. #6
    Super Moderator
    Points: 81,387, Level: 69
    Achievements:
    7 years registered
    Awards:
    2nd Helpful Member
    betwixt's Avatar
    Join Date
    Jul 2009
    Location
    Aberdyfi, West Wales, UK
    Posts
    13,340
    Helped
    4454 / 4454
    Points
    81,387
    Level
    69

    Re: TTL to USB converter : RS232 to TRS

    Yes, most of us know the FDTI range well but what is uncertain is the kind of interface at the ebike controller end. It may not be RS232 or TTL but some other kind of serial data, for example I2C that also uses two wires and ground.
    There is a risk (although unlikely) that if you feed RS232 voltages into a TTL or I2C interface it will be damaged. Also note that TTL can be either 3.3V or 5V levels. You really need the specification of the ebike interface to be sure of how to connect to it. Even if it is RS232 or TTL you still need to know the link speed.

    Brian.
    PLEASE - no friends requests or private emails, I simply don't have time to reply to them all.
    It's better to share your questions and answers on Edaboard so we can all benefit from each others experiences.



  7. #7
    Super Moderator
    Points: 260,203, Level: 100
    Awards:
    1st Helpful Member

    Join Date
    Jan 2008
    Location
    Bochum, Germany
    Posts
    45,439
    Helped
    13824 / 13824
    Points
    260,203
    Level
    100

    Re: TTL to USB converter : RS232 to TRS

    Thank you both for your answers! The controller maker says that the "TTL-232R-5V-AJ" serial cable is compatible. I have the detail about the pinouts (i've joined the PDF). I'll decide about adding another RS232 to TTL tonight :)
    O.k., this clarifies that 5V UART level is correct. PL2303 + level converter is of course an option, although a bit cumbersome.

    Hopefully your controller has sufficient protection to survive your tries to connect to RS232.



    •   AltAdvertisement

        
       

  8. #8
    Newbie level 4
    Points: 45, Level: 1

    Join Date
    Jul 2019
    Posts
    5
    Helped
    0 / 0
    Points
    45
    Level
    1

    Re: TTL to USB converter : RS232 to TRS

    Hi,

    My controller can handle both 3.3V and 5V levels, and it has hopefully suported the 6.5V as it still make my motor turn. For anyone that might encounter the same issue my controller model is a phaserunner from grin technologies.

    I'll have more time at the end of this week so i'll update the topic with my results!

    Thank you so much for your help!



  9. #9
    Newbie level 4
    Points: 45, Level: 1

    Join Date
    Jul 2019
    Posts
    5
    Helped
    0 / 0
    Points
    45
    Level
    1

    Re: TTL to USB converter : RS232 to TRS

    Hi, at the end i ordered the original cable, if i feel confident enough in the future i'll finish this experiment and post the result here!

    Thank you for your time!



--[[ ]]--