Maxbotix MB1030 R232 serial connection to arduino

Okay here is the thing, i am trying to use the Rx pin on the maxbotix ultrasonic sensor because it sends digital and that is the only type of signal that small & cheap rf transmitters can transmit (i am trying to transmit the signal wirelessly to a range of 20ft) now, it says:

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).

i dont understand:

  1. what does an "asynchronous serial with rs232" mean?
  2. it says to invert the signal but i have no idea what i should do for that
  3. how would the stop bit affect the program?

i want a pure software approach to this and i am sure there is but the non-standard voltages and the inverted signal is killing me. i cannot get any hardware such as a MAX232

is there any example programs that i can go off of?

thanks everybody in advance

in a nutshell its spitting out ttl level serial, just what the arduino wants

if you were sending it to a PC you would have to invert the 1's and 0's and step up the voltage (where the max232, which the TI clone cost 86 cents btw, would do it for you if properly hooked up)

isnt it an inverted ttl signal?

Hello! This is Tom Bonar from MaxBotix Inc.

I saw your forum post, and would like to give some assistance regarding your technical questions.

You asked in your forum post what asynchronous serial with RS232 means. Wikipedia, has a good definition on this term. Please read the following exert from Wikipedia. Asynchronous serial communication describes a serial communication protocol in which a start signal is sent prior to each byte, character or code word and a stop signal is sent after each code word, so as to make the communication asynchronous. The start signal serves to prepare the receiving mechanism for the reception and registration of a symbol and the stop signal serves to bring the receiving mechanism to rest in preparation for the reception of the next symbol.

RS232 means that the signal sent from the sensor is held low (0) when no signal is being sent, and brought high (typically 12V, but in the case of our sensors Vcc) when signal is being sent.

In your forum post you also asked "it says to invert the signal, but I have no idea what I should do for that"?

A computers DB9 port by default will read RS232 signal using software such as HyperTerminal. Some microcontrollers will require an inverter to read the signal, this is because they may only accept a TTL serial input.

To invert an RS232 signal to TTL, a component such as a Max232. Using this device, will allow the sensor to be read by a component that is only able to have TTL input into the component.

Finally, you stated "I want a pure software approach to this and I am sure there is, but the non-standard voltages and the inverted signal are killing me."

After a quick search on google, I have found the following forum "Reading serial data from MaxSonar ultrasonic rangefinder". This was written for Arduino, while using the RS232 output of our sensor. Please be aware, we haven't tested this code, but none the less should be beneficial for you.

Please let me know if you have any questions.

Best regards,

Tom Bonar Technical Support of MaxBotix Inc. Email: Web: