# Two-Wire H-Bridge

**URL:** <https://community.sparkfun.com/t/two-wire-h-bridge/28981>\
**Category:** Projects\
**Created:** [June 30, 2014, 7:14pm UTC](https://community.sparkfun.com/t/two-wire-h-bridge/28981 "2014-06-30T19:14:06Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![JuanM](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@JuanM](https://community.sparkfun.com/u/JuanM)\
**Post date:** [June 30, 2014, 7:14pm UTC](https://community.sparkfun.com/t/two-wire-h-bridge/28981/1 "2014-06-30T19:14:06Z")

</div>

Is there anyway for me to control an DC motor with just 2 wires, reversing the polarity on them, and considering that the voltage between them is not enough to actually drive the motor? I though of something like and H-bridge made out of transistors, controled by another group of transistors, but I’m not sure of how I could do it.

---

<div class="post-metadata">

**Author:** ![waltr](https://avatars.discourse-cdn.com/v4/letter/w/898d66/32.png) [@waltr](https://community.sparkfun.com/u/waltr)\
**Post date:** [July 1, 2014, 3:14pm UTC](https://community.sparkfun.com/t/two-wire-h-bridge/28981/2 "2014-07-01T15:14:17Z")

</div>

You describe an H-bridge. So google search “h-bridge” to see how to do this

---

<div class="post-metadata">

**Author:** ![JuanM](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@JuanM](https://community.sparkfun.com/u/JuanM)\
**Post date:** [July 1, 2014, 3:58pm UTC](https://community.sparkfun.com/t/two-wire-h-bridge/28981/3 "2014-07-01T15:58:32Z")

</div>

![](http://upload.wikimedia.org/wikipedia/commons/d/d4/H_bridge.svg)[http://upload.wikimedia.org/wikipedia/c … bridge.svg](http://upload.wikimedia.org/wikipedia/commons/d/d4/H_bridge.svg)

An H-Bridge needs more than 2 wires, at least, one for each switch/transistor + ground.

---

<div class="post-metadata">

**Author:** ![Mee\_n\_Mac](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@Mee\_n\_Mac](https://community.sparkfun.com/u/Mee_n_Mac)\
**Post date:** [July 1, 2014, 4:34pm UTC](https://community.sparkfun.com/t/two-wire-h-bridge/28981/4 "2014-07-01T16:34:10Z")

</div>

Here’s a common low power dual H bridge IC.

[http://www.ti.com/lit/ds/symlink/l293d.pdf](http://www.ti.com/lit/ds/symlink/l293d.pdf)

If you leave the enable tied high, you use only 2 wires from your controller and only 2 wires to the motor. If you want forward, reverse and stop … you have to have 2 wires … or a serial interface.

---

<div class="post-metadata">

**Author:** ![JuanM](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@JuanM](https://community.sparkfun.com/u/JuanM)\
**Post date:** [July 1, 2014, 5:28pm UTC](https://community.sparkfun.com/t/two-wire-h-bridge/28981/5 "2014-07-01T17:28:22Z")

</div>

So, here’s the thing… I wanted to know if there’s a way to build the thing out of transistors

---

<div class="post-metadata">

**Author:** ![Mee\_n\_Mac](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@Mee\_n\_Mac](https://community.sparkfun.com/u/Mee_n_Mac)\
**Post date:** [July 1, 2014, 6:15pm UTC](https://community.sparkfun.com/t/two-wire-h-bridge/28981/6 "2014-07-01T18:15:25Z")

</div>

> JuanM:  
> So, here’s the thing… I wanted to know if there’s a way to build the thing out of transistors

In a word, yes ... that what's inside any H bridge IC. What's needed that I don't know is what you want for a motor voltage, what kind of power delivered, what your 2 wires can source and sink for current, what voltages they are and perhaps a few other things. You'll probably need some resistors too. Google shows this as perhaps the simplest configuration.

![](https://canada1.discourse-cdn.com/sparkfun/original/2X/b/be7792a35b61de9950749ca6a727af65f32febb8.png)[http://mbed.org/media/uploads/4180\_1/h-bridge.png](https://community.sparkfun.com/uploads/short-url/raWTYTB9Bw2jNT0M0XRHuHzGFn2.png)

For that matter you could make a really slow one out of 2 DPDT relays.

---

<div class="post-metadata">

**Author:** ![Ross\_Robotics](https://avatars.discourse-cdn.com/v4/letter/r/cc9497/32.png) [@Ross\_Robotics](https://community.sparkfun.com/u/Ross_Robotics)\
**Post date:** [July 1, 2014, 6:19pm UTC](https://community.sparkfun.com/t/two-wire-h-bridge/28981/7 "2014-07-01T18:19:58Z")

</div>

[http://goo.gl/BdhdMF](http://goo.gl/BdhdMF)

Mac beat me to it, but Google has hundreds of examples.

---

<div class="post-metadata">

**Author:** ![skimask](https://avatars.discourse-cdn.com/v4/letter/s/f6c823/32.png) [@skimask](https://community.sparkfun.com/u/skimask)\
**Post date:** [July 1, 2014, 8:28pm UTC](https://community.sparkfun.com/t/two-wire-h-bridge/28981/8 "2014-07-01T20:28:06Z")

</div>

> codlink:  
> Mac beat me to it, but Google has hundreds of examples.

Correction:

Google has millions of examples.

😃

---

<div class="post-metadata">

**Author:** ![Mee\_n\_Mac](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@Mee\_n\_Mac](https://community.sparkfun.com/u/Mee_n_Mac)\
**Post date:** [July 1, 2014, 9:47pm UTC](https://community.sparkfun.com/t/two-wire-h-bridge/28981/9 "2014-07-01T21:47:52Z")

</div>

How about a single DPDT switch w/center off position ?

![](https://canada1.discourse-cdn.com/sparkfun/original/2X/c/c8b15698200f2251086d5824545bf93ce989ac2a.gif)[http://www.the12volt.com/installbay/upl … switch.gif](https://community.sparkfun.com/uploads/short-url/sDprfEIeIZTAfMVgdd7nDKiRxQm.gif)

---

<div class="post-metadata">

**Author:** ![JuanM](https://avatars.discourse-cdn.com/v4/letter/j/bbe5ce/32.png) [@JuanM](https://community.sparkfun.com/u/JuanM)\
**Post date:** [July 2, 2014, 12:28am UTC](https://community.sparkfun.com/t/two-wire-h-bridge/28981/10 "2014-07-02T00:28:32Z")

</div>

Thank’s guys! I did google it, but didn’t find the right circuit. Anyway, this helped me out 😃

---

<div class="post-metadata">

**Author:** ![markaren1](https://avatars.discourse-cdn.com/v4/letter/m/ac91a4/32.png) [@markaren1](https://community.sparkfun.com/u/markaren1)\
**Post date:** [July 2, 2014, 3:56am UTC](https://community.sparkfun.com/t/two-wire-h-bridge/28981/11 "2014-07-02T03:56:14Z")

</div>

Assume you are driving the circuit made of transistors above.

Connect a logic inverter between fwd and rev inputs, with the input on fwd.

On the fwd input, now apply a PWM waveform maybe 1kHz.

With the PWM set to 50:50, the average difference between the motor terminals is 0v, so it is stationary.

Set PWM to 10:90 and the motor will rotate fwd.

Set PWM to 90:100 and the motor will rotate rev.

Other mark/space ratios adjust speed with 100:0 and 0:100 being flat out, 50:50 will always be stationary.

-mark

---

<div class="post-metadata">

**Author:** ![Mee\_n\_Mac](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@Mee\_n\_Mac](https://community.sparkfun.com/u/Mee_n_Mac)\
**Post date:** [July 2, 2014, 5:16pm UTC](https://community.sparkfun.com/t/two-wire-h-bridge/28981/12 "2014-07-02T17:16:02Z")

</div>

Logic highs on both inputs will also be off … and a brake as both NPNs will be conducting, thus shorting both motor leads to ground. Logic lows on both inputs has the same off and braking effect. One big disadvantage of using the simple circuit above is that the transistor turn on and turn off times are not matched and so, w/o any delay between switching logic states, you may have the PNPs and NPNs on at the same time for some “brief” period of time. That shorts the Vcc to ground and no good can come from that.
