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.

My first schematic of a 2-channel relay board

Status
Not open for further replies.

StealthRT

Member
Hey all this would be my first try at creating a schematic in KiCad.

The schematic is a basic 2-channel relay.

The inputs are automotive 12v and gnd. This gets converted to 5v by the K78L05-1000R3.

The Wemos D1 mini has 2 digital pin outs that are 3.3v going to the LTV-356T with a 200 kOhms resistor in between.

From there it goes to a 1k resistor and then to the PMBT3904. Between that and the G5LE-1 relay is a 1N4007F.

In that same area is another 200 kOhms resistor that’s connected to an LED.

The outputs and inputs are the 2pos and 4pos 3.5mm Pitch Terminal Block Connector 300V 8A.

Just want to make sure my values are good and the components I have selected are suitable for my application. Please let me know if I am missing anything or have a value incorrect. Thanks!

image

Question also asked on:
maker.pro, electronics-lab, allaboutcircuits, kicad, Elec. Stackexchange
 
Cross-posting leads to confusion and wasted time.
 
R1,3 should not be 200k. More like 200 ohm. R5, R12 please check 200 or 200k.
Automotive power is not 12V but more like 14.5V when the car is running. There can be some real voltage spikes. I usually start out with a diode so only positive current can flow into the project. People put a jumper cable on backwards all the time. I see backward batteries.
What is U2,4 doing. I see Chinese relay boards where they say the board has opto-isolation. But just like you circuit there is no isolation and no need for any. What is the coil current in the relay? I think the micro can drive Q4 with 200 to 1000 ohm directly.
1696107858972.png
 
1. Both sides of the optocouplers share a common GND and Vcc. Therefore, you can eliminate both. 3.3 V is more than enough to turn on a 2N3904 as a saturated switch.

2. Q1 and Q4 both need base pull-down resistors to assure rapid and complete turn off.

3. The LEDs are shorted out and will never light.

ak
 
R1,3 should not be 200k. More like 200 ohm. R5, R12 please check 200 or 200k.
Automotive power is not 12V but more like 14.5V when the car is running. There can be some real voltage spikes. I usually start out with a diode so only positive current can flow into the project. People put a jumper cable on backwards all the time. I see backward batteries.
What is U2,4 doing. I see Chinese relay boards where they say the board has opto-isolation. But just like you circuit there is no isolation and no need for any. What is the coil current in the relay? I think the micro can drive Q4 with 200 to 1000 ohm directly.
View attachment 142917
So 3.3v to the Q4 with a 1k in between sound good?
 
The freewheel diodes will make the relays de-energise slowly. That can reduce contact life if the NO cotact is switching an inductive load. Best practise is to put a resistor in series with the freewheel diode. That will make the coil current reduce faster.

To prevent a large reverse voltage on the LED, a simple solution would be to put the freewheel diode in reverse parallel with the LED. The 220 Ohm resistor would then both limit the LED current when the relay is on, and speed up the de-energising by 4 - 5 times, as the coil resistance is 63 Ohms.
 
The freewheel diodes will make the relays de-energise slowly. That can reduce contact life if the NO cotact is switching an inductive load. Best practise is to put a resistor in series with the freewheel diode. That will make the coil current reduce faster.

To prevent a large reverse voltage on the LED, a simple solution would be to put the freewheel diode in reverse parallel with the LED. The 220 Ohm resistor would then both limit the LED current when the relay is on, and speed up the de-energising by 4 - 5 times, as the coil resistance is 63 Ohms.
Would you mind showing this? A visual would be great :)
 
I have error in post #11, actually R does improve turnoff. Here I did it with 50 ohms,
solid curve is 50 ohms, dashed 0 ohms

1696116854920.png


I found that the collector with 0 ohms in series with diode, max Vc was 6V, when it is
50 ohms max Vc reached +30V, very narrow spike. No LED reverse V though, collector
was always > 0V.

Regards, Dana.
 
Last edited:
What is your reason for having two optocouplers in the circuit?

This is what happens when somebody cross posts to multiple forums. Changes are made elsewhere, and when they pop up suddenly here, there's no clue why.

As I recall, in past times here, cross posting was actively discouraged. It is rude, leads to confusion and incomprehensible threads and wastes the time of anybody who might answer.
 
Would you mind showing this? A visual would be great :)
1696137687394.png

The peak voltage on the transistor will be increased by a factor of R100/[relay resistance] so you must make sure that the peak voltage is still less than the transistor maximum Vce.

