# H Bridge Matrix

The Apprentice

Sometimes, the master must sit back and let the apprentice learn from his own mistakes. I feel you are at that pivotal juncture, my son.

I have a bit-bang solution, but it doesn’t run well in parallel with my PWM generator. I’d like to see if some of you young whipper-snappers can do it “the right way” (ie, using the inbuilt PIC hardware I2C interface).

Right, thanks! - I forgot P

Right, thanks! - I forgot P channel! - I’m used to using all N-Channels where the gate on the Top Side FET need to be driven above the rail.

It would be nice to have a list of matching N & P channel FETs - P channel always seem to be lower rating, more expensive, or more difficult to find.

To add slightly to robologists reply. When you stall a motor, or when it initially starts up the coil within a brushed DC motor is "shorted". As the motor spins the energy travelling through the short changes from heat into kinetic energy of the shaft turning. The characteristics of the motor, effeciency, and load will determine how much of this energy is converted into kinetic energy vs. heat. If a motor is stalled, then the motor behaves like a shorted low value resistor. So you want a circuit and motor which can take the maximum amount of power you give it, when its in this low value "resistor" state - otherwise SMOKE!

ok, so i basically need some
ok, so i basically need some resistors to limit the current in case it gets stalled, right?

Nope, no resistors
Resistors would simply waste the power you are trying to deliver to the motor. In some cases high wattage small value resistors are added to allow current measurement, but not to limit the flow. You could take the measureed current and have your micro adjust the PWM to limit the average voltage applied to the motor. Or simply set the PWM to never go over a set value to keep the average current in the range you want. Or program the micro to shutdown the h-bridge or PWM if a stall condition is detected.

Switching methods for flybacks
Forgot to talk about how switching methods might save an h-bridge from back EMF. Locked Antiphase drive can be implemented by either alternately switching both driving transistors on each side, or by keeping a high side on, and flipping the opposite high and low sides alternately on/off. In the second method is used, say the upper right is constantly on, and the lower left and upper left transistors are alternately switched on. When the lower left is on, the motor is being driven, when the upper left is on, the motor is allowed to dump back through the source, circulating through both upper device. THe first method of switching both sides simply allows a constant path as well, so the body diodes are not forced to take so much, and a bypass diode is not really needed when the transistors are on allowing conduction. Hope that was clear.

Thanks robologist, I have

Thanks robologist, I have heard of regenetive recovery of power. I did not know you could save the switches that way. This is great information. Once I get my head around it a bit better, and figure out a way to animate current flowing through the diagrams, I will make new animations.

I must of watched the movie of your rebounder about 20 times. What do you think of the newmicro stuff? The 5A bridge seems to hold up well for your bot - I noticed on their site they have a 30A FET version with a Fan … but the price \$295? Krikey! The OMSC looks even more heavy duty with 160A continuous but no current limiting \$169 kit form - inclusive of surface mount.

All this seems a bit steep considering you can pick up

100PC LOT IRF612 N-CHANNEL MOSFET – TO220 PKG - NEW
200 VOLT 3.5 AMP

for \$10 What is your opinion?

Opinions are like …

The New Micros microcontrollers are great! And the h-bridges are pretty good too. The little NMIH-0050 used on Rebounder is a pretty solid performer. And I’ve heard the D-Rex is pretty good, 2 motors up to 7 A on a small board. Even though it’s made to stack with the Plugapods, you could probably wire in another micro if you wanted. That expensive one you saw, I think that was intended for industrial coreless motors, where the folks are used to spending \$1000+ for a motor controller. Problem is, I don;t think the industrial folk recognize it for what it is. But if you ever run a high end coreless motor that requries 60 kHz to 150 kHz PWM, you know where to look.

About the OSMC, I own a pair. I had them planned for one pair of motors, but will have to use them on another set sometime. I’m cheap, and try to buy surplus, or build some items, so I hope that gives you some idea of what I think of the OSMC h-bridges. It could probably tell you some about the New Micros stuff too, some of it is pretty good for the money.

ok, so maybe i could use an
ok, so maybe i could use an ADC port to do that, right? I was also thinking about placing a fuse in case i do something wrong.

Yep, the ADC is good to measure whatever comes from the voltage drop across the resistor. Some calculating of what the voltage might be before hooking up might be good, don’t want to over-volt the ADC. And this have the program cut down / cut off the PWM if the measurement gets too high.

Fuses are a really great failsafe. Don’t have anything empirical, but maybe 80% or 90% of the max value wanted. So like for a 30 A cutoff, maybe a 24 to 27 A fuse? If such a value exists. Or maybe a good PTC fuse, those I’ve seen in a small minisumo robot to keep it from frying. (Bournes, Littlefuse, Tyco makes them)

Parts are on order!!

Well folks,

My order is in! --I went with the souped-up BOA relay system, and parts should be in the mail soon. Included in my order is 2 blank boards which I ordered with the 2oz copper instead of the 1/2 oz stuff. I’m sure the thinner metal would have worked fine and in either case I am planning on keeping my lines nice and wide when I etch the board. I am using eagle to draw it up, even if it is total trial and error to learn the software. If I end up with anything usable in terms of a PCB layout I will be sure to post it!

Big-ass robot here I come!!

in the continuing spirit of sharing lessons…

Please post (and describe) utter failures as well! At the very least it will entertain us. gna gna

[do I smell milk burning? runs]

Gerber

And what program do you use to make yours. I recived a trial verson of NI to use it seems to be a do it all sort of program as in design, lab, proto, bread board, and real board. So some insite on this massive program would be helpful.

**excellent - you go baby ! **

excellent - you go baby ! I think I’ll have something worth posting on the extremely small (800 ma) wicked quick, no pcb, freeform version - can someone tell me wiki wiki what the you can source with a picaxe or typical microcontroller? I wondering if 800 ma is even too small to be useful for one of those … i use parallel port and typically they can source squat …

Eagle light
Eagle Light from http://www.cadsoft.de/ seems to be a pretty widely used freebie package. I’ve got a copy but haven’t used it much but hear folks like it. There was some gripe I’d heard that they wished it would follow standard Windows layout, or some such. Sparkfun usually has their generated libraries available to download for use with Eagle.

It’s good

I know the gripe you mean. It was never designed to be a windows package. I perceive that it was written as a commandline package, probably to run on a central workstation and commands were typed at it from a terminal. The windows front end was added as an afterthought and consequently, it doesn’t follow the windows standards you may be used to (eg, you’d expect DELETE to delete the currently highlighted object…)

I use it purely for auto router. In other packages, the router is an optional extra you have to pay for.

** Have you tried KiCad or**

Have you tried KiCad or any of the other open source ones?

No

I hadn’t herd of it. Does it autoroute?

(Times like this, I’d love to be able to take a thread and move it to a differnt forum.)

Copy and paste
You could do that, take stuff here and copy/paste it like was done on that shoutbox thing forum node stuff.

Imagine
I would look rubbish. BOA said … then robotlogist said … and CaptainTuna … etc. It just wouldn’t look right without the threads.