It is currently Wed May 24, 2017 2:19 am

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: question about relays
PostPosted: Sun Jul 15, 2012 7:22 pm 
Offline
Member
Member

Joined: Sun Jul 15, 2012 6:45 pm
Posts: 5
Hello,

I intend to purchace a K8055 board, in order to drive a 12V DC motor.

The motor will be powered by a 12V automotive battery. When powered, the motor will consume up to 21A (approx 250 watts).

I will drive the motor thru a "H bridge" with 4 relays in order to be able to invert the rotation of the motor. The relays will be driven by 4 ouputs of the K8055.

I am not so keen at electronics. So I'm not sure about which type of relay I will have to use.

Will this type of relay be OK ?
http://www.electric-relay.com/Relay/Electromagnetic-Relay/PCB-Relay/191.html

Can I use directly the 12v power of the battery for control of the coil of the relays ?

+ battery + to CLAMP of the board
- battery to GND of the board
+ coil of relays to + battery
- coil of relays to board ouputs (O1 to O4)



Thanks for your help.

Ben


Top
 Profile  
 
PostPosted: Mon Jul 16, 2012 3:52 pm 
Offline
Senior Member
Senior Member

Joined: Mon Jan 30, 2012 7:32 pm
Posts: 572
Location: Willow Grove, PA, USA
Hi Ben,

the relay specs say that it needs 0.93W coil power. An automotive battery has over 13V when fully charged and below 11V when discharged. Those are the open terminal voltages, under load it will be even less. To get 0.93W at 11V, you need 85mA which equals a load resistance of 130 Ohms (relay coil plus eventually some extra resistor in series to limit current). Those same 130 Ohms would however drain 100mA at 13V, which is 1.3W power. That is more than a single ULN2803 output can take. The ULN2803 has a power limit of 1W per output, 2.25W for the whole IC.

Unless I am misinterpreting the specs, you will need some PNP power transistors and protective diodes in between the K8055 and those relays.


Regards
Jan


Top
 Profile  
 
PostPosted: Mon Jul 16, 2012 3:59 pm 
Offline
Senior Member
Senior Member

Joined: Tue Mar 27, 2007 12:24 am
Posts: 3338
Location: USA
MostlyHarmless would know better then myself.

But you may want to look at the K8090
It already has 8 relays built into the unit that can handel 16 Amps each.
http://www.vellemanusa.com/products/view/?id=525191

Any thoughts Mostly Harmless?


Top
 Profile  
 
PostPosted: Mon Jul 16, 2012 4:35 pm 
Offline
Senior Member
Senior Member

Joined: Mon Jan 30, 2012 7:32 pm
Posts: 572
Location: Willow Grove, PA, USA
Wrong Way,

I guess he still needs the bigger relays to switch the motor. And I am not sure the ones he linked to will do the job to begin with. Ben didn't say if those 21A (250W) are the motor's continuous power or the power-on surge.


Top
 Profile  
 
PostPosted: Mon Jul 16, 2012 5:38 pm 
Offline
Senior Member
Senior Member

Joined: Tue Mar 27, 2007 12:24 am
Posts: 3338
Location: USA
MostlyHarmless

You're right.

I reread his post after I commented.

Thanks for the reply


Top
 Profile  
 
PostPosted: Mon Jul 16, 2012 6:16 pm 
Offline
Member
Member

Joined: Sun Jul 15, 2012 6:45 pm
Posts: 5
Thank you for the feedback. Not sure it helps me so far, I have only very basic electricity knowledge :-)

MostlyHarmless :

the spec says for coil operating : DC 3 to 110V / 0.93w. This is why I had in mind they can be operated directly by the battery power, even if low loaded. I understood also that the ULN2803 was not in contact with the battery and motor circuit, am I wrong ? If I am, of course I understand that I'm going in the wrong direction.

WrongWay :

