nano power problem

If i run a nano from the USB cable and assign an input as pullup then it works fine.

If I use the external Vin at 7v the pullup doesnt workj and the pin stays low.

If I attach the USB and the external 7v it works again but as the pullup pin is being switched quickly (reed switch to earth), it creates a lot of noise on the power lines.

I need to use the external powersupply...

All the earths look good. The nano outputs its 5v and 3v3 so I dont think there is any regulator damage.

Why would the pullup stop working from Vin?

You need to post your program.

What have you connected to the nano?

...R

7 volt sounds like a little bit too less. Or Your 7 volt is discharged.
You can make a test. Connect only the 7 volt to Vin and measure at the 5 volt pin. What do You see?

Appreciate the comments and it made me relook at the cct.

I had a pcb tracking error and one of the pwm outputs was sitting on the +v which messed up the Vin.

Not sure the effect it created but its fixed for now. One to ponder.