RC Servo mystery

some servos work some don’t ? how to troubleshoot further?
this is my first Arduino project and all seemed good till near the end.
I can’t figure out why Power HD-1705MG servos don’t work when they did earlier / prior to adding counter, display & delay adjust pot.
I’ve consistently powered set-up with 4 AA cells = 5.6V + when fresh. Although I’ve tried regulated 5V as well.

Futaba Servos work as with attached sketch even with 4.5V. The HD-1705 is very fast and more desirable.[ 0.06 sec 60° ]

I bought a Gadget Gangster gadgetgangster.com as another basis for testing servos … same result Futaba good HD-1705MG no good.
I bought two more HD-1705MG just to be sure I hadn’t fried* both when experimenting with power supply options.
… none of my 4 HD servos work with Arduino or 555 based driver.

*I think i cooked one Futaba servo and one HD servo experimenting powering them with 9V battery sharing negative & powering Ardweeney thru LM2940-5.0 positive. Servo electronics don’t like voltage in excess.

With one servo,Max7219, 2-seven seg LEDs, Ardweeney I was hoping for simple single power supply.
either regulated 6V wall wart or 4-cells.
any suggestions will be most appreciated

/*two position servo for rat trap with 2 digit display
pot adjusted delay on scale of 1 to 9 displayed when adjustment made
otherwise display count of IR triggered actions / negate leading zero
*/

#include <Servo.h>
#define SENSOR 5
#define servopause 600 // this value sets loop pause = time delay before triggering servo
int sensorPin = A0; // select the input pin for the potentiometer
int pot = 4; // current potentiometer value
int lastpot=0; // last potentiometer reading to compair with
int IRvalue = 0; // start out LOW
Servo myservo; // create servo object
int count=0; // reset count on re-start
//display digital value on multiple segments with MAX7219
#include “LedControl.h”
LedControl lc=LedControl(12,11,10,1);

void setup()
{
lc.shutdown(0,false); // typ led control “lc.action
/* Set the brightness to a medium values /
lc.setIntensity(0,8);
/
and clear the display /
lc.clearDisplay(0);
pinMode (12 , OUTPUT); // “count” LED
pinMode (2 , OUTPUT); // “sensor active” LED
myservo.attach(9); // attaches the servo on pin 9 to the servo object
myservo.writeMicroseconds(600);// assure servo starts in correct position
//Serial.begin(9600);// used to see actual SENSOR & count values when troubleshooting
}
void loop()
{
delay(pot
servopause); // primary heartbeat adjusted

IRvalue = analogRead (SENSOR)/100;// look at sensor
// light up led(2) when sensor is triggered / invert sensor output
if (IRvalue < 3){ // sensor normally higher than 5
digitalWrite(2,HIGH); // TRIGGERED
}
else{
digitalWrite(2,LOW); // NOT TRIGGERED
}
if (IRvalue < 3) { //sensor output went low TRIGGERED
delay(potservopause);
digitalWrite(2,LOW); // erase trigger signal
count=count+1;
myservo.writeMicroseconds(3400); // tell servo to go to active position in’
delay(1200); // wait for the servo to reach the position
myservo.writeMicroseconds(600); // tell servo to return to passive position
delay(1600); // take a rest, let em fall
}
//servo action above ^^^^^^
// display function below VVVVVVVV
// read the value from potentiometer scale adjustment from 1 to 9
pot = map(analogRead(sensorPin), 0,1023, 1,9); // pot will be between 0…50
// avoid 0 to insure delay is > 0
if(pot != lastpot) {
lc.clearDisplay(0);// clear display
lc.setRow(0,1,B0111101);
lc.setChar(0,0,pot,false);
delay(800);
lc.clearDisplay(0);// clear display
delay(300);
lc.setRow(0,1,B0111101);
lc.setChar(0,0,pot,false);
delay(800);
(lastpot = pot); // set value before next comapare (pot != lastpot)
delay(800);
}
if (count == 0){
printNumber(0);
}
else{
printNumber(count);
}
}
/

Serial.print(count); counting display function with MAX7219 driver
extract from 7 segment number display example
http://www.arduino.cc/playground/Main/LedControl#SetupDefault
*/

void printNumber(int v)
{
int ones;
int tens;
int hundreds;
boolean negative;

if(v < 0 || v > 99)
return;
if(v<0) {
negative=true;
v=v*-1;
}
ones=v%10;
v=v/10;
tens=v%10;
v=v/10;
// hundreds=v;
if (tens ==0){
lc.setChar(0,1,’ ',false); // avoid leading zero power
}else
{
lc.setDigit(0,1,(byte)tens,false);
}
lc.setDigit(0,0,(byte)ones,false);
}

I would imagine it's because you're writing invalid positions to the servo? The RC servo "standard" is 1ms to 2ms: your two values are 0.6ms and 3.4ms. While some servos will treat out-of-range values as valid (and go to the maxima), others will not.

Below is some simple servo test code you can use to see if you have bad servos/wiring, etc.

// zoomkat 10-4-10 serial servo test
// type servo position 0 to 180 in serial monitor
// for writeMicroseconds, use a value like 1500
// for IDE 0019 and later
// Powering a servo from the arduino usually DOES NOT WORK.

String readString;
#include <Servo.h> 
Servo myservo;  // create servo object to control a servo 

void setup() {
  Serial.begin(9600);
  myservo.writeMicroseconds(2000); //set initial servo position if desired
  myservo.attach(7);  //the pin for the servo control 
  Serial.println("servo-test-21"); // so I can keep track of what is loaded
}

void loop() {

  while (Serial.available()) {
    delay(1);  
    if (Serial.available() >0) {
      char c = Serial.read();  //gets one byte from serial buffer
      readString += c; //makes the string readString
    } 
  }

  if (readString.length() >0) {
    Serial.println(readString);  //so you can see the captured string 
    int n;
    char carray[6]; //converting string to number
    readString.toCharArray(carray, sizeof(carray));
    n = atoi(carray); 
    myservo.writeMicroseconds(n); // for microseconds
    //myservo.write(n); //for degees 0-180
    readString="";
  } 
}

Yes! :) the larger 3600 microsecond value caused an overload , I don't understand why this condition cropped up as many of my earlier tests used that number without problems. The Power HD 1705 will rotate nearly 170° with a max setting 2300 microseconds. It didn't seem to change below 500 so I left it there.