I'm working on a system based on a NodeMCU/ESP8266 WiFi controller, which controls two separate motor units, each consisting of a 12V motor and solenoid actuator. For practical reasons, I need to physically separate the controller box from the motor/actuator boxes by around 6 feet.

Here's a diagram with a single motor unit, capacitors and diodes omitted for clarity. In reality, there will be 2 motor units in parallel with independent control signals:

System block diagram

What's the standard way to wire this to reduce signal degradation due to EMI?

  1. Combine all conductors (control/GND/12V/3V3) in the same cable. Requires twice as much cable and thicker gauge for all conductors because of high current requirements on 12V/GND, significantly increasing cable cost.

Everything in one cable

  1. Separate GND/12V/3V3 conductors from control signals. Control is routed without ground, i.e. no shielding, therefore susceptible to EMI. We cannot also include ground with control, since that would form ground loops.

Separate power cable

  1. Include ground with the control signals, wire 12V/3V3 separately without ground. It feels wrong to wire the positive rails without ground, but not sure why.

Separate positive power rails

Please let me know if there are any other issues with the circuit, e.g. sharing ground between MCU and inductive loads.

Thanks for your help!

  • \$\begingroup\$ Do you mean A4988? EMI is all about details. Not nearly enough info, and anyway I can't say. For one thing, diagrams 2 and 3 create an additional loop that you might not want, but it might not be the biggest issue. If it's wireless anyway it might be simpler to combine all into single board, and have two of those, one for each "unit". That way you only need to run 12VDC power, which can have a nice big choke on it. \$\endgroup\$
    – Pete W
    Jan 11 at 1:29
  • \$\begingroup\$ Woops, yes A4988. I'll update the diagram. The ESP8266 WiFi module has to be separated from the motors since they are located in an area that gets almost no signal. Separating them allows me to place the wifi module where there is much stronger signal strength. Doubling up the units is an option, but would increase cost and maintenance, e.g. when performing updates. I'll save that as a last resort. \$\endgroup\$
    – DV82XL
    Jan 11 at 1:46
  • 1
    \$\begingroup\$ Anyway, of what you showed, I suppose #1. Make sure 12V has plenty of capacitance near the drivers and check for resonances because of long wires (might need a little damping). Would consider locally generating the 3.3V at each end, just to avoid polluting the MCU's 3.3V and vice versa. Go out of your way to clean up the "control" lines. I'm sure you can get everything to function, but if you are making many to sell, getting it to pass US/EU EMC regulations could take some effort. \$\endgroup\$
    – Pete W
    Jan 11 at 1:56
  • \$\begingroup\$ @PeteW How would I clean up the GPIO control lines at the receiving end - using optocouplers? If I implement the 3.3V on each end, that would eliminate the 3.3V conductor, but the core issue remains: should I include GND, 12V and the control signals in the same cable? (these don't need to get certified) \$\endgroup\$
    – DV82XL
    Jan 11 at 2:04
  • 1
    \$\begingroup\$ re: ( GND, 12V, control ) together -- yes, that's fine. These are step/direction lines, 1kHz ballpark. Clean up means at a minimum filtering on the receiving end, maybe a buffer on the transmit, termination a good idea, ESD protection a good idea all around. I mean if this a one-off just throw it together, who cares. If many, get an oscilloscope, observe it, and you'll learn a lot. \$\endgroup\$
    – Pete W
    Jan 11 at 2:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.