Let's Make Robots!

Dual Y-Bridge (was One and a Half H-Bridge)

I had an idea tonight that is either inspired... or stupid. Please help me determine which. ; j

I was thinking about using one of my new Picaxe-08 processors for a project. They only have 5 I/O ports, three of which can be either an input or an output. However, for my project, I wanted to be able to control two motors and two sensors. Since traditional dual H-Bridge designs would require four processor outputs to control two motors with forward and reverse, that would leave only one I/O port left. Boo hoo.

I began to wonder if there was a way to control two motors in forward and reverse with only three outputs.  I first thought of a simple Y-shaped circuit, which would have the motors sharing a common connector. After monkeying with the idea and reviewing some H-Bridge designs, here is what I came up with:

H2Bridge_Diagram3.jpg

I did not bother with flyback diodes for the back EMF for now. I just want to see if the circuit would work conceptually. If so, I'll look at practical matters like that. 

The logic table for this circuit is below. Note that the output at the top-right of the diagram is an inverted copy of Output 3.

H2Bridge_Logic.jpg

If I haven't overlooked something, this circuit would allow a robot with two motors to drive forward, reverse, spin left, spin right, or reverse to one side. The bottom two logic input settings would result in a condition where two or more transistors in the same leg of the circuit would short out power to ground, and should be avoided.

OK, folks. Fire away! What did I miss? 


Update

Based on Telefox's modification, I have updated the circuit diagram. I have also added base bias resistors and protection diodes.

Dual_Y-Bridge_Diagram1.jpg

Here's the logic table for the circuit.

Dual_Y-Bridge_Logic.jpg

I decided to call this circuit a "dual Y-Bridge". One "Y" is turned on when you enable the "Reverse" line. The other "Y" is turned on when you turn on "Forward_1" and "Forward_2".

In practical application, I'd like to add some logic to make sure the dangerous states are never applied and make this a "smoke-proof" bridge. I'd also have some noise supression capacitors on the motors.


Update

After testing my own and Telefox's "smoke-proof" circuits, we came to the conclusion that they were not working. The good news is that the 2n2222A transistors seemed capable of surviving the short condition I was trying to protect against. Therefore I will just leave the protection circuit out.

Here are some current results for the circuit, using 4xAAA batteries as the supply.

  • One motor forward: ~130mA
  • Two motors forward: ~240mA
  • Two motors reverse: ~220mA
  • Reverse + one motor forward: ~610mA (transistor short condition)
  • Reverse + two motors forward: ~850mA (transistor short condition)

The 2n2222A transistors I used are the high current version of the 2n2222. They seem to withstand the abuse of being shorted. 

 


Update

 

Here's the Y-Bridge implemented on a Picaxe-08 Protoboard.

Blind_Lemon_Y-Bridge1.jpg

Parts:

  • Six (6) pn2222A npn transistors
  • Six (6) 1n4454 diodes
  • Two (2) 1n4006diodes
  • Six (6) 1k ohm 1/8 watt resistors
  • Assembled Picaxe-08 Protoboard
  • Assorted wires, header pins, etc.

Although the initial layout went very well, I ended up having to get creative to provide all the contacts I needed for the motor output pins. I used cut off pieces of component lead to fit into the same contact hole as the Q1 and Q5 emitter leads. This was a pretty ugly hack, but it worked.

You can see the Y-Bridge implemented on Blind Lemon.

 

 

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

I built and tested the Y-Bridge motor controller using 2n2222A NPN transistors. I was successfully able to drive a pair of the DAGU 3V gear motors (item #13 on the DAGU LMR Parts List).

The motors were pretty slow with the circuit powered by 3xAAA batteries. Driving a single motor forward, I get about 2.5V across the motor leads. When I add the second motor going forward, the voltage drops to just under 2V. In reverse (both motors), I get only about 1.75V across each motor.

Testing with 4xAAA batteries that were running a bit low (just under 6V) was a bit better. Driving a single motor forward, I get over 3.5V across the motor leads. When I add the second motor going forward, the voltage drops to about 3V. In reverse (both motors), I get 2.6V across each motor.

I guess I'm ready to move this circuit from breadboard to protoboard. Hoo hoo!

Thanks again for the guidance, Telefox.

No problem ignoble =)
BTW, I have a few options regarding making the 2Y-Bridge smokeproof - let me know if you are interested. I have a project coming up that this little circuit may actually be perfect for, will keep you posted!

Yes, I'm interested! Please feel free to suggest some smoke-proofing ideas!

I had one idea using digital logic, but that's a lot of chips to add when the whole idea was to create a small, simple motor driver.

Congratulations on you epiphany. Well done Telefox!  Reminds me of "Charlieplexing" but with "H" bridges.

Well, because I liked your idea so much, and also because I like the minimalist approach, I did a little work on your circuit and came up with this:

Double_H-bridge.jpg

First I designed a circuit using complementary NPN and PNP transistors, but I decided to make one more similar to your original NPN only circuit. As you can see I've omitted protection diodes, smoothing caps, bias resistors etc.
Once again you've got 3 inputs, 6 NPNs and 2 motors, but I think you'll find the control options a bit more convenient in this case.
• Activating "Forward" will make both motors run forward.
• Activating "Reverse_M1" makes only M1 run in reverse.
• Activating "Reverse_M2" makes only M2 run in reverse.
• Activating "Reverse_M1" and "Reverse_M2" makes both motors run in reverse.
The dangerous conditions are when "Forward" is activated at the same time as either/both of the "Reverse" inputs. Make sure to add the two diodes going to the base of Q5, otherwise either "Reverse" inputs will make both motors reverse, even when only one is active. Q2 and Q5 must be rated to take the current from both motors, but the other 4 NPNs only have to take one motors worth of current.

This is brilliant, Telefox. I love it.

If we swap the sense of "Forward" and "Reverse" we now have a robot that can drive in either forward or reverse, and can turn left or right. Same exact circuit, just different behavior and installation on the robot.

I'm going to do some experimenting.

Happy to be of service ignoble, glad you liked my revisions =)

You're quite right, having 3 flavours of forward will be more useful to many bots than 3 flavours of reverse. That way you could even hold one of the forward inputs high, and PWM the other input at a low duty cycle to make the bot turn in a wide arc.

Thanks for taking an interest and improving my idea! I will definitely try this out and let you know how it goes.
Hey ignoble, just one thing you seem to have missed:
The condition where inputs 1 and 3 are both active will only rotate M1; M2 will lock up, not rotate forward as indicated by the table. Q1, Q4 and Q6 are all enabled, but current will not flow from Q1 to Q6 because Q4 gets there first and brings the voltage down to its level before it reaches the motor. Effectively Q4 and Q6 cause the motor to have the same voltage on both leads, so no current flows. It's the reverse of the "2 & !3 = 1" condition.
Yeah, I noticed that first thing this morning as I was explaining the circuit to my wife (also and electrical engineer).