can i convert a pin into ground
Can I convert any pin into ground

Any of the digital outputs can be set LOW but there is a limit on how much current they can sink,
This makes this approach unsuitable for most use cases other than charlieplexing LEDs and similar low-current applications.
It would be better to

use any of the other ground connections.

two between Vin and 5V
one between Aref and 13
one on the 2x3-pin ICSP header for the 328
one on the unlabelled 2x3-pin ICSP header for the 16U2
one in the power jack


replace the damaged header using solder-wick and a soldering-iron.
solder a wire from a suitable ground pad on the PCB

e.g. from the ground pad for the 2.1mm power connector.




The ATmega328P data sheet says

Although each I/O port can sink more than the test conditions (20mA at VCC = 5V, 10mA at VCC = 3V) under steady
state conditions (non-transient), the following must be observed:
ATmega328P:
1] The sum of all IOL, for ports C0 - C5, should not exceed 100mA.
2] The sum of all IOL, for ports B0 - B5, D5 - D7, XTAL1, XTAL2 should not exceed 100mA.
3] The sum of all IOL, for ports D0 - D4, should not exceed 100mA.
If IOL exceeds the test condition, VOL may exceed the related specification. Pins are not guaranteed to sink current greater than the listed test condition

So no more than 20mA from or into any single pin over a long time. And no more than a total of 100 mA from or into a group of pins.