timer starts counting without high input

hey all,
i have an arduino uno R3 with d1 robot shield keypad.
i would like the following:
on pin dig 12 i have a hall sensor.
when the hall sensor is high(or their is a magnet near the sensor)
then a stopwatch start counting. if sensor is low,
it stops counting and displays the total high time.
when the sensor is high againt it counts further.
i have made it wit the buttons (this worked) now i change the button
with digi input and the timer STARTS without a high input code:

#include <LiquidCrystal.h>


LiquidCrystal lcd(8, 9, 4, 5, 6, 7);
int h=0;     
int m=0;     
int s=0;     
int ms=0;  
int start=0; 
//defines pin for all buttons
const int start_pin = 12;   

void setup() {
  Serial.begin(9600);
  lcd.begin(16, 2);
 lcd.setCursor(0,0);
}

void loop() {
  start = digitalRead(start_pin); //reading buton state
 if (start==HIGH)
      {
lcd.setCursor(0,0);   //setting start point on lcd 
  lcd.print("TIME:");   //writting TIME
  lcd.print(h);         //writing hours
  lcd.print(":");      
  lcd.print(m);         //writing minutes
  lcd.print(":"); 
  lcd.print(s);         //writing seconds
  ms=ms+10;           
  delay(10); 
   
 if(ms==590)           
  {
   lcd.clear();  //clears LCD
  }
  
 if(ms==590)     //if state for counting up seconds
  { 
  ms=0; 
  s=s+1; 
  }
  
  if(s==60)     //if state for counting up minutes
  { 
  s=0; 
  m=m+1; 
  }

  if(m==60)      //if state for counting up hours
  {  
  m=00; 
  h=h+01;  
  } 
   
  lcd.setCursor(0,1); 
  lcd.print("brandtijd");  

 }   
   
else;
lcd.setCursor(0,0); 
  lcd.print("TIME:"); 
  lcd.print(h); 
  lcd.print(":"); 
  lcd.print(m); 
  lcd.print(":"); 
  lcd.print(s);    
   
  lcd.setCursor(0,1); 
  lcd.print("brandtijd"); 
  return;
     }

(deleted)

and is this what you wanted?
else;

thanks for the tip!(ctrl-t)
i started programming yesterday :wink:

the wiring in attachement

i removed everyting after else...
now it work's
so thanks!!!!
BUt can somebody explain why? (just for learning)

start_pin is defined in code as 12, you are using 3.

You're not using the correct pin according to your wiring diagram

sorry i missed it on the drawing. in reality it's correct.(pin12)
do i still need an extra pull down resistor?(or is it on the pcb of the hall?)

We need to see a schematic of the circuit board.

It appears the device is open collector so try a pull-up on the sensor output pin.

I will try tommorow thanx in advance for the quick reply(s)!
Great support!