button issues and power issues

OK I have an UNO controlling a servo using just digital signals, I have 2 issues , With the button to start the loop either using a High INPUT_PULLUP or using a Pulldown resistor Or LOW waiting on a high signal the arduino kicks off a random signal I believe when other devices in the office kick on or off as in Power drops or surges from the wall,
I do not have the switched debounced but the random arduino output happens even if the button has been sitting idle for an hour in a while Loop. has anyone had these issues? will debouncing help? If debouncing will help how can I loop until the button has been pressed and the millis delay as been met.
run through the loop and wait (LOOP) again untill the button has been pressed again, Keep in mind this is a machine that can hurt a persona and I want a concrete way of using the button so there will be no false triggers or if power fluctuates it will not trigger arduino. My though is to require a 5 volt signal in a pin Via a button the arduino reads it and makes the program loop one time, But the only way I know how is to use a pulldown resistor and add 5 volts with button , With that setup I still get random operation due to power or Noise

Do not cross-post. Other thread removed.

Sorry and thanks for kicking it in the correct location Noob here

I have edited your Post to make it easier to read. For the future please don't write everything as one long stream of text.

OK I have an UNO controlling a servo using just digital signals, I have 2 issues ,

With the button to start the loop either using a High INPUT_PULLUP or using a Pulldown resistor Or LOW waiting on a high signal the arduino kicks off a random signal

I believe when other devices in the office kick on or off as in Power drops or surges from the wall,

I do not have the switched debounced but the random arduino output happens even if the button has been sitting idle for an hour in a while Loop.

has anyone had these issues? will debouncing help?

If debouncing will help how can I loop until the button has been pressed and the millis delay as been met. run through the loop and wait (LOOP) again untill the button has been pressed again,

Keep in mind this is a machine that can hurt a persona and I want a concrete way of using the button so there will be no false triggers or if power fluctuates it will not trigger arduino.

My though is to require a 5 volt signal in a pin Via a button the arduino reads it and makes the program loop one time,

But the only way I know how is to use a pulldown resistor and add 5 volts with button , With that setup I still get random operation due to power or Noise

...R

First thing - most important. If there is a risk of injury due to a malfunction make sure to test your system thoroughly in a safe environment BEFORE it is deployed.

What is the project that can cause injury?

Without seeing your program it is impossible to say much. For example I don't know if you have code in your program that allows you to know if the difficulties in the power supply are causing your Arduino to reset.

Also post a clear diagram showing how you have everything connected.

If the power supply really is the problem then the solution is probably to isolate the Arduino from the power supply - perhaps by running it from a battery that is recharged from the power supply.

...R

If you have a power supply issue causing problems with the buttons, you have to fix that, as it can just as well cause problems with the processor - which can range from simple freezing to resetting and unexpected behaviour. All of which can do serious damage depending on your system.

If you have long wires to the buttons, the problems may be caused by electrical interference. A small cap in parallel to the button can do wonders (it also helps debouncing), as can do a stronger pull-up (instead of the internal ones, around 30k, try 10k or even values down to 1k).