Autonomo with maxbotix ultrasonic range finder not working on serial

HI,
I am using a maxbotix MB7360 ultrasonic range sensor with the autonomo connected to Serial (RX/TX) however i am unable to receive any serial data from the sensor. The Sensor puts out an RS232 data format with 0 to Vcc levels. It works if i use an arduino (3.3 or 5v) using software serial and the setup line;

//define serial port for receiving data from range sensor
SoftwareSerial sonar(5, -1, true);   

sample code to access sensor with autonomo;
//Initialise the serial connection to the range sensor
Serial.begin(9600); //RX/TX

  while (!Serial.available());
  inChar = (char)Serial.read();
  //wait for the initial 'R' character that proceeds the data
  while (inChar != 'R') {
    inChar = (char)Serial.read();
    SerialUSB.println(inChar);
  }

As i understand it there is no way to use software serial on the autonomo so i have to use one of the hardware ports to receive the serial data from the sensor so i assume that the problem is that i need to have a level shifter if i want to use the sensor on the hardware serial port - is this correct or is there a work-around for this issue.

Any help is much appreciated.

Which module are you using MB7360 RS232 or the MB7380 TTL?

The RS232 output is not between 0 and VCC, that would be the TTL module. As far as I am aware, you cannot directly connect RS232 output to any of these boards due to the signal voltage levels. You will likely damage the board if you do not use a converter.

https://www.sparkfun.com/tutorials/215

Hi Gabriel,
I am using the MB7360 RS232 the data sheet says output is 0 - Vcc (page 3 - pin5 serial output). It is powered from 3.3v (from an I/O pin on the board) so i assume levels are 0 - 3.3v.It runs perfectly from the Mbili board using software serial with the setup line;

SoftwareSerial sonar(5, -1, true);

if i do not use the true option it does not work. Does this imply that the RS232 coming from the sensor is inverted compared to normal and if so is this why the hardware serial port on the autonomo cant read it and is there a software work-around or is a level shifter/inverter the only option.

Any help is much appreciated.

Cheers.

The issue here is that you are trying to use an RS232 device with a TTL UART.
The output of the MB7360 is not 0…VCC, it is RS232 levels which are VCC…-VCC.

With RS232 the levels are inverted and span a +/-VCC range. I believe you are getting away with this using SoftwareSerial and inverted logic (the third parameter), however, the -VCC is outside the the safe input voltage range for the IO pins.