Electronic – Is it OK to allow to more than 16mA (say 1A) to flow through Raspberry Pi GND pin

circuit-designelectromagnetismgroundmosfetraspberry pi

I am fairly new to electronics and I'm designing a circuit which has two electromagnets (in my diagram I've used bulb symbols as I couldn't figure out how to represent the resistance of the component using the inductor symbol), but the current flowing from the power pack to the Raspberry Pi's ground is more than 16mA (which I gather is the max current for Raspberry Pi's GPIO pins to output). Is this OK, or will this current damage the Raspberry Pi's GND pins? I am aware there may be some other errors in my circuit; any help would be much appreciated!

Here's the circuit:

schematic

simulate this circuit – Schematic created using CircuitLab

Best Answer

Your circuit is OK except for AM7 which is routing all the return current through the Pi's ground which you do not want to do. AM7 is also short-circuiting M1 so all the magnets / lamps will be on all the time (until the Pi burns out). Remove AM7 and you should be OK.

schematic

simulate this circuit – Schematic created using CircuitLab

Figure 1. Tidied-up schematics.

Make sure that the Pi GND is connected to the 12 V GND but this is just to reference the two power supplies together. Only a tiny current will flow through that ground connection.