Two sound sensors getting weird readings?

So I’m trying to make a sound following robot, but I’m getting weird readings from my sensors…

I’m using a DFRobotShop Rover, NOT an UNO, I just couldnt find a good picture of the rover from above.

This is my first post here so I’m sorry if the format is incorrect.

My code:

int Multiplier = 8;
int AnalogMax = 1023;

void setup() {
pinMode(5, OUTPUT);
pinMode(6, OUTPUT);
pinMode(7, OUTPUT);
pinMode(8, OUTPUT);

Serial.begin(9600);

}

void loop() {

int LeftEarBeta = analogRead(A2);
int RightEarBeta = analogRead(A3);
int LeftEar = (LeftEarBetaMultiplier);
int RightEar = (RightEarBeta
Multiplier);

if(LeftEar>AnalogMax){
LeftEar=AnalogMax;
}
if(RightEar>AnalogMax){
RightEar=AnalogMax;
}
Serial.print(LeftEar);
Serial.print(" ");
Serial.println(RightEar);
digitalWrite(7, HIGH);
digitalWrite(8, HIGH);
analogWrite(5, LeftEar);
analogWrite(6, RightEar);
delay(20);

}

The multiplier int is just to make the motors more sensitive, but even if I set it at 1, the left mic is still picking up a constant signal of around 280?
What have I done wrong?

Numbers.jpg

You should not put a 10k resistor on the power supply pin. Just hook it to +5volts

All mics are not equal. You may need to calibrate them , and use different multipliers.

Ok so I wired a couple things a little better, electrical taped a couple things, took the resistors off, and now I'm just getting random readings from both sensors.

OK, are these mics putting out AC signals? If you are trying to read the AC signals you will get readings all over the place. If it is AC, then you will want to put in a diode (schottky) and a capacitor. to give you a rectified signal. You may also need a high resister parallel with the capacitor to bleed off voltage (2meg maybe).

DFRobotshop Rover with a duemilanove controller

Two zxsound inex sound sensors

The sound sensors are supposed to just work with the 5v signal. It works perfectly if I try to use only one sensor, but messes up once I hook up the other sensor

Yes, that sensor should be putting out 0 - 5v depending on the audio level. Ok, lets name the two sensors A and B.

  1. The arduino senses a good signal if only A is hooked up?
  2. The arduino senses a good signal if only B is hooked up?
  3. How about if A and B are both hooked up, but your sketch only reads from A ?
  4. It messes up if both A and B are hooked up and arduino is reading both? What readings (raw, without multipliers) do you get from these different setups?