# Powering Two Motors through a Three Conductor Cable

I am working on a custom pan and tilt system in which the "pan" and "tilt" motors will be powered with a pair of PWM motor drivers. In other words, each motor will have its own driver. The drivers themselves will receive commands from an arduino nano, which in turn will receive control inputs from a 4-way switch joystick. The motors will only be powered one at a time, since the joystick is gated.

So far, this is pretty easy. The tricky part is that the cable I'm constrained to using only has three conductors available for the motors! The two motors will have to share a conductor. I'm struggling to come up with ways to power the motors, since sending power to one of them will, in most configurations I've come up with, also send power to the other motor.

The best I could come up with was to run a lead from each motor through an NC switch on the joystick such that the circuit from the stationary motor would be shorted out every time the shared conductor receives power. In my head, this makes sense, but I have a feeling that this might fry my PWM drivers.

My other idea was to use four logic-level NC relays and run the motor leads through them on the controller-side. Then, I could use code to completely disconnect the "stationary" motor from its driver every time the other motor is powered. But, now I'd have to deal with some delays every time I quickly switch from one motor to the other. For example, if I go "up" and then "left" in quick succession, it would take time for the relays for the "left/right" motor to turn off and close the circuit.

What do you guys think? This seems like the type of problem that a clever switch arrangement could solve, but I can't seem to crack it.

• I guess the main problem is that, with 3 conductors, theres no way to have the motors rotate in opposite directions (or the same direction, depending how you wire them) at the same time, unless you split the rail or have negative voltages(i.e. -5V, 0V, +5V) Sep 1, 2020 at 17:42
• @BeB00 No need to power both motors simultaneously. Only one will be powered at a time; the joystick is gated. I'll edit the original post to reflect this detail. Sep 1, 2020 at 17:46
• I think you still need the additional relays, but electronic ones (solid state relais) should do the trick with switching fast... Sep 1, 2020 at 18:01
• If you only need to power one motor at a time, i'm confused as to why this is a problem. Just dont activate both drivers at once, and put the one that you're not using into coast (not brake) mode. You shouldn't need any relays or switching, just connect the motors do the drivers as you would normally (with both drivers sharing the middle pin) Sep 1, 2020 at 21:53
• If you need it to be braked, then you could add a relay or SSR to short the contacts together for each motor. Theres a small chance that the PWM driver already has that, but its more likely that in brake mode it just grounds both output pins. Sep 2, 2020 at 17:04

put the arduino and the drivers next to the motors and don't combine any of the motor wires

put the joystick on the end of the cable and use it to switch resistors that can be read by one of the areduinos analog inputs to determin what the joystick is doing.

eg:

simulate this circuit – Schematic created using CircuitLab

there's another way to run two motors over a 3 wire cable, but it uses different parts to those you've chosen.

instead of the PWM drives use LM2596 buck modules and just switch them between buck (positive voltage) and buck-boost (negative voltage) mode using the with the joystick switches.

set the voltage preset on the LM2596 module to get your desired run speed.

simulate this circuit – Schematic created using CircuitLab

As you can see the controls rest with the motor braked, activating the "up" control makes a positive voltage for the motor and activating the "down" control makes a negative voltage.

use another buck module and the other pair of joystick switches, for the other motor and ground the common motor wire.

Given that you have double switches and your joystick is 4 way (not 8 way)so that only one pair of switches can coperate at any time, you could do it this way too.

simulate this circuit

This keeps the unused X ort Y wire shorted to the common wire you could possilby sense the voltage on X Y and C to determine which way the joystick is being pressed if the arduino needs to know that. and also allows a grounded supply but sacrifices grounding ofg the common motor wire.

Anther solution leaves the ardino in control of the motor's speed and direction but uses only a single motor driver.

simulate this circuit

• Okay, I figured out a way to arrange the switches on the joystick to make this work. However, this brings up two additional questions. The first one is easy: If I take the 10 or 20k pot off this LM2596 based module, you think I could solder in a replacement panel-mount pot? Second question: How would I go about limiting the current to the motors? Sep 2, 2020 at 17:28
• 1: remote pot: yes, 2:it's hard to say without knowing why Sep 2, 2020 at 20:13
• They sure get expensive on amazon, Sep 2, 2020 at 21:17
• I was thinking that current limiting could be applied for the motors when they reach end-stops and enter a stall condition. These LM2596 based modules tend to have a current limit in their spec sheets, but idk if relying on this is a good idea for limiting stall current. I'm worried about overheating the module. Sep 4, 2020 at 15:27
• you can get DC-DC modules with voltage and current limits. and yeah there is a way to do this such that onlt one DC-DC modules is needed seing as your joystick is gated and double switched: use one layer for positive and one for negative. Sep 4, 2020 at 20:23