I have a neat little circuit with which I am powering an electromagnet. Below is the schematic for the PCB I created. The positive lead of the electromagnet is connected to 12vdc and the negative lead of the electromagnet is connected to the MAGNET GROUND on the schematic (which is connected to real GND via the Darlington Transistor). The issue I have run into is that when I use a 12vdc plug-in voltage supply, the circuit works perfectly. However, when using a 12v battery (200Ah so the 300mA the magnet draws is not an issue) the output pulses, creating a high pitched whine from the electromagnet. I have determined the source of the pulse to be the 220 uF capacitor as the circuit does not whine when it is removed, but I am unsure why there is a difference between the plug-in supply and the battery.
I have determined the cause of the output pulses to be insufficient base current to the Darlington transistor. The reason for the difference in voltage supply and battery seems to be how they act under a load. The voltage supply will maintain a constant 12 vdc no matter the current, while a battery under load will give off ~11.85 vdc. Decreasing the 10k resistor going into the base of the Darlington transistor solved the issue.