Protecting arduino GND

Hi team!
Making an LED grow lamp for my peppers. The LEDs are 3W each, in blocks of 3 wired in series, with a 5W (overkill much?) 5,6Ohm resistor, a total of 26 of these blocks, for a grand total of 234W of POWAH (got a 12V brick capable of delivering 21A for the purpose of driving the LEDs). Now these blocks are spread into 10 groups, so I can vary the light intensity and wavelength (the blocks consist of either 3 white, or 3 blue, or 3 red LEDs of particular wavelengths). The plan is to turn on or off a particular number of these blocks. For this purpose I have picked up some transistors (60V 3A), which should be enough to handle the 1.8A (actually less due to the resistors). All this contraption is expected to also produce some heat, so I have a few cooling fans which will also be switched on via transistors, and some indication LEDs in parallel. All this business is running on 12V (but two separate supples). All this insanity will be controlled by the glorious Arduino! Actually a “Arduino-on-a-breadboard” type contraption with Atmega328…
Now comes the question part. I am concerned that I will have some leakage from either the LEDs or the motors to the Arduino GND, because everything is commoned together for the transistors to work…
From what I can figure - I don’t need to bother with diodes across my fans (they’re computer fans rated 12V 10W), because the transistors should be able to handle any flyback from them. What bothers me is the beefy power supply that is driving the LEDs.
Do I need to put a resistor in series with my Arduino ground pin? Like right before the ground “enters” the arduino? I get the whole idea of “electricity takes path of least resistance” or something along those lines, but it’s still counterintuitive… Wouldn’t be pleasant to fry my micro, although I did pick up a few just in case I do release the magic smoke on one of em.

Sorry about the lengthy post. Just feeling lonely… :slight_smile:
Schematics attached…

Do I need to put a resistor in series with my Arduino ground pin?

No, that’s actually a good way to let the smoke out of the board.

electricity takes path of least resistance

Incorrect. Electricity takes all available paths. The current that flows is function of the resistance or impedance of the path and the applied voltage.

Ground the LEDs & motors back at the power supply.

I don't know if the back-EMF will fry your transistors or not, but without the diode you can get some very-high voltages so it's "good practice" to include it.

The usual way to power high-power LEDs is with a special switchmode constant current (or controlled current) power supply. It's more efficient without the power loss across the resistors.

velobor:
I am concerned that I will have some leakage from either the LEDs or the motors to the Arduino GND, because everything is commoned together for the transistors to work...

There is some theory in electronics ... that teaches us ....... the current that is incoming to the arduino (via the arduino's pin from which it gets its power from....such as from an external power source) ...... well...that same level of current is going to flow out the 'other end'...through the arduino's ground pin. Actually.... this is for a case where nothing is connected to the arduino's general input/output (GPIO) pins. As long as you give the arduino the suitable and stable voltage supply that it needs.... you don't need to do anything like 'protect its ground'.

The ground-side of your motors will be electrically 'connected' to the arduino ground pin........ and the wire on the ground-side of your motors are just meant to be suitably chosen to handle the current that goes into (and out of) your motor(s).

General guidelines for wiring a high current circuit controlled with a low current circuit.

  1. Keep grounds together by function. i.e. All the motors to one ground, all the low current to another ground.

  2. Connect the high current ground to the low current ground at one place only. Should be at the power supply ground.

  3. Grounds should not be very long. Keeping them physically short is helpful.

  4. You should add a diode across the motors (cathode to +v) else the inductive spike generated by the inductance that is not coupled to the magnetic circuit will generate a high voltage spike and eventually damage the MosFets.

Is this a pre-assembled board (like a pro mini)? If not, and if your crystal schematic is something like the wiring you will have trouble with the oscillator. The crystal and load capacitors MUST be physically right at the µP. And if it is not a pre-made board I suggest you change to one. Trying to make a good board is not a task for a beginner. I did not mention all the omissions on the µP schematic, there are a number of changes that would have to be made to the µP support components.

For instance; you need a delay in the reset line. Without one you will not have a reset function as the reset will disappear before the µP has fully powered up.

JohnRob:
You should add a diode across the motors (cathode to +v) else the inductive spike generated by the inductance that is not coupled to the magnetic circuit will generate a high voltage spike and eventually damage the MosFets.

He did say "computer fans" - which are presumably, brushless. :roll_eyes:

Screen Shot 2018-10-28 at 00.53.35.png

JohnRob:
For instance; you need a delay in the reset line. Without one you will not have a reset function as the reset will disappear before the µP has fully powered up.

What does this mean? I think with the right fuses (i.e. Arduino default) the uC will work well with reset connections as drawn.

I don't see any facility for programming the board in this whole schematic. No SPI header, nor Serial connections. All those pins are unconnected.

Getting a complete board (Pro Mini, or Nano if you like the USB connection on board) makes your design a lot easier. It's got a regulator, crystal, and all the decoupling caps and other things you need on board. Also a Pro Mini is barely larger than whatever you could design, unless you go for QFNL ICs (which are quite impossible to hand solder).

wvmarle:
Getting a complete board (Pro Mini, or Nano if you like the USB connection on board) makes your design a lot easier. It's got a regulator, crystal, and all the decoupling caps and other things you need on board.

My sentiments exactly.

It seems some people just think they are being smart - "real engineers" or something, put your own interpretation here - in "building it from scratch" on their own PCB but in fact, it is poor engineering practice and simply wasting money (the same thing, really) unless you are going to have a Chinese(!) fab house make a thousand (and sell another thousand themselves on eBay of course).

Certainly make your PCB. Mount a Pro Mini or Nano on it as a daughterboard, either socket it or solder the pin headers onto your PCB - you can even have components underneath for 3D assembly.

Thanks for all the tips!

I will try to address all in my final design and assembly. The schematic is a poor representation of final location of all the components, just something to help me keep track of all connections. This will be my fourth Arduino made in a similar manner, although the first to have so many components. The first three were just “arduino on a breadboard” as a proof of concept to use with “blink” and other examples. I am not planning on having any ISP facilities on-board, I will place the chip in a mount (not sure what the proper name is, it’s not a ZIF, but just the regular pluggy-inny thing that I can place the Atmega into… like on the arduino uno) and if I need to re-program it I can just pull it out and place into the uno. I already have facilities in place to burn bootloader onto bare-bones Atmega328, tried and true… haven’t let the Blue Fairies out of one yet.
I think I’m generally on the right track now, especially that I’ve asked the opinion of someone who actually knows and understands what they’re doing.
And the fans I’m going to be using are PMD1206PMB1-A.(2).GN (12V 10,6W right on the label).

As for the diodes on the motor - I’m thinking 1N4007 will be sufficient… I have a few of those beating about in my components box.

As for the diodes on the motor - I'm thinking 1N4007 will be sufficient... I have a few of those beating about in my components box.

Regarding the diodes, Paul___B is likely correct the fan you have is likely brushless and does not need a diode as it has internal circuitry to actually control the motor. However if it is already there it will not hurt anything.

The thing in your picture is a ZIF socket. The plain kind is just called a socket.

ChrisTenone:
The thing in your picture is a ZIF socket. The plain kind is just called a socket.

That's just for burning the bootloader. This particular arduino is a dedicated bootloader burner and I made a shield specifically for this task. The lamp controller will have a plain socket. Thanks. Massive brain fart on the name of the "pluggy-inny thingie" :slight_smile: