Project - testing a USB2.0/RS232 cable with Arduino Mega

Hello,
I would like to do a project using the Arduino Mega. I would like to be able to test a USB to RS232 cable that has a FTDI embedded. I was thinking of sending a USB message like "HELLO" from the Arduino Mega to the cable and retrieving the message through a UART port on the Arduino Mega. I was thinking of using the usb host shield 2.0.

I would like to have your opinion on the feasibility and if it is feasible, does anyone already have something like this or is there an example code that I can use as a basis?

Thank you in advance for your help.

I doubt that RS232 can be connected to any pins on a Mega. Use an RS232 to TTL converter.

RS232 is +12volts/-12volts
You will need an RS232 interface.

Search for tutorials videos etc

When you’ve done that , it’s a matter of connecting Tx to Rx at the far end . Send something from the Arduino and it should just come straight back - if it does , leads ok

Do you have a multimeter? You can tell the voltage range if you measure the voltage of TX against ground, what voltage do you get? The term RS232 has been used very loosely by many who should have known more. That adapter you have may not have the +-12V @dave-in-nj mentioned because is may not even be RS232. Do yourself a favor, measure the voltage.

OK now.

Firstly, why do you want to do this?

Next, give the Web link for the cable/ adapter that is in question.

Without knowing precisely what it is, we are not in a position to assess the situation.

Hello,

Thank you all for your answers.
I'm going to give a little more detail to what I want to do.
I have some USB-->TTL-232R-3V3 cables and I would like to test them with an Arduino Mega. To do this, I was thinking of sending a message through the USB Host shield 2.0 module to the USB connector. The latter is equipped with a FTDI and will therefore convert the signal to RS232 and I would like to retrieve the message using the UART device of the Arduino Mega.

I would like to send you a block diagram of what I want to do but I can't attach a document.

Thank you in advance.

As I suspected, folks, don't be too serious about voltage levels until they've measured it. No idea why OP wants to build a Rube Goldberg machine just to test a cheap cable.

...

People just walk off the topic and never return. This could be an example of such behavior. Is there any means to curb such thing?

Yes, that does happen. Mind you, you cannot expect everyone to treat this as seriously as you or I do, :face_with_raised_eyebrow:

It is also possible that they "have a life" other than engineering and other pursuits prevent them from getting back to the forum within a day or two.

It isn't something you can "fix". It would be grossly unfair to delete a thread containing serious work from the more knowledgeable contributors (such as yourself :grin:) .

Serious troublemakers will be deleted (hopefully) and it is unlikely anyone will reply to them in a way that would be worth saving. The point is that if the search function does its job, others may later find useful assistance from replies to a "one time wonder" or "hit and run" poster.

To my knowledge, a FTDI chip does not convert to RS232 but to serial.

Thanks for your feedback.

So here is the link for the cable:

Thank you in advance for your help.


OK, now that cable has nothing whatsoever to do with RS-232.

And it is ridiculously expensive, but that should not worry me, it's your problem. :roll_eyes:

The "232" refers to the FTDI chip which can be used to implement RS-232 - if you pair it with an RS-232 interface chip or other circuit.

But we still want to know why you are so keen on testing it? A simple way is to connect two of them together, ground to ground, TX to RX and vice versa, and open two instances of a terminal program (such as the "serial monitor" in the IDE) and type messages from one to the other. :+1:

This is a free forum. ALL help is volenteer. So if you want to hire someone you would expect to check their abilities.

When taking on work all reputable people will evaluate the project and define what they can do.

When a possible client cannot provide correct information one has to look at the project and decide if asking multiple questions and getting vague or partial answers is worth getting involved.

Searh for X/Y Problem

Then ask yourself if you could have cut all the waisted time by posting the link and stated you need to test the cable.

The need not your desire.

I want to make a stand-alone test box for this kind of cable. When I say standalone, I mean not needing to connect the arduino to a computer or any terminal. As already explained earlier, I want to send a message through the usb host shield 2.0. The message goes through the cable and back to the UART of the Arduino and I compare the message sent and received. If the two messages are identical, I light a green LED to indicate that they are working properly or a red LED to indicate that the cable is not working.

OP, can you or will you read these suggestions and provide responses?! @Paul_B provided a reasonable suggestion and you should respond to that. That's basic internet courtesy.

If you plug in devices, you can test the cable under normal circumstances.

Your desire for a thing and a need are two different conditions.

By now you should know what is needed to generate a signal and you should know what is needed to receive said signals.

Your task is to create the signal generator
And to create the signal receiver.

First question is if the signals can be gerated by an arduino.
And then how.

Thank you for this clarification which helps me to understand better.
The reason why I want to test these cables is simply that an association came to see me and asked me to test 100 cables of this type. So, yes, your proposal to test with terminals can be interesting. As a beginner on Arduino, I would have liked to make an autonomous test box that shows me with a red and green help if the cables are good or not, without going through a computer. It would facilitate the test of 100 cables and make me progress in my Arduino knowledge.

Indeed, I agree with your approach. But it seems to me that the essence of my question is this. Perhaps I have made my request more explicit.