big problem with relay circuit

Thread Starter

basicanemone

Joined Jun 5, 2010
2
Here's my relay circuit to run 3 dc motor. I want to run one motor at a time, the first switch closed have priority, even if the two others switch are closed. Exemple: If the Switch S1 closed first and the S2 and S3 closed after S1, I only want the motor 1 run. If the S2 closed first and the S1 and S3 closed after, I only want the motor 2 run. Same thing with S3 closed first. How many relay I need and how make the circuit. Thanks
 

Attachments

kkazem

Joined Jul 23, 2009
160
Hi,
You're going to need a lot more circuitry than just 3 relays and 3 switches to do what you are asking. Of course, I could design the circuit, but then you wouldn't learn anything, would you. I'll do my best to point you in the right direction and if you have specific questions after that, please ask thru replies to this thread.

First, I recommend that you use a LM7812 3-terminal regulator or similar for your control ckts instead of 24 vdc so you can use standard CMOS logic chips and other chips as needed. Most won't work over about 15 VDC. In turn, you'll need to use 3 ea ( 1 for each relay) driver transistor to energize the relay coil, perhaps a 2N7000 n-ch MOSFET, if the coil current at 24 VDC is within the fet's rating--I'll let you download the datasheets and check it. Just do a Google search for 2N7000 datasheet and you will easily find it, in pdf format. I think it has a 60V VDS and can handle 200 mA DC current maximum (tip: don't use it at more than 50% for continuous current, so 100 mA DC max continuous current). Also, when driving relay coils like these, you need a reverse-biased diode (1N4004 or equivalent) to prevent the relay coil from creating high voltage spikes that will likely destroy the fet driver. The reason the 2N7000 and other mosfets are such good drivers to use it that they can be almost directly driven from ordinary CMOS B series ICs running at 12 VDC to 15 VDC. Actually, a 50 ohm or 100 ohm series resistor in series with the FET gate is recommended. The source goes to gnd, the gate thru the 100 ohm resistor goes to the CMOS drive output, and the drain connects to one side of the relay coil. The other side of the relay coil goes to the +24 VDC supply. And don't forget the 1N4004 diode with the cathode to the +24V and anode to the FET drain side of the coil.

Ill continue the post later.

Kamran Kazem
 

Bychon

Joined Mar 12, 2010
469
Hmmm...someone who uses the drawing program I use.

It must be a good one...only people who use this drawing program have been able to solve this relay riddle.
 

dsp_redux

Joined Apr 11, 2009
182
A bit overkill, but the easiest way would be with a finite-state machine (a GAL/PAL) or a uC. Watch for the glitches when changing states and you are good to go.
 

Bychon

Joined Mar 12, 2010
469
I just don't understand using semiconductors when the job can be done with the parts that are provided. "you need a diode to keep the relay coil from creating high voltage spikes that will likely destroy the fet", "Watch for glitches when changing states". How about, "watch for the simplest way to do the job"?

Two months ago, I refused to try to fix a refrigerator because it had a microcontroller trying to save energy by controlling a 4 watt fan motor. After the manufacturer's techs tried to fix it 6 times, they gave the customer all his money back and threw the refrigerator in the dumpster. When I calculated the energy that could be saved, it came out that 178 years would be required to pay for a replacement microcontroller board.

I recommend simple ways to do things.
 

dsp_redux

Joined Apr 11, 2009
182
I just don't understand using semiconductors when the job can be done with the parts that are provided. "you need a diode to keep the relay coil from creating high voltage spikes that will likely destroy the fet", "Watch for glitches when changing states". How about, "watch for the simplest way to do the job"?

Two months ago, I refused to try to fix a refrigerator because it had a microcontroller trying to save energy by controlling a 4 watt fan motor. After the manufacturer's techs tried to fix it 6 times, they gave the customer all his money back and threw the refrigerator in the dumpster. When I calculated the energy that could be saved, it came out that 178 years would be required to pay for a replacement microcontroller board.

I recommend simple ways to do things.
I agree with you Bychon, that's why I started my sentence with "A bit overkill". I proposed this solution just to give an alternative. Programming a GAL in VHDL to do this kind of stuff is REALLY straightforward. There are times when a simple circuit will do the job (like in this one), but it's always good to know there are other possibilities. If you can write your ideas on paper, you can write it in a chip and that can save you a lot of time in many situation. Just have to choose the right tool for the right job. Your energy saver situation is a prime example of why uC aren't the right solution to everything.
 

Bychon

Joined Mar 12, 2010
469
Someone said, "$1 microprocessor" on another post. That's enough to get me interested. So...what's a GAL?

I tried replacing a furnace/air conditioner controller board with a discreet component design and understood why a microprocessor was right for that job!
 

hspalm

Joined Feb 17, 2010
201


Think this will work, please correct me anyone

And please inform me of a simple schematic designer for linux...

How do you upload pictures, by the way?
 

Bychon

Joined Mar 12, 2010
469
hspalm...it seems to me that all your 24 volt motors are in series with the 24 volt relay coils. The relay coils will cause very little current to flow in the motors.
 

hspalm

Joined Feb 17, 2010
201
Bychon, yes, I am aware of that. I drew the schematic like that for solving the problem with the components on his own schematic. The problem can be solved by either replacing all relays with 3-poled relays (rare?) where the third pole of each relay switches one motor, or by using an additional single pole relay where the motors now is drawn in.
 

Bychon

Joined Mar 12, 2010
469
I suspect this is a homework problem because the solution works out so neatly with exactly what was provided, specifically, the extra set of contacts in each relay. Like, who would be making a circuit for their own use and just happen to look in their junk box and find three relays with an extra set of contacts they didn't expect to use, and then post that as a forum question?
 

hspalm

Joined Feb 17, 2010
201
I agree, the solution fits very well with the given components (and a very specific task)! When I look at it once more, I see that with the given relay you can simply connect the motors to one open latch on each relay, no need for triple poles or extra relays. Was I not supposed to give him an answer so soon when we see its a school assignment? For learning purpose? Im pretty new here
 

Thread Starter

basicanemone

Joined Jun 5, 2010
2
Thank you all of you guys, for a quick response. Bychon and fast eddie has make the right cirduit as I need. I don't want to make a PCB with Ic componnent but work with the relay I already have. It's not a homework but a project for my personal use. I was tried to draw the schematic without good result, a lack of experience.
 
Top