Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Logic gates to control relays?

Status
Not open for further replies.

bigal_scorpio

Active Member
Hi to all,

I was pondering if there was a prefered way of using logic gates to prevent two relays that control a motors direction from energizing at the same time?

Or is there an ideal way of using the relays themselves to do this, they are DPCO relays.

I was thinking logic to prevent any possibility of the relays lag from moving causing a problem.

Any suggestions guys?

Al
 
You don't mention motor size, current or voltage or the relay coil current or voltage so this will be generic in nature.

This circuit is a good example of using a single push button with associated circuits to have a motor OFF / Clockwise / OFF / Counter Clockwise. The circuit is a building block and no more than that. There are possibilities coming off R6 and R7 omiting IC3 and IC4.

Additionally there are other combinations of logic gates that could likely be used to preclude a FWD and REV state from being present at the same time. A basic Dual D Flip Flop like the 7474 comes to mind.

Personally for applications like this, depending on the motor I like using a pair of mechanically ganged DPDT relays like the ones attached in a picture. Mechanical linkage makes sure that only FWD or REV is closed at any given time and they only require a pulse to the coil to latch them.

Ron
 

Attachments

  • Relay Latching..gif
    Relay Latching..gif
    22.1 KB · Views: 306
Last edited:
How are you driving the relays?

Does it matter if one relay is on when both inputs are high?

If you're using transistors, Schottky diode can be used to short the base of one transistor to 0V, when the other transistor is on.
 
If the relays have a spare contact then wire each relay coil through a normally closed contact of the other relay. That way a relay can energize only if the other relay is not. If there are no spare contacts, then you can add two additional small relays to perform the same function.
 
Hi guys,

I am using motors that are 24v at around 4A no load (well just loaded by the gearboxes) and need to control them using momentary switches, one for up and one for down, then another one for left and right.

The motors are for an invalid bath and the hand control is ok ( a 4 button pad) so I was going to use that, but the original relay board has faulty relays that are in my opinion under-rated for the job so I was planning on starting from scratch with more powerful relays, the old ones are only 5A rated DPCOs and the motor under load would draw more than that I'm sure.

I can obtain some 20A DPCO relays at a decent price so if I can make a reasonable circuit to drive them they should last a lot longer than the originals which managed only 18 months.

I was thinking logic to prevent any possible shorts and taking the actual relay contacts out of the equation which means even if the contacts get carboned up a bit the logic part would hopefully not allow both to be energised at the same time.

I can drive the logic and power separately and would be able to use a transistor to drive the coils if the logic couldn't handle it, just need ideas. I am looking at the suggested method now but it never hurts to have more than one option. ;)

Thanks.........Al
 
Why make it complicated?

You only need two relays per motor.

Connect them up as per my attachment.

Of course you could just use SPDT switches but the current might be too high to get ones that can easily fit inside a hand held controller.
 

Attachments

  • Motor rev relay b.PNG
    Motor rev relay b.PNG
    999 bytes · Views: 304
Hell if all you want to do is that then set things up as Hero covers. We had similar here when my wife's mom was still alive with a hospital bed as to up, down and all around. Push buttons and relays. Just be sure that pushing two buttons at the same time can't happen. That is something to watch with patients. If that is not an issue then Hero's circuit will work fine.

Ron
 
I'm going to piggy back this thread for a question, can someone show me a circuit that can run 2 motors simultaneously? The catch is that the only one motor will run at a time (ex: a motor gets to a certain point and then allows the next one to run). But the order that the motors run is reversed with the opposite polarity.

Also, if you want my suggestion, I'd use XOR or XNOR gates.
 
I'm going to piggy back this thread for a question, can someone show me a circuit that can run 2 motors simultaneously? The catch is that the only one motor will run at a time (ex: a motor gets to a certain point and then allows the next one to run). But the order that the motors run is reversed with the opposite polarity.

Also, if you want my suggestion, I'd use XOR or XNOR gates.

