I have a strange issue where the external pin headers do not align on one side when inserted on my Arduino Mega 2560. Due to this issue, shields do not work properly if stacked on top of the external pin headers. A screenshot of the misaligned pin headers is shown below.
If I swap the two pin headers around, the issue still persists as seen in the second image below. Could this problem simply be caused by poor build quality of the board?
Hard to see in the photos, are you referring to the header being bent slightly off to one side? If so, you should be able to carefully bend it back in position.
I see you are referring to the header pins inserting farther into one header than the other.
Does a shield make good contact when placed on the Mega? The difference in depth may not make a difference.
Try inserting the pin headers fully onto the shield, then plugging that into the Mega.
If all else fails, since the pin headers sit well above the headers on the Mega, you could clip the pins on the pin headers a bit shorter on the ones that sit too high, so that they are all even. Are you using the headers solely to elevate the shield, or is there some other purpose?
The LCD shield touches the USB B port and the power port without pin headers. I also occasionally use to support my Arduino Nano to make it easier to remove from the breadboard without bending the pins. Below is the image of the pin headers fully pushed into my breadboard.
Looks like a bit of a quality issue with the Mega, where one of the headers is from a different manufacturer or for some other reason is made a bit differently.
Have you tried inserting the headers on the shield first, then onto the Mega? The short pins on the shield may have problems making contact on the lower pin header, but if it is inserted fully on the shield it may still make good contact on the Mega header because of the length of the pins.
I have just tried your method. It didn't fix the issue since the shield would still malfunction. However, at least I know the cause of the problem. It looks like that I'll need to use a different set of pin headers specifically for my Arduino Mega 2560.