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.

TTL to USB converter : RS232 to TRS

Status
Not open for further replies.

BobSan

Newbie level 4
Joined
Jul 27, 2019
Messages
5
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
48
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 n°2 on the RS232, middle ring on the TRS
- Tx : pin n°3 on the RS232, tip of the TRS
- Gnd : pin n°5 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!
 

Attachments

  • PL2303RA_v1.0.2.pdf
    824.8 KB · Views: 167
  • electric circuit back (1024x575).jpg
    electric circuit back (1024x575).jpg
    235.8 KB · Views: 171
  • electric circuit front (575x1024).jpg
    electric circuit front (575x1024).jpg
    252.5 KB · Views: 186

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... :bang:
 

Attachments

  • usb_pinout_rs232.png
    usb_pinout_rs232.png
    5.5 KB · Views: 197

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.
 

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.
 

Attachments

  • DS_TTL-232R_CABLES-217672.pdf
    474.4 KB · Views: 114

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.
 

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.
 

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!
 

Attachments

  • Phaserunner_Manual_Rev2.0.pdf
    1.5 MB · Views: 167

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!
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top