hi DT,
I guess the motors do not have to do a full revolution.???

If thats the case one method, is to use a circular/indented cam on each motor shaft.
The cams drive micro switches [with rollers] on the uSw levers to control the motor drive.
 
Hell if all you want to do is that then set things up as Hero covers. We had similar here when my wife's mom was still alive with a hospital bed as to up, down and all around. Push buttons and relays. Just be sure that pushing two buttons at the same time can't happen. That is something to watch with patients. If that is not an issue then Hero's circuit will work fine.

Ron

Hi Ron,

Yes the controller needs to be made so they can't use two buttons together, that was why I first thought of logic gates, but I can't get my head round the logic! Having a blond moment I think. :)

There will be up and down switches and back and forward too, it needs to make sure u & d are not pressed together and same for b & f. Also it would be ideal if both motors could not run at the same time as this would really tax the batteries.

Heros idea would be useful so I could use single pole relays which tend to be higher rated for current, but if I could make it more foolproof that would be great.

Al
 
Also it would be ideal if both motors could not run at the same time as this would really tax the batteries.

That should be simple enough: use another relay or pair of switch contacts to disconnect the power to the other motor's relays when a button is presses on the other motor controller. I'll post a schematic but have a go figuring it out for yourself first.
 
That should be simple enough: use another relay or pair of switch contacts to disconnect the power to the other motor's relays when a button is presses on the other motor controller. I'll post a schematic but have a go figuring it out for yourself first.

Hi Hero,

This is the schematic I have come up with, would it work?

Another question is that I have some 4000 series and some 7400 series ICs, can I mix them either way?



UpDown..GIF

Thanks........Al
 
OK, I am going to make a few assumptions. My experience was with an old hospital bed here years ago. It used single motors for each controlled position, meaning a single motor handled Up/Dn by reversing polarity. You seem to imply a single motor for up and a single motor for down so I'll hold that thought.

Now when it comes to things that involve patients, invalids, and anything like that personally I would not screw with chips and logic with gates. I would use relays, simply because being mechanical they are more a definite purpose device.

Most pendants for controlling motors in cases like this have mechanical linkage to preclude any two buttons being pushed at the same time. Pressing any button locks the others out mechanically. Additionally for safety (mechanical linkage failure) they use plain simple relay logic, They are configured like the attached image (a little crude but you get the idea).

Since you mention 24 V motors I assumed 24 VDC and thus went with 24 VDC relay coils. If the Up button is depressed one motor will run. If the Down button is also depressed the down motor will not run. If you look at the drawing you will get the idea.

Ron
 

Attachments

  • Motors..gif
    Motors..gif
    12.9 KB · Views: 310
Last edited:
You seem to imply a single motor for up and a single motor for down so I'll hold that thought.

Ron

Hi Ron,

No mate, one motor for up & down and one for back and forwards, two motors in all, sorry if I misled you, it wasn't intentional.

As to the hand control, it is a flat box with membrane type momentary switches on it and there is nothing at all to prevent two or even all the buttons being pressed at once, that is the only reason I thought of logic.

All input appreciated.........Al
 
Hi Hero,

This is the schematic I have come up with, would it work?

Another question is that I have some 4000 series and some 7400 series ICs, can I mix them either way?



View attachment 40234

Thanks........Al
You don't need any logic gates.

You could use a couple of diodes and another relay. Obviously the other relay doesn't need to have a very high current rating.
dual motor relay&#46.PNG

OK, I am going to make a few assumptions. My experience was with an old hospital bed here years ago. It used single motors for each controlled position, meaning a single motor handled Up/Dn by reversing polarity. You seem to imply a single motor for up and a single motor for down so I'll hold that thought.
Are you sure they used two motors?

A more unusual way to reverse a DC motor is to use a series wound universal motor with a bifilar stator winding: connect one winding to go clockwise and the other to go anticlockwise.

Could this possibly have been the case?
bifilay universa&#10.PNG
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top