The 21A current will be the peak power of the motor (is it what you call power on surge ?). Motor will move a roll-off roof, sliding on rails and wheels. Maybe 250W will be reached when starting movement, than I expect a much lower power. Moving will long 15 to 20 seconds max, then will stop. This is why I'm looking towards 40A relays for the motor side.

I saw the K8090 card. But I'm afraid the limitation of 16A will be a bit short, and could put the relays in danger ? Also, I need the K8055, because the end of the movement will be detected by position captors, so I need a card with inputs.


Maybe you can point me on drawings or schematics for what I want to do (should have started with this) :

- 1 PC with USB
- 1 motor DC 12v 250w max (one of these big wiper arms motor)
- car battery for motor power and motor switching (to allow manual swithing and roof movement when general power is off)
- if possible very simple (I'm lost when you talk about pnp transistors or diodes)
- low low cost :-)

Thanks


Top
 Profile  
 
PostPosted: Mon Jul 16, 2012 9:44 pm 
Offline
Senior Member
Senior Member

Joined: Mon Jan 30, 2012 7:32 pm
Posts: 572
Location: Willow Grove, PA, USA
Ben_5763 wrote:
MostlyHarmless :

the spec says for coil operating : DC 3 to 110V / 0.93w. This is why I had in mind they can be operated directly by the battery power, even if low loaded. I understood also that the ULN2803 was not in contact with the battery and motor circuit, am I wrong ? If I am, of course I understand that I'm going in the wrong direction.

That is all correct. The motor load will be handled by the relays and only the relay coils will be driven by the K8055. The way you described your plan to connect it all is fine and will work perfectly with a LEGO prototype using small relays.

The problem is the coil power of the high power relay, that you need, in connection with running it all from a car battery. Like all batteries, car batteries have a higher voltage when fully charged than they have when discharged. And they have an even lower voltage when under load. A normal lead acid battery has 12.6V fully charged, 10.7V when discharged and only 10.5V under load when discharged. You want to design your circuit so that it works at that full battery voltage range from 10.5V to 12.6V. With the coil needing 0.93W, the output port limited to 1W and that voltage range, the math just doesn't work out. Sorry.

I also think that you should not rely on using the end point switches through K8055 inputs. There would be the possibility of a USB communication error or program error causing a failure to turn the motor off. My suggestion would be to have the end contacts be normally closed switches that connect one of the relay coils to the supply voltage. When the roof hits that end point, the switch opens and thereby disconnect the relay coil from power. No program in the world can override that! That puts the K8090 back on the table.


Top
 Profile  
 
PostPosted: Tue Jul 17, 2012 12:09 am 
Offline
Senior Member
Senior Member

Joined: Mon Jan 30, 2012 7:32 pm
Posts: 572
Location: Willow Grove, PA, USA
To explain what I meant with those transistors and diodes:

Image

This is only one relay and I left out the motor, because it is irrelevant for the explanation and drawing all 4 relays would just add confusion.

First we have the K8055. The output ports of a K8055 are open collector outputs. That means that they have a very high resistance when the port is OFF and a very low resistance draining to ground when the port is ON.

On to the PNP transistor Q. What does that thing do? It acts like a mini relay. It allows current to flow from the emitter (connected to +12V) to the collector (connected to the relay coil) if the base connected to the two resistors R1 and R2 is 0V or "pulled low". It is "ON" then. It does not allow that flow or is "OFF" when there is a certain voltage at the base.

How do we control that? With the two resistors and the K8055. Let us assume that resistor R2 has 10 times the resistance of R1. If the K8055-OUT port is off, nothing flows through R1 and R2 pulls the base of Q "high". That turns Q "OFF", so the relay coil gets no current. But when we turn the K8055 port "ON", then most of what comes through R2 is going through R1 to ground. That pulls the base of Q "low", which turns Q "ON" and now the coil gets current.

