H bridge relay

BrendanP

Senior Member
#1
I need to control speed and direction of a 12 volt motor. I have done quite a bit of work with various solid state h bridges all of which have their problems, shoot through, voltage drop etc.

The simplest and most robust soloution Ive found is a relay for direction controll and a mosfet under pwm for speed controll.

This idea was confirmed in my mind when I saw in the mouser catalogue this relay
http://www.worldproducts.com/pdfs/ep2.pdf
which is made for automotive use for controll of electric seats, power windows and so on. I figure if car makers use this soloution thats good enough for me.

I got a few in from mouser but Im having trouble understanding the schematic/pinout of the H bridge type relay on page 2 which is the type I have. In cases like these the data sheet writers figure they're writting for professional engineers and so dont give all that much detail.

I can see that pins 2 and 3 and 6 and 7 are for power to the coil but I can't undertand the other pins.

Can anyone interpet the diagram and tell me which pin is which?

 

Edited by - BrendanP on 11/08/2007 14:08:16
 
#2
Motor to pins 1 and 8

+ volts to pin 4

negative volts to pin 5

The relay is controlled by pins 2 and 3

and Pins 6 and 7 One end should go to negative volts and the other end switched by the picaxe.

That should work. Pay attention to the relevant voltages - your picaxe will not provide enough voltage or current for this relay so you will need a driver - transistor or darlington pair.

You need to draw the relay in each of the 4 possible switched positions and follow the current path so you understand why the motor will go forward be reversed or stop.
 
#3
Brendan
You need to connect the output from the PWM to 4 & 5, then the motor to 1 & 8. With both coils de energised the motor will go one way. With both energised it will go the other way.
With only one energised it will be stopped.
You could change 4 & 5 with 1 & 8, it will still work the same.
 

Wrenow

Senior Member
#4
Brendan,

Of course, the simplest solution is to use a Hobby R/C ESC (Electronic Speed Control) properly sized to the current requirements of your motor at full stall. They take a servo positioning command signal and use it to control the speed and direction of the motor. They used to be frightfully expensive, but the prices have really come down in the past few years.

Caution - check out the features to see if they fit what you need.

The common variations include:

Forward only
Forward and reverse (instant)
Forward and reverse (with a short delay going from forward to reverse or in both directions to help prevent strain on the drivetrain)
With brake or without brake.

Etc.

If you want instant forwards/reverse, look for the marine versions (much more common there) like those by MTroniks.

Another thought is the Radio Shack Vex Robotics Motor (looks like a servo, because it is the same box and geartrain as a servo, but with an ESC that leaches motor power off the servo lead instead of a "servo amplifier" board). They are still available from Vexlabs and from IFIRobotics. Yes, you can rip the board out and use it on another motor, just do not exceed the specs of the motor it was designed for, obviously (unless you enjoy releasing the magic smoke).

Some ESCs have become quite "intelligent" with adjustable ranges and so on. Many of the brushless ESCs are even programmable in and of themselves.

All you need to control a motor speed and direction with the Picaxe is to generate a servo signal. Pretty easy.

And, most ESC's have a built-in BEC (Battery Elimination Circuit) that delivers 5v back to the radio RX to power the RX. This means you should be able to power your picaxe from the same power supply as the motor (you did say 12v?) as you can get the 5v feed off the servo lead. Again simplifying the project.

I hope this helps.

Cheers,

Wreno


Edited by - Wrenow on 11/08/2007 15:35:31

Edited by - Wrenow on 11/08/2007 15:35:52

Edited by - Wrenow on 11/08/2007 15:36:34
 

BrendanP

Senior Member
#5
Thank you all for the input. It has helped enormously.

I looked at the ESC's Wrenno. They are a serious piece of gear, as are some of the motors they have on their site.

I think the Sonik4 Loco10 could serve my purpose. Im using a windscreen wiper motor to close and open a hatch.

As far as I can see this device will handle the wiper motor. The ESC is rated to handle 10 Amps at 14.4V.

Ive emailed them for more detailed info on the units opperation. What does the 'set' button on the module do Wrenno?

Have you used these devices Wrenno with larger motors like wiper motors?

I would still need sensors so that the picaxe would know when the hatch was in the open or closed position. I was going to use solid state switches which are activated by magnets.









 

Edited by - BrendanP on 12/08/2007 10:40:18

Edited by - BrendanP on 12/08/2007 10:50:00
 

Wrenow

Senior Member
#6
Brendon,

It might be a bit light in rating. You need to find out what the stall current of your motor is, not just the regular operating amps. The set button is to adjust the range of the ESC to the range of the stick on your radio. You might want to check out the other thread currently up on using an 08M to control motors and servos, as I have posted some further information there just now.

Hope that helps.

Cheers,

Wreno
 