The resistance of the G5LE relay is 39 Ohms. The current at 5 V is 128 mA. When the transistor turns off, that current will flow through R100. If R100 is 220 Ohms, that will give a voltage of 28.2 V across R100. The voltage between the collector and emitter of the transistor is that 28.2 V plus the supply voltage plus the diode voltage, so about 34 V. That is OK for a transistor rated at 40 V or more.

The resistance in the freewheel circuit is 39 + 220 Ohms, which is 6 - 7 times larger than it would be if the diode were directly in parallel with the relay coil, so the current in the coil will reduce about 6 - 7 times faster.

The LED current is limited by both R100 and R101. If the LED voltage is 2 V, R101 is 0 Ohms and R100 is 220 Ohms, the LED current is 13 mA. R101 can be increased to reduce the LED current if required.

The connection with R100 and the LED in parallel with the diode instead of in parallel with the relay coil prevents the reverse voltage spike of 28.2 V being applied to the LED.

In your application it may not matter if you turn off the relay coil slowly. It will still appear instant to someone watching. The curves in the data sheet show that the life of the relay is reduced quite a lot as the load current goes up, and inductive load reduce the life.

Many automotive relays have a resistor built in, in parallel with the coil, and no diode. The transistors that drive the relays have to be rated to 100 V or so, if there is no external diode, but they probably would be anyhow. Having no diode means that the coil polarity doesn't matter.
 
The freewheel diodes will make the relays de-energise slowly. That can reduce contact life if the NO cotact is switching an inductive load. Best practise is to put a resistor in series with the freewheel diode. That will make the coil current reduce faster.
Another way is not to use a standard freewheel diode arrangement. Instead, connect a zener diode across the driver transistor, between the coil driving point and GND. The main advantage is that the "flyback current" of the coil is dumped into GND rather than into Vcc.

The zener voltage must be at least equal to Vcc so it is not conducting all of the time, but it can be greater. For example, if you have a 12 V system and use an 18 V zener, the relay will de-energize much more quickly than with a standard diode, and most of the coil energy will go through the zener to GND.

Potter and Brumfield has an app note about this. Also, TI has a line of power driver ICs that has this type of protection built-in.

ak
 
The freewheel diodes will make the relays de-energise slowly. That can reduce contact life if the NO cotact is switching an inductive load.

I don't think that is quite correct.

A flywheel diode will delay the release, but as soon as the current reduces to the point the armature starts to release from the polepieces, the increasing airgap reduces the pull extremely quickly and the armature would return & the contact open at near enough the same speed regardless.

There will always (on any properly made relay) be some overtravel between the NO contacts closing and the armature sealing to the poles, and that part of the travel allows the armature to accelerate as it is released, before the contacts break.

Using flywheel diodes on DC coil relays and power contactors in industrial machinery is standard practice & I've never seen reliability problems due to that; problems are generally down to faults or lack of load side arc suppression. Some machines we've rebuilt have been running over 25 years without any such problems.
 
I don't think that is quite correct.

A flywheel diode will delay the release, but as soon as the current reduces to the point the armature starts to release from the polepieces, the increasing airgap reduces the pull extremely quickly and the armature would return & the contact open at near enough the same speed regardless.

There will always (on any properly made relay) be some overtravel between the NO contacts closing and the armature sealing to the poles, and that part of the travel allows the armature to accelerate as it is released, before the contacts break.

Using flywheel diodes on DC coil relays and power contactors in industrial machinery is standard practice & I've never seen reliability problems due to that; problems are generally down to faults or lack of load side arc suppression. Some machines we've rebuilt have been running over 25 years without any such problems.
I'm sure that it's rare to find conditions where using a freewheel diode causes premature wear. I agree that relays always have some over-travel of the mechanical parts, which has to be taken up before the contacts separate, so the contact will always separate reasonably fast.

However, I've come across design rules from well-known automotive manufacturers that call don't allow diodes for freewheel protection of relays. I assume that the rule is in place because of premature contact wear.
 
This is all rather 'over the top', stick a protection diode across the relay, as millions upon millions of designs in use already do - there might be slight theoretical objections, but in practice (other than specialised reasons) it's perfectly fine.
 
Kkjjj
However, I've come across design rules from well-known automotive manufacturers that call don't allow diodes for freewheel protection of relays. I assume that the rule is in place because of premature contact wear.
Odd then that many automotive relays include diodes in the housing. This can be a pain in the backside when you don't know there's an installed diode and decide polarity doesn't matter.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top