Go Down

Topic: difference between USB TTL adapter and UNO Clone (Read 723 times) previous topic - next topic

CarstenE

At first my english could be much better, but I'm sorry, it isnt.

If got a problem with the communication between a commerciel software on my computer and an Arduino Mega ( Clone).

My constellation:

 ports of mega:
Serial is connectet  to computer for the debugging messages of the Nextion TFT.
Serial1 is connected to the Nextion Display,
Serial2 is connected to a UNO (RX- RX / TX-TX  reset Pin to Ground) and with USB cable to the computer
Serial3 is connectet to a USB TTL adapter (RX-TX/ TX-RX) stuck in my computer.

the software on my computer transmits and recieves strings to Serial2  and other strings to Serial3.

In this constellation everything works fine.

Now I want to change the UNO to another USB TTL adapter.
I tried different one with multiple chips on.  At least I diceded to take the one with the CH340 wich would be the same as the UNO.
But the communication between the software and the mega does not work.
The adapter works fine (tested with a bridge on RX TX and the Arduino serial monitor).

Now my question:

what could be the difference in the behavior of the UNO (used as adapter) and the USB TTL adapter? Why does the software accept the uno, but not the adapter?

I checked everything twenty times. There must be a little difference I didnt know.
Could it be something with the reset pin on the uno. How can I transmit this behavior to the adapter?


Thanks a lot.

Juraj

I am not sure if I understand everything in your post, but if you want to abuse the Uno as Serial-to-TTL adapter the sketch in ATmega328p must not have Serial.begin
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

CarstenE

No,

its just the other way.

the hole thing is working with the abused uno.

Now I want to replace the uno with an normal USB TTL converter, to simplify the hardware.

But the software on computer does not 'speak' to it like to the Uno (I see the RX LED blinking). The TTL adapter keeps beeing dark.

Juraj

No,

its just the other way.

the hole thing is working with the abused uno.

Now I want to replace the uno with an normal USB TTL converter, to simplify the hardware.

But the software on computer does not 'speak' to it like to the Uno (I see the RX LED blinking). The TTL adapter keeps beeing dark.
the adapter has CH340? did you install the driver?
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

CarstenE

Yes. It has CH340. Driver is installed. It seems to work ( I tested it by connecting RX and TX, and send some lines with the Serielmonitor in the Arduino IDE)


The only question is, there must be a little difference in the behavior, so that the software can divide between the uno and the adapter.

Robin2

The only question is, there must be a little difference in the behavior, so that the software can divide between the uno and the adapter.
With your Uno on Serial2 you connect Rx to Rx but with your USB-TTL on Serial3 you connect Rx to Tx. If you replace the Uno with a USB-TTL adapter it must be connected Rx to Tx like on Serial3

Have you tried the USB-TTL adapter that you want to use on Serial2 in place of the adapter on Serial3?

If that does not solve the problem then you need to draw a simple diagram that clearlt labels all the connections in the working system and in the non-working system. Then post a photo of the diagram - see this  Simple Image Guide


...R
Two or three hours spent thinking and reading documentation solves most programming problems.

CarstenE

#6
Jan 18, 2019, 02:10 pm Last Edit: Jan 18, 2019, 04:44 pm by CarstenE
I did all the things you suggested.

but it isnt working. The RX Led doesnt show any transmission if the adapter is connected


CarstenE

#7
Jan 18, 2019, 02:22 pm Last Edit: Jan 18, 2019, 04:46 pm by CarstenE
See some posts forward.

Juraj

I did all the things you suggested.

but it isnt working. The RX Led doesnt show any transmission if the adapter is connected


and swapping the adapters?
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

CarstenE

the adapter that is connected to serial2 gets no connection to the computer. I does not matter which one I use. ( I also changed the comports in the Sotware so that the address is correct)

Juraj

the adapter that is connected to serial2 gets no connection to the computer. I does not matter which one I use. ( I also changed the comports in the Sotware so that the address is correct)
then it could be anything. try to swap the cables, the USB ports, ...
You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

CarstenE

I think I tested every possibility of change. Always the same result.

The software detects that there is no arduino at the choosen com port and does not work.


Funny.




Juraj

#12
Jan 18, 2019, 03:22 pm Last Edit: Jan 18, 2019, 03:22 pm by Juraj
I think I tested every possibility of change. Always the same result.

The software detects that there is no arduino at the choosen com port and does not work.

Funny.

there is no Arduino. only the USB adapter.

so it is still Serial2 not working with any wire, adapter, cable, USB socket?

You can't write an Arduino sketch if you didn't learn programming. Not the language, but the concepts of programming - algorithms and data types.

CarstenE

No. the picture shows that it is working, if the adapter is an uno.

Robin2

Sorry. First time. wrong rotation.
It is still wrong  :)

the adapter that is connected to serial2 gets no connection to the computer. I does not matter which one I use. ( I also changed the comports in the Sotware so that the address is correct)
Have you tried what I suggested - to check if the "new" adapter works with Serial3 ?

Have you tried changing the order in which you connect the USB devices? On Linux the order of connection determines the serial port names on the PC. And don't expect the USB TTL adapter to appear as the same COM port as the Uno.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

Go Up