The last part of the puzzle is the diode D. A diode is like a one-way valve. It lets current easily flow in one direction, but not the other. This is a protective diode that is needed because we are switching a coil (called an inductive load). They are often called free wheeling diodes, clamping diodes ... whatever. The point of that thing is to keep the transistor working more than once! A coil builds a magnetic field. What unfortunately happens when we turn the transistor off is that the collapsing magnetic field will induce electricity back into the coil. This results in a spike of possibly many hundreds of volts ... with no way to go except to force their way through the "closed" transistor. Not good. With that clamping diode, this electricity is just short circuited back into the coil and the resistance of the coil itself will take care of it in a short period of time.

When ordered online the transistors should not cost more than $0.70 a piece, the diodes less than $0.20 and the resistors are a few pennies. The biggest item on that bill will be shipping and handling.

All that's left is picking the right values for the transistor, the diode and the two resistors.


Top
 Profile  
 
PostPosted: Tue Jul 17, 2012 6:28 am 
Offline
Member
Member

Joined: Sun Jul 15, 2012 6:45 pm
Posts: 5
Many thanks for all these explanations and your time !

Only 2 questions more please :

1) you don't use the "clamp" contact of the board is your scheme ? I thought that the K8055 outputs received their power from the battery thru GND and CLAMP ?

2)
MostlyHarmless wrote:
All that's left is picking the right values for the transistor, the diode and the two resistors.


Maybe some hints ? I guess I will be able to add motor and other relays by myself, but the electric maths are not for me :-(

Thanks again

Ben


Top
 Profile  
 
PostPosted: Tue Jul 17, 2012 6:49 am 
Offline
User avatar
Velleman Support
Velleman Support

Joined: Fri Dec 08, 2006 8:07 am
Posts: 7733
Location: Belgium
Please note that the relay coil is not rated '3..110V'.
This spec means that the relay is available with a coil voltage ranging from 3 to 110V.
Make sure to specify 12VDC when you order one.


Top
 Profile  
 
PostPosted: Tue Jul 17, 2012 11:18 am 
Offline
Senior Member
Senior Member

Joined: Mon Jan 30, 2012 7:32 pm
Posts: 572
Location: Willow Grove, PA, USA
Ben_5763 wrote:
Many thanks for all these explanations and your time !


You are welcome.

Ben_5763 wrote:
Only 2 questions more please :

1) you don't use the "clamp" contact of the board is your scheme ? I thought that the K8055 outputs received their power from the battery thru GND and CLAMP ?


That's a misunderstanding of how the ULN2803 darlington transistor network works. The "outputs" never provide any voltage at all. They only ever provide a path to GND, or a high resistance. You need to think of them more like a switch that must be installed between a device and ground. The ULN2803 also has a clamping diode for each output and they all go to the CLAMP contact. To use those clamping diodes, the external supply voltage must be connected to that CLAMP contact. It is the same protective diode, that I added to the circuit. That is why it is possible to connect a small relay directly to the K8055 without adding an external diode.

In this case, the ULN2803 is not switching an inductive load. It switches a transistor. There is no collapsing magnetic field when switching a transistor, so there is no EMF. It makes no difference if it is connected or not in this case.

Ben_5763 wrote:
2)
MostlyHarmless wrote:
All that's left is picking the right values for the transistor, the diode and the two resistors.


