Due to cost restrictions I am trying/hoping to run two DC motors, forward and reverse only, safely off of one pin (using a Gemma) for a project like this: - YouTube
High pin state=forward, Low pin state=reverse. See attached jpeg for (shoddy) circuit diagram.
-Is this feasible?
-In particular I'm concerned about the lack of safety diode in parallel to the motor...is there a way diodes are typically incorporated with DC motors and H-bridges to prevent damage to the pin in arduino setups?
-If not, since the motor is tied to legs rather than wheels, is it likely it could survive without a safety diode across the motor?
-Will this circuit work with two JFETs and two MOSFETS/Transistors tied to one pin? If not, can it be feasible with two pins to each motor?
While this approach is OK given relatively low power and small diodes, in larger devices it's not a good idea to reverse direction without a short delay.
When a transistor opens, and the resulting spike is held by the associated diode, the diode will accumulate a CHARGE much like a capacitor. When PWM driving or switching at high frequencies this CHARGE will need to be discharged by the other "leg's" transistor causing a high current spike. This is a huge concern as frequencies and power levels go up. The current produced can often be several tens of amps and has known to pop devices.
Just trying to inform, so you don't go away thinking this cheap and dirty approach works well everywhere.
Its just a reference to put it together, I didn't advise those exact components. He wanted to know how to wire the diodes and that was what I could get for a quick search.
Hi,
pmidthun, what is the application of this project and to repeat someone else's question.
Do you need the motor to STOP, you will have problems with direction change and back EMF if all you do is instantly change from FWD to REV.
What arduino are you using and why have you run out of I/O?
Tom.....
since you can edit your own posts, there is no reason not to fix the schematic and post it correcly.
one thing most of us have learned early in our lives is that nothing found on the internet or in patents can be trusted to work.
the patents are very carefully worded to make it so you cannot duplicate the work, but enough was brought out to patent the idea or scope.
in more recent years, the open source idea has taken hold and a significant portion of what is out there actually does work. some despite the incorrect sketches of the authors.
that case can be made that the overwhelming majority of what is posted on here is correct and workable. this forum having been born because of the open source concept.
Well there is always this design that requires more transistors and resistors.
Which still does nothing to create a small delay for switching from FWD to REV. What TomGeorge, Wawa and I are trying to instill is, absent the delay this concept is headed for TROUBLE. Are you really so tight on pins you can't use one pin for FWD and another for REV? Even with the two-pin approach it's a good idea to switch at slightly delayed times. It's not a huge delay, usually microseconds. This is why they make "fast recovery" diodes. The switching delay should be at least as long as the diode's reverse recovery time. (Trr)
rmetzner49:
What TomGeorge, Wawa and I are trying to instill is, absent the delay this concept is headed for TROUBLE. Are you really so tight on pins you can't use one pin for FWD and another for REV?
I often find that a novice will try to make one thing work one way to be clever, only to find that the cost is either performance , a compromise in operation or added hardware.
why not add a relay ? let the pin control the relay let the relay 'time to change state' be the delay ?
I have seen this used in industrial control before the use of PLCs.
of course a shift register could free up lots of pins. then the project could be made to run easily.
I do not believe that the OP is making this an XY problem, but it seems is getting there.
The FETs on t he high side should be P-Channel otherwise you'll have the top side operating in "follower" mode. Of course you would need level shifters.
I'm not going to supply a picture, there's plenty of H-Bridge designs available on the Internet. Stay away from hobbyist sites as they can be good sources of MISINFORMATION. Instead look at app notes from manufacturers. I think the Intersil 4081 has app notes on how to use their driver with N-Channel in the top legs, but that chip has the ability to make the gate supply to drive them.
Thank you for all the great feedback. I've decided I'm trying to do too much. Therefore in order to simplify the project I'm going to try to set up something like this:
pin P1 HIGH and P2 LOW - both motors forward
pin P1 LOW and P2 LOW - both motors no power
pin P1 LOW and P2 HIGH - one motor reverse, other motor no power
I plan to do this by having P1 control the power to one motor via transistor and P1 and P2 in an H-bridge with the other motor.
Just for reference again, the project would be similar to this: - YouTube
Yeah , no kidding ! It's about time someone noticed that .Look at the schematic posted by HazardsMind and then look at the OP's schematic. The HIGH side devices should BOTH be P-channel and the LOW side devices should BOTH be N-channel. I am 100% certain about this not just from online research for the past year but because I built a DIY h-bridge because someone "implied" that I couldn't. It worked
Note: By simply adding a transistor inverter or a 7404 inverter connected between PWM INPUT A and PWM INPUT B, such that a HIGH on INPUT A results in a LOW on INPUT B and vice versa, the H-BRIDGE can be driven from a single pin.
FYI, the schematic has a wrong part number. The chip should be a TC4427.
Hi,
The H_Bridge3 file, the circuit has a problem, if Q1 and Q3 have their sources at 12V, then their gates will have to go to 12V to turn them off.
The TC4427 is supplied by 5V and its output is MOSFET totem pole so it will only switch between gnd and 5V.
Vdd has to be connected to 12V as well.
The TC4427 looks like it is logic input, so arduino output should still work.
The mosfets are Logic Level. see linked datasheets. (FQP27P06) and (FQP30N06L).
I'll scope out the circuit this weekend anyway just to see if there's any issues.