#8
Relays are a practical solution. But be aware that the contacts can degrade over time, they become pitted and current is reduced. On the other hand. I've even seen contacs welded shut to high transients.

Myc
 
#9
Relays are a practical solution. But be aware that the contacts can degrade over time, they become pitted and current is reduced. On the other hand. I've even seen contacs welded shut to high transients.

Myc
 
#10
I thought that by using a mosfet to control the speed I could also turn the current completely off before switching the relay thus eliminating arcing across the contacts. Once the contacts are closed I then use pwm to start applying current.

 
 

Wrenow

Senior Member
#12
Hmmmm. Brendan, let me get this straight in my mind. You are using a mosfet(s) properly sized to the stall draw of your motor, with PWM to control the speed, reducing the speed to 0 (no voltage), then energizing a relay to change direction, then ramping up the PWM again.

So, you are using 2 pins, one to control speed and one to control direction, which have to be coordinated.

Still seems simpler (to me) to just use an appropriately sized ESC, which gives you variable speed and direction control on one pin. And, fewer failure points, methinks. I have thought about doing something similar with a forwards only ESC I happened to like, but an equivalent Fw/Rev one came out for a less than the cost of a relay more, so scrapped it. Some of the fw/rev ones are under USD$20 now for up to 380 size motors.

However, that is just my .02, ymmv.

Cheers,

Wreno
 

D n T

Senior Member
#13
Brendan,
Try using a solid state relay, Jaycar have one and it can handle 30 volts and 100 amps, its about 40.00 AUD
There is a smaller one theat you could use, Enter "solid state relay on the Jaycar page as a key search term and go in a couple of pages
 
#14
Thanks guys,

I've seen these solid state relays in the jaycar catalogue and have been thinking about doing some experimenting.

I did a lot of experimenting with mosfets and H bridge controller IC's complete with charge pumps and all the fruit. I never got the thing to work as well as I would of liked.

As I say, when I saw that relays were used by car makers for this app I took noticed because the car app is such a hostile enviroment. vibration, heat, noisy power supply etc.

I read somewhere that auto spec is actually a higher ratting that MIL SPEC. Maybe someone knows about that, might be a furphy.

Controlling the relay and the mosfet is no big deal, just have a short delay if youre going to change direction of rotation of the motor. I have found it rock solid bread boarded on the bench.

Glad you liked the fix Hippy, it seems like a simple one to me, two pins and you have speed and direction controll in a stable, high current handling package. If the relay never has to switch high current it should last its mechanical life, which is far higher than its electrical life.

I will try the ESC none the less, I called the Australian dist. in Sydney this afternoon.

I have hankering to build a guided torpedo with a GPS module, 40X1, two motors with ESC a couple of gell cells, some plumbing pipe, stuffing boxes. It could be steered by powering up or down the two motors via ESC. The GPS antenna could be trailed behind on a line running up to a small surface float. Line lenght would depend on depth you wanted it to run at.

I think that by using a water pressure sensor, readac and a ballast controll/pumping system. you could make the thing dive to predetermined depth when you launched it on its , dare I call it, , "attack run". If I dissapear off the forum you know Ive been locked up as a terrorist suspect..........!!

Or you could contoll this thing with RC and mount a cam corder in it and feed the cam corders signal in a 2.4 ghz tx and get the signal back to shore and see what the fish are up to....

I know a comp. in Tawian who has 2.4 ghz HIGH power modules.

Wrenno, this project has your name on it!

Edited by - BrendanP on 13/08/2007 19:16:08
 

Wrenow

Senior Member
#15
Brendan -

You might want to check the <A href='http://ausbg.org' Target=_Blank>External Web Link</a> for your nearest rc model warship combat club. They have links to the various local clubs there in OZ. The blokes there can probably give you some help on finding ESCs locally.

As for the torp, a few issues. First is fitting it in 1/4&quot; or less diameter (remember, our scale is 1/144, or 12' to the inch). Second, GPS does not give you the +- 0.5 meter accuracy you would need. Third, 2.4Ghz does not penetrate water well, especially horizontally. Other than that, press on! I would love to see you do it!

Cheers,

Wreno
 
#16
I wasn't thinking scale, I was thinking using 12&quot; dimameter pipe say 6' long with, bank of gell cells to run it.

The GPS/RC antenna would be towed behind on float on surface.

 
 

D n T

Senior Member
#17
Use a blown poly carbonate bubble on the front to mount the camera and use LEDS mounted outside the bubble to prevent reflection.

As far as control is concerned, why not use an unbilical, that way you dont have to worry about the radio side of things and if the unitl suffers a &quot; little problem&quot; you can retrieve it.
I am in the process of building a submersible (process is still being planned and financed) and intend using a small multi core cable to deliver video back and serial information both ways. By the way pay very close attention to the type of seals you use if you are going to put any shafts through your body wall ( to drive control planes etc) because like sand, water gets into everything.
 
Top