Uncontrolled Software Reset

Hello everyone,

I am trying to reset 5 Arduino Pro Minis powered by a 9V block battery each. I am using a single Arduino Uno connected to my usb port for this. I want to reset my Pro Minis exactly 2 seconds apart from each other so I send 5 digital signals at 2 second intervals from my Uno to an Input Pin on each of the Minis. The minis read that signal and if it's true reset via their reset Pin. I run this code on my Uno once in setup and then set the respective Pins Low again.

The problem I get is that my Minis keep resetting themselves continuously instead of doing a single reset. As soon as I connect a Mini to a second USB Port on my computer instead of the block battery it works just fine resetting once (when I press reset on my Uno) and then executing its code. I am using the very same software so I really believe its a hardware problem that's why I won't bore you with the entire code. This is the code running on my uno (the loop stays empty):

#define GW_INTERVAL  1900

#define GW1_PIN 8
#define GW2_PIN 9
#define GW3_PIN 10
#define GW4_PIN 11
#define GW5_PIN 12

unsigned long starttime = 0;



void setup() {
  Serial.begin(115200);
  Serial.println("Starting measurements");
  pinMode(GW1_PIN,OUTPUT);
  pinMode(GW2_PIN,OUTPUT);
  pinMode(GW3_PIN,OUTPUT);
  pinMode(GW4_PIN,OUTPUT);
  pinMode(GW5_PIN,OUTPUT);
  
  digitalWrite(GW1_PIN, LOW);
  digitalWrite(GW2_PIN, LOW);
  digitalWrite(GW3_PIN, LOW);
  digitalWrite(GW4_PIN, LOW);
  digitalWrite(GW5_PIN, LOW);
  
  starttime = millis();
  while((millis()-starttime)<=GW_INTERVALL){
    
  }
  digitalWrite(GW1_PIN, HIGH);
  delay(100);
  digitalWrite(GW1_PIN,LOW);
  Serial.print("GW1:    ");
  Serial.println(millis());
  
  starttime = millis();
  while((millis()-starttime)<=GW_INTERVALL){
    
  }
  digitalWrite(GW2_PIN, HIGH);
  delay(100);
  digitalWrite(GW2_PIN,LOW);
  Serial.print("GW2:    ");
  Serial.println(millis());
  
  starttime = millis();
  while((millis()-starttime)<=GW_INTERVALL){
    
  }
  digitalWrite(GW3_PIN, HIGH);
  delay(100);
  digitalWrite(GW3_PIN,LOW);
  Serial.print("GW3:    ");
  Serial.println(millis());
  starttime = millis();
  while((millis()-starttime)<=GW_INTERVALL){
    
  }
  digitalWrite(GW4_PIN, HIGH);
  delay(100);
  digitalWrite(GW4_PIN,LOW);
  Serial.print("GW4:    ");
  Serial.println(millis());
  starttime = millis();
  while((millis()-starttime)<=GW_INTERVALL){
    
  }
  digitalWrite(GW5_PIN, HIGH);
  delay(100);
  digitalWrite(GW5_PIN,LOW);
  Serial.print("GW5:    ");
  Serial.println(millis());
}

An this is part of my code running on the minis:

void loop()
{
  resetStatus = digitalRead(ask_resetPin);
  Serial.print("ask_resetPin:   ");
  Serial.println(resetStatus);
    if(resetStatus==1){
      delay(100);
      Serial.println("reset");
      digitalWrite(resetPin,LOW);
  /*Serial.println(digitalRead(resetPin));
  delay(50);
  digitalWrite(resetPin,HIGH);
  Serial.println(digitalRead(resetPin));
  delay(50);*/
}

I figured this somehow has to do with the different power supply since that's the only thing I changed. I don't see why it makes a difference if I connect the 9Volt block to the Mini's raw and GND Pin or if I connect the Uno's 5V and GND since the Mini has an internal voltage regulator.

Does anybody know what the problem could be?

All the ground for the power supply need to be connected together (all of them). This will make sure that the 0V reference is identical for all the hardware you have connected.

Thanks a lot it works perfect! I don't quite understand why this is necessary though and I don't really know what to search for to look this up. Do you know any links with explanations?

If the grounds are not connected they are 'floating' with respect to each other. Voltage measurement is always a relative measurement between two points and 0V is just 0V in that circuit (ie, it is never an absolute measure).