0
\$\begingroup\$

I am recently moving from C programming into automation engineering. I have learned about RS232 and TTL standards, and I understand that they are based on the same concept of serial communication, however TTL uses logic voltages (3.3 V or 5.0 V) to be compatible with microcontrollers, while RS232 uses higher voltages for historic reasons (signal-to-noise-enhancement).

To start connecting to the "real world", I planned on using a simple printer to start practicing sending bits via the COM-Port. Here is a link to an example: https://de.aliexpress.com/item/JP-QR203-58mm-Micro-Receipt-Thermal-Printer-RS232-TTL-USB-Panel-Compatible-with-EML203/32693670343.html

This device seems suitable for my needs, however, some questions remain, as I am very eager to learn, but still a newbie in electrical engineering:

The interface is stated as "Serial (RS-232,TTL)" - Is there any way to find out which standard is implemented on the PCB exactly, RS232 or TTL?

Another suitable device seems to be this one here: https://www.amazon.de/WELQUIC-Thermodrucker-Bondrucker-Bluetooth-Standard-Art-1/dp/B075GG7VJT/ref=sr_1_2?ie=UTF8&qid=1533543476&sr=8-2&keywords=welquic+printer

  1. Again, how can I figure out whether RS232 or TTL is implemented?

  2. This device seems to feature a Mini-USB port for USB-communication and another Mini-USB port for RS-232/TTL communication... Which cables would be needed? Is there something like a serial/Mini-USB adapter cable? As I understand, USB standard has to be converted to RS232 or TTL - So my second question basically is, how can there be a port in Mini-USB-format for RS232/TTL?

\$\endgroup\$
2
  • 1
    \$\begingroup\$ The answer is you have to ask the seller and/or buy a test piece. They often describe the things they sell wrongly. Despite what we may tell you, this particular seller may think differently. And the next one, differently again. This is a very common problem. \$\endgroup\$
    – Janka
    Commented Aug 6, 2018 at 8:47
  • \$\begingroup\$ If it is RS-232, there's almost certainly a physical transceiver circuit mounted on the board somewhere. To me, it seems unlikely that a commercial printer would come with TTL/UART levels out. You should be able to read this from their datasheet - if they can't provide one, then don't buy the product. \$\endgroup\$
    – Lundin
    Commented Aug 6, 2018 at 11:00

3 Answers 3

2
\$\begingroup\$

The problem lies in the fact that the data stream as produced and consumed by a UART does not have an official name.

In the 'good old days' the UART data was always send through line drivers* before they came out of the equipment. The connector and the signal levels outside the equipment where formalized in the "RS232" standard.

Nowadays we use a lot of micro controllers en single board computers and the signals out of the "UART" interface are used directly. Which raises problem: how do you call that type of interface?

You will find that the interface is often referred to as "R232-TTL". With which the mean the RS232 data format but with TTL signal levels.

Therefore there is a high probability that the equipment has TTL level signals. But you can only find out for certain after you bought one or talked to the vendor.

To connect such an interface to a standard PC there are USB-RS232 converters/adapters. Yes, they are called as such although they are not conform to the RS232 standard in neither the signal levels nor the connector pin-out. Which proves the point I made above.

*The line drivers also inverted the UART signals which gave raise to more confusion: is the idle state high or low?

\$\endgroup\$
1
  • 1
    \$\begingroup\$ It does have a name Asynchronous NRZ code. UART has fewer syllables. but yeah TTL RS232 is somewhat ambiguous, TTL signals can be distinguished by a RS232 receiver (by deisgn) but they have the wrong sense. (high vs low) \$\endgroup\$ Commented Aug 6, 2018 at 10:44
1
\$\begingroup\$

Main difference between industrial RS-232 and most of simple USB to COM adaptors is the voltage levels. 'True' RS-232 use positive and negative voltage values. USB/COM adaptors are mostly working in TTL levels (which is enough for most of project when you want to communicate between PC and your microprocessor). To ensure about full industrial RS-232 you would need an oscilloscope and confirm negative/positive voltage swing. (You can expect signal levels +/- 15V. Check here section Voltage levels)

enter image description here

Your first printer is well documented, for example here. It uses TTL levels and you can safely connect it to your microprocessor (check if you using 5V as Vcc or 3V3: in case of 3V3 you may need a level shifter).

To confirm second printer, you need a full datasheet, because information on the webpage is confusing. Also, using this connector as COM port is not bringing any clarity. Ask the manufacturer/seller for datasheet.

\$\endgroup\$
0
\$\begingroup\$

it's unclear what the device does

it may support both UART and RS232 voltage levels with a dip-switch or jumper setting to configure them. or it may support a form of RS232 with a reduced voltage swing (0 to +5 instead of -12 to +12 )

Despite 0V being in the "indeterminate" no-mans land most RS232 reveivers will see anything below about 1V as being low.

\$\endgroup\$
2
  • \$\begingroup\$ Thank you all for your valuable input, I learned a lot! I will try to get my hands on the appropriate data sheets. But why is the second device I linked equipped with a Mini-USB port designated "COM"? I thought USB does use a different protocol? What type of cable would fit in there? \$\endgroup\$
    – Xuttuh
    Commented Aug 6, 2018 at 14:16
  • \$\begingroup\$ some makers use USB-shaped connectors for other signals. \$\endgroup\$ Commented Aug 7, 2018 at 22:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.