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.

Inverting RS232 Signal?

Status
Not open for further replies.

jeff77789

Junior Member level 1
Joined
Feb 23, 2013
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,427
I have a Maxbotix MB1030 ultrasonic sensor, in which it gives out a "Tx" digital signal which is:

When the *BW is open or held low, the TX output delivers
asynchronous serial with an RS232 format, except voltages are 0-Vcc.
The output is an ASCII capital “R”, followed by three ASCII character
digits representing the range in inches up to a maximum of 255,
followed by a carriage return (ASCII 13). The baud rate is 9600, 8
bits, no parity, with one stop bit. Although the voltage of 0-Vcc is
outside the RS232 standard, most RS232 devices have sufficient
margin to read 0-Vcc serial data. If standard voltage level RS232 is
desired, invert, and connect an RS232 converter such as a MAX232.
When BW pin is held high the TX output sends a single pulse, suitable
for low noise chaining. (no serial data).


it mentions that the signal is inverted and you can use something such as a MAX232 to invert the signal...first of all i don't even know where to get one of those converters
if i wanted my arduino to read this signal, what can i do to invert the RS232 signal?
 

To connect the output to the UART pin of a processor, a basic inverter gate (e.g. 74HC04) would be a simple solution.
 
  • Like
Reactions: tpetar

    tpetar

    Points: 2
    Helpful Answer Positive Rating
If standard voltage level RS232 is
desired, invert, and connect an RS232 converter such as a MAX232.
When BW pin is held high the TX output sends a single pulse, suitable
for low noise chaining. (no serial data).

Since you want to connect the output of the sensor to an Arduino, you don't want standard RS232 voltage levels (that would damage the Arduino), you want TTL levels which is what the sensor already outputs. Just connect the TX pin on the sensor to the RX pin on the Arduino (also making sure the GNDs are connected together) and you should be good to go.
 

Since you want to connect the output of the sensor to an Arduino, you don't want standard RS232 voltage levels (that would damage the Arduino), you want TTL levels which is what the sensor already outputs. Just connect the TX pin on the sensor to the RX pin on the Arduino (also making sure the GNDs are connected together) and you should be good to go.

basically it is an inverted ttl signal?
 

basically it is an inverted ttl signal?

Well, it depends what you mean, but the TTL signal coming from the sensor is not "inverted" (inverted is a tricky word because it totally depends on the context it's used in). The quote you posted says that if you want to convert the voltage level from TTL to RS232, then you should invert the signal and run it through a MAX232 IC.
 

you should invert the signal and run it through a MAX232 IC.

wait you have to invert it, then the max232 inverts it again? sorry im just really confused

- - - Updated - - -

you should invert the signal and run it through a MAX232 IC.

wait you have to invert it, then the max232 inverts it again? sorry im just really confused
 

Here's a really good explanation of this: https://www.sparkfun.com/tutorials/215

If you want to connect the sensor to an Arduino, just connect the TX pin on the sensor to the RX pin on the Arduino and make sure the GNDs are connected together.

If you want to connect the sensor to a PC, or some other device that operates at RS232 signal levels, then you will need to put a MAX232 (or similar) IC in between the sensor and device.

Make sense?
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top