Strange output using 2 Ultrasonic Rangefinders

I'm trying to use 2 Maxbotix Ultrasonic Rangefinders (LV-EZ1 Maxbotix Ultrasonic Rangefinder - LV-EZ1 [LV-EZ1] : ID 172 : $28.50 : Adafruit Industries, Unique & fun DIY electronics and kits). I've done a decent amount of research on how to chain them and synchronize them to receive the desired output, but I'm getting strange values. Maxbotix has some excellent documentation. I'm following the guides from here: http://www.maxbotix.com/articles/085-pt5.htm#LV. I'm using the "Multiple Sensors Analog Voltage" method, with this layout:

and the following code:

const int anPin1 = A0;
const int anPin2 = A1;
const int triggerPin = 2;
long anVolt1, anVolt2;

void setup() {
  //This opens up a serial connection to shoot the results back to the PC console
  Serial.begin(9600);
  pinMode(triggerPin,OUTPUT);
  delay(200); //Gives time for the sensors to boot and calibrate
}

void start_sensor(){
  digitalWrite(triggerPin,HIGH);
  delay(1);
  digitalWrite(triggerPin,LOW);
}

void read_sensor(){
  //Used to read in the analog voltage output that is being sent by the XL-MaxSonar device.
  //Scale factor is (Vcc/1024) per centimeter. A 5V supply yields ~4.9mV/cm for standard range sensors
  anVolt1 = analogRead(anPin1);
  anVolt2 = analogRead(anPin2);
}

void printall() {
  Serial.print("S1");
  Serial.print("=");
  Serial.print(anVolt1);
  Serial.print("cm");
  Serial.print(" ");
  Serial.print("S2");
  Serial.print("=");
  Serial.print(anVolt2);
  Serial.print("cm");
  Serial.println();
}

void loop () {
  start_sensor();
  read_sensor();
  printall();
  delay(200); // This delay time changes by 100 for every sensor in the chain.  For 4 sensors this will be 400
}

When I run the code, I get the following output:

S1=441cm S2=268cm
S1=433cm S2=421cm
S1=433cm S2=256cm
S1=225cm S2=266cm
S1=433cm S2=256cm
S1=437cm S2=221cm
S1=439cm S2=262cm
S1=433cm S2=266cm
S1=437cm S2=146cm
S1=433cm S2=256cm
S1=441cm S2=263cm
S1=435cm S2=266cm
S1=433cm S2=265cm
S1=433cm S2=262cm
S1=441cm S2=266cm
S1=433cm S2=387cm
S1=436cm S2=266cm
S1=508cm S2=436cm
S1=434cm S2=238cm
S1=433cm S2=192cm
S1=433cm S2=265cm
S1=433cm S2=262cm
S1=508cm S2=256cm
S1=439cm S2=264cm
S1=433cm S2=437cm
S1=433cm S2=437cm
S1=433cm S2=508cm
S1=434cm S2=437cm
S1=439cm S2=508cm
S1=508cm S2=508cm
S1=433cm S2=507cm
S1=433cm S2=507cm
S1=439cm S2=218cm
S1=433cm S2=437cm
S1=443cm S2=270cm
S1=443cm S2=264cm
S1=439cm S2=262cm
S1=433cm S2=147cm
S1=433cm S2=264cm
S1=441cm S2=263cm
S1=439cm S2=270cm
S1=441cm S2=262cm
S1=435cm S2=262cm
S1=508cm S2=339cm
S1=433cm S2=264cm
S1=441cm S2=264cm
S1=437cm S2=32cm
S1=435cm S2=254cm
S1=433cm S2=264cm
S1=508cm S2=266cm
S1=433cm S2=31cm
S1=435cm S2=32cm
S1=433cm S2=32cm
S1=433cm S2=262cm
S1=434cm S2=436cm
S1=437cm S2=415cm
S1=508cm S2=445cm
S1=433cm S2=508cm
S1=437cm S2=507cm
S1=508cm S2=439cm
S1=20cm S2=19cm
S1=18cm S2=17cm
S1=18cm S2=17cm
S1=15cm S2=17cm
S1=17cm S2=18cm
S1=17cm S2=18cm
S1=17cm S2=17cm
S1=18cm S2=16cm
S1=17cm S2=15cm
S1=18cm S2=15cm
S1=18cm S2=17cm
S1=17cm S2=15cm
S1=17cm S2=18cm
S1=20cm S2=20cm
S1=20cm S2=21cm
S1=19cm S2=21cm
S1=19cm S2=21cm
S1=19cm S2=21cm
S1=21cm S2=21cm
S1=21cm S2=21cm
S1=21cm S2=22cm
S1=24cm S2=26cm
S1=26cm S2=28cm
S1=26cm S2=27cm
S1=28cm S2=30cm
S1=29cm S2=29cm
S1=29cm S2=29cm
S1=29cm S2=31cm
S1=30cm S2=29cm
S1=29cm S2=31cm
S1=29cm S2=29cm
S1=253cm S2=254cm
S1=441cm S2=32cm
S1=433cm S2=254cm
S1=447cm S2=437cm
S1=433cm S2=449cm
S1=437cm S2=508cm
S1=508cm S2=439cm
S1=433cm S2=446cm
S1=508cm S2=442cm
S1=437cm S2=447cm
S1=437cm S2=32cm
S1=435cm S2=254cm
S1=437cm S2=31cm
S1=439cm S2=254cm
S1=443cm S2=437cm
S1=435cm S2=508cm
S1=435cm S2=449cm
S1=435cm S2=508cm
S1=445cm S2=508cm
S1=433cm S2=449cm
S1=433cm S2=449cm
S1=437cm S2=508cm
S1=435cm S2=449cm
S1=433cm S2=32cm
S1=433cm S2=254cm
S1=433cm S2=449cm
S1=437cm S2=32cm
S1=434cm S2=31cm
S1=443cm S2=32cm
S1=437cm S2=32cm
S1=433cm S2=31cm
S1=435cm S2=31cm
S1=433cm S2=32cm
S1=441cm S2=32cm
S1=439cm S2=254cm
S1=508cm S2=32cm
S1=435cm S2=32cm

