Pin #4 could connect to the 5V pin on the Mega and you might also need a wire from #1 to GND on the Mega as well as GND of the power supply but the circuit could be using the PWM line as the ground return so try it without first. Does the manual say how much current pin #4 draws as it may be to much for the Mega 5V regulator.