Maybe some hints ? I guess I will be able to add motor and other relays by myself, but the electric maths are not for me :-(


That depends on what the final circuit will look like. We will get there.

For your application I think you don't need the ability of motor braking by short circuiting the H-bridge upper or lower half. That's not always a good idea anyways. A real short circuit can overheat the motor if that braking goes on long enough.

That means that it is possible to switch the two pairs of relays using one power transistor per pair. It also allows to build in some "mechanical" safety into the relay arrangement so that no matter what happens, both pairs can never be activated at the same time. Engaging all 4 relays at the same time would short circuit the battery. That short circuit would also cut the power to the relay coils, but then they immediately engage again for a full short circuit. That runs whatever current the battery can deliver (that would be a couple hundred cranking amps) through the relays, which causes excessive electric arcing in the relays, eventually welding the contacts together. The end result may be either some burning cables, relays or an exploding lead-acid battery.


Top
 Profile  
 
PostPosted: Tue Jul 17, 2012 11:26 am 
Offline
Senior Member
Senior Member

Joined: Mon Jan 30, 2012 7:32 pm
Posts: 572
Location: Willow Grove, PA, USA
VEL417 wrote:
Please note that the relay coil is not rated '3..110V'.
This spec means that the relay is available with a coil voltage ranging from 3 to 110V.
Make sure to specify 12VDC when you order one.

Very good point, thank you.

Also, before ordering make sure that the 12VDC version actually is suitable for the voltage range needed. I'm not so worried about the 12.6V of a full battery. As soon as the motor kicks in, the voltage will drop. But if the relay for example cannot stay closed at 11V, then it will get very annoying. As soon as the voltage of the battery drops to 11.2V or so, the relay will close, the motors load will cause the voltage to drop below 11V, the relay opens, the voltage goes back to 11.2V ... over and over making a lot of noise without much roof motion going on.


Top
 Profile  
 
PostPosted: Wed Jul 18, 2012 4:14 am 
Offline
Senior Member
Senior Member

Joined: Mon Jan 30, 2012 7:32 pm
Posts: 572
Location: Willow Grove, PA, USA
All right, here is my suggestion (Version 0.1). I think it incorporates all that Ben wanted as well as all that I think is necessary to take it to minimum safety levels.

Image

I'd like to hear what other forum members think about it. Any critique is welcome.

I know that the TIP42 power transistor is total overkill for this application. But that is what I found in my "parts" box to build a prototype with, so that's what I used in version 0.1. Then again, the thing costs $0.42 at Mouser.com today, so who really cares?

The relay configuration is meant to prevent short circuit even if at some point the motor supply voltage would be separated from the relay coil and control circuit supply voltage. Note that the red highlighted parts of the right side show the high power paths.

A "bread board" prototype I built has basically the upper left quarter of the schematics. The relay coils for RLY1A and RLY1B are simulated by a 50 Ohms, wire wound resistor. That equals approximately the load of 3 of the relays in question.

Image

Image

The test setup is powered by a 12V 3A stabilized power supply. The DMM is measuring the current through the 50 Ohms resistor (that big white ceramic block at the top). 12V/50R is exactly 0.24A. I had a hard time believing it myself. That ceramic block has "10%" stamped on it! I expected anything between 0.22 and 0.26, but not 0.240 dead on.

The two red wires going straight up in the second photo are SW1, the end contact "switch" (hold wires together). With that this test setup is 100% complete. The K8055 controls the circuit via O1 and gets feedback on I1 about the SW1 status. Closing SW1 disables power to the resistor (relay coils) even if the K8055 does not turn off the output signal.


Please comment.


Regards
Jan


Top
 Profile  
 
PostPosted: Wed Jul 18, 2012 6:11 am 
Offline
Member
Member

Joined: Sun Jul 15, 2012 6:45 pm
Posts: 5
Wow,

nice to see how some people like giving help to others ! Thank you, I did not expect so much !

this one I understand quite clearly now.

SW1 and SW2 are contacts that stop the power to motor in limit of run (I don't know how to translate "fin de course").

Ok, but in my case, once the roof has been open (sw1=closed), it will have to be move back later, starting from a point where sw1 is closed.


Top
 Profile  
 
PostPosted: Wed Jul 18, 2012 6:42 am 
Offline
User avatar
Velleman Support
Velleman Support

Joined: Fri Dec 08, 2006 8:07 am
Posts: 7733
Location: Belgium
This diagram requires only two relays instead of four and provides the same safety against shorts.
Please allow 1h for server refresh.

http://www.velleman.eu/images/tmp/motorpolarityreversal.jpg


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group