NOTE I put my hand in front of the sensors at one point, those are the values where both sensors read ~17-21cm.

S2 is consistently low, and occasionally jumps all over the place. I've checked many times to make sure I'm connected to the correct pins, I'm not sure what else to try. Any help is greatly appreciated!

the Arduino only has one ADC and this ADC multiplexes the analog ports.
That means a measurement on one can affect the other.

sometimes ignoring one read might help

void read_sensor()
{
  //Used to read in the analog voltage output that is being sent by the XL-MaxSonar device.
  //Scale factor is (Vcc/1024) per centimeter. A 5V supply yields ~4.9mV/cm for standard range sensors
  anVolt1 = analogRead(anPin1);
  anVolt1 = analogRead(anPin1);

  anVolt2 = analogRead(anPin2);
  anVolt2 = analogRead(anPin2);
}

How are you preventing one sensor reading the echoes from the other?

AWOL:
How are you preventing one sensor reading the echoes from the other?

I'm following the documentation here: http://www.maxbotix.com/articles/031.htm and using the exact guide here: http://www.maxbotix.com/articles/085-pt5.htm#LV for "Multiple Sensors Analog Voltage"

robtillaart:
the Arduino only has one ADC and this ADC multiplexes the analog ports.
That means a measurement on one can affect the other.

sometimes ignoring one read might help

void read_sensor()

{
  //Used to read in the analog voltage output that is being sent by the XL-MaxSonar device.
  //Scale factor is (Vcc/1024) per centimeter. A 5V supply yields ~4.9mV/cm for standard range sensors
  anVolt1 = analogRead(anPin1);
  anVolt1 = analogRead(anPin1);

anVolt2 = analogRead(anPin2);
  anVolt2 = analogRead(anPin2);
}

I'm getting even stranger values doing this technique

