USB-to-Serial Adapter - Reading data


I am using this adapter:, connected to a sonar range finder (MaxSonar LV-EZ0) which returns RS-232 data.

Before using the adapter, I was using a standard DB9 wire coupled with an USB wire (you will find enclosed the wiring) and it worked well (no problem reading the ASCII output).

The device is correctly detected by the computer (driver installed), but the data I receive is inconsistent.

Instead of reading the range as follows :

R0006 R0007 R0008 R0009 R0010 R0011 R0012 ...

I get this (some chars are missing, such as these: :

+6V +V +öå +Öå +gV +ggy +g³ ...

So, the “+” seems to match the original “R”, but I don’t how to read the others chars…

Any idea ?




The Pololu USB-to-Serial Adapter communicates with non-inverted TTL signals: LOW means 0, HIGH means 1. This is compatible with most microcontrollers.

The Maxbotix LV-MaxSonar-EZ0 Sonar Range Finder MB1000 uses inverted TTL signals: LOW means 1, HIGH means 0. The voltage levels are not technically RS-232, but since it is inverted you can generally plug it into an RS-232 port and it will work, as in your previous setup. However, you would need an inverter to connect it to the Pololu USB-to-Serial adapter.

There is more information from MaxBotix here:

You might be able to use or but I have not looked into it enough to be sure.


Thanks for the quick reply.

The easiest and cheapest solution would be to use MAX232 inverters then, but I would have preferred a software solution…

Does that mean that I only have to use a NAND gate to make it work ?

edit :

I’ve tried finding a logic to the data received, but it’s just non-sense.

This adapter, as you mentionned, seems to answer my need as it converts the TTL signal (low voltage) to standard RS232 voltage.
What if I try inserting it between the range finder and the USB-to-Serial adapter ? Will it work ?
I might still have to invert the signal afterwards, but I can do it in a code line.

You only need an inverter. It is possible to wire a NAND gate so that it acts like an inverter, and that would work. Another simple way to make an inverter would be to use a pull-up resistor and a transistor.

I checked the voltage thresholds on the Pololu 23201a Serial Adapter and it looks like it will probably work for you. You would not have to invert the signal afterwards.


I recycled a 4011 circuit and used one of its NAND gates. It works perfectly :slight_smile:

Thanks for the help !