S1=435cm S2=253cm
S1=441cm S2=442cm
S1=437cm S2=441cm
S1=441cm S2=31cm
S1=441cm S2=31cm
1=439cm S2=31cm
S1=441cm S2=31cm
S1=435cm S2=253cm
S1=441cm S2=442cm
S1=437cm S2=441cm
S1=441cm S2=31cm
S1=441cm S2=31cm
S1=341cm S2=31cm
S1=435cm S2=31cm
S1=435cm S2=31cm
S1=435cm S2=31cm
S1=435cm S2=32cm
S1=436cm S2=31cm
S1=441cm S2=31cm
S1=441cm S2=31cm
S1=439cm S2=32cm
S1=440cm S2=31cm
S1=439cm S2=31cm
S1=435cm S2=31cm
S1=439cm S2=31cm
S1=436cm S2=31cm
S1=438cm S2=31cm
S1=439cm S2=31cm
S1=435cm S2=31cm
S1=435cm S2=31cm
S1=439cm S2=31cm
S1=440cm S2=253cm
S1=437cm S2=439cm
S1=439cm S2=291cm
S1=435cm S2=444cm
S1=437cm S2=438cm
S1=441cm S2=293cm
S1=435cm S2=444cm
S1=439cm S2=440cm
S1=439cm S2=31cm
S1=439cm S2=253cm
S1=435cm S2=446cm
S1=435cm S2=440cm
S1=437cm S2=440cm
S1=438cm S2=445cm
S1=441cm S2=439cm
S1=436cm S2=443cm
S1=440cm S2=289cm
S1=437cm S2=444cm
S1=434cm S2=507cm
S1=439cm S2=446cm
S1=439cm S2=438cm
S1=434cm S2=439cm
S1=434cm S2=439cm
S1=442cm S2=441cm
S1=437cm S2=439cm
S1=435cm S2=442cm
S1=437cm S2=31cm
S1=440cm S2=31cm
S1=437cm S2=31cm
S1=435cm S2=254cm
S1=437cm S2=31cm
S1=437cm S2=266cm
S1=443cm S2=32cm
S1=439cm S2=31cm
S1=443cm S2=31cm
S1=437cm S2=31cm
S1=435cm S2=31cm
S1=443cm S2=31cm
S1=435cm S2=31cm
S1=435cm S2=31cm
S1=439cm S2=31cm
S1=443cm S2=31cm
S1=439cm S2=31cm
S1=437cm S2=31cm
S1=435cm S2=31cm
S1=437cm S2=31cm
S1=435cm S2=31cm
S1=441cm S2=31cm
S1=441cm S2=31cm
S1=434cm S2=254cm
S1=441cm S2=32cm
S1=508cm S2=31cm
S1=443cm S2=31cm
S1=441cm S2=31cm
S1=434cm S2=31cm
S1=435cm S2=31cm
S1=434cm S2=32cm
S1=435cm S2=32cm
S1=435cm S2=31cm
S1=434cm S2=32cm
S1=441cm S2=31cm
S1=434cm S2=31cm
S1=437cm S2=32cm
S1=443cm S2=31cm
S1=434cm S2=31cm
S1=439cm S2=31cm
S1=439cm S2=31cm
S1=439cm S2=31cm
S1=507cm S2=31cm
S1=441cm S2=31cm
S1=435cm S2=31cm
S1=435cm S2=31cm
S1=441cm S2=31cm
S1=437cm S2=31cm
S1=437cm S2=31cm
S1=435cm S2=31cm
S1=437cm S2=31cm
S1=433cm S2=31cm
S1=439cm S2=32cm
S1=436cm S2=32cm
S1=435cm S2=32cm
S1=435cm S2=31cm
S1=441cm S2=31cm
S1=435cm S2=31cm
S1=439cm S2=31cm
S1=441cm S2=32cm
S1=435cm S2=32cm
S1=442cm S2=31cm
S1=434cm S2=253cm
S1=434cm S2=32cm
S1=439cm S2=253cm
S1=376cm S2=441cm
S1=441cm S2=31cm
S1=435cm S2=254cm
S1=439cm S2=31cm
S1=441cm S2=32cm
S1=435cm S2=31cm
S1=435cm S2=30cm
S1=443cm S2=254cm
S1=435cm S2=31cm
S1=438cm S2=31cm
S1=435cm S2=253cm
S1=435cm S2=32cm
S1=435cm S2=30cm
S1=445cm S2=31cm
S1=434cm S2=32cm
S1=444cm S2=31cm
S1=439cm S2=254cm
S1=441cm S2=31cm
S1=439cm S2=253cm
S1=435cm S2=441cm
S1=434cm S2=31cm
S1=443cm S2=31cm
S1=435cm S2=31cm
S1=437cm S2=31cm
S1=439cm S2=254cm
S1=437cm S2=31cm
S1=435cm S2=31cm
S1=441cm S2=32cm
S1=435cm S2=31cm
S1=270cm S2=31cm
S1=443cm S2=31cm
S1=441cm S2=31cm
S1=441cm S2=31cm
S1=441cm S2=31cm
S1=438cm S2=253cm
S1=435cm S2=31cm
S1=437cm S2=31cm
S1=436cm S2=31cm
S1=439cm S2=31cm
S1=435cm S2=254cm
S1=442cm S2=381cm
S1=436cm S2=445cm
S1=434cm S2=442cm
S1=442cm S2=440cm
S1=435cm S2=32cm
S1=435cm S2=253cm
S1=434cm S2=441cm
S1=434cm S2=32cm
S1=435cm S2=31cm
S1=435cm S2=32cm

just to test, can reverse them? (might give an indication of what's happening)

void read_sensor()
{
  //Used to read in the analog voltage output that is being sent by the XL-MaxSonar device.
  //Scale factor is (Vcc/1024) per centimeter. A 5V supply yields ~4.9mV/cm for standard range sensors
  anVolt2 = analogRead(anPin2);
  anVolt2 = analogRead(anPin2);

  anVolt1 = analogRead(anPin1);
  anVolt1 = analogRead(anPin1);
}

What happens if you read only one?