Help me understand this circuit with a relay. - Page 1
Forum section: electronics / beginners

author: kat66
author_rank: Newbie
timestamp: March 28, 2023, 06:03:40 pm
content: Hello everyone. I'm new here, long time subscriber of the channel and some videos have really helped me understand a bit of electronics and I've even built a few things, but this one problem I'm facing is different.I've read the sticky so I'll try to elaborate as much as possible, understand I'm not an expert nor a technician so sorry if I get the names or terms wrong I'm not doing it on purpose.I'm trying to build a "soft starter" for a 12Vdc lamp and after searching google I've come across one that seemed pretty simple but now has become an absolute nightmare because I can't figure out how to connect all the wires to make it work, it features two components, a relay and a thermistor, so eager to build it I went to the store and asked for those two components which were super cheap, I have a multimeter so I poked around the relay pins and found what two pins feed the coil, and what the NC/NO pins are because it has both.I've uploaded the "circuit" I've found and I just... can't figure it out(It's supposed to show an image here but it's not showing up in preview, it's called attach2)I've used diagrams before but this one is odd, there are more pictures in the website (https://electronics83.com/index.php/soft-start-of-12v-halogen-lamp-on-relay-and-ntc-thermistor/)but it's literally just a bunch of bare wires with no further explanation, this:He says, and I quote:"How it works.When the current passes through the thermistor, it begins to heat up and its resistance drops.The current to the lamp goes through a thermistor.When the resistance drops on the thermistor, the voltage on the relay coil begins to increase.When the voltage on the coil reaches a certain value, the relay contacts will trigger and bypass the thermistor.Now the current will go to the lamp without a thermistor.Smooth activation in my case is about 4 seconds."I understand the current goes to the thermistor, it's wired to the positive wire, and that supposedly has to power up the coil on the relay, that needs 12V to activate. Here's where I'm stuck. The thermistor heats up and activates the coil, the coil moves the internal contact and closes the circuit, letting current go from the input to the output. But it literally makes no sense, I mean... what's the thermistor for? when the relay closes the lamp gets all 12V so it's redundant, it works like a switch, there's no "soft start" anywhere for the lamp. And the guy has 2 wires there going....? no explanation.So I thought... I wire it the other way around, but then it's literally the same again, if I wire the coil directly then it instantly activates the relay and the thermistor has no purpose. So I kept trying, and I moved the thermistor to be in series with the lamp, and that's where things got... hot.After a few seconds it started smoking so I shut off the power supply, from what I know, when you see smoke in electronics, that's bad. I went into google again and searched for "for how long a thermistor can work" and had only crap useless results, so I went for "thermistor smoke" and I got results about FIRE ALARMS... and that's why I'm here.So how does this even work? is this website I found fake? it's the guy who wrote all of that an idiot? am I the idiot for not understanding something that seemingly makes no sense at all?How do I make BOTH components work? the guy says "the thermistor is bypassed" yeah but HOW???[ Specified attachment is not available ]This is where I bypassed the relay and wired the thermistor directly in series with the lamp, it does start slowly, starts at around 6V and rises, but when it reaches 10V that's where the smoke appears.I'm so sorry if you can't understand a thing but I'm literally going nuts with this trying to figure out how to wire these two things. I don't want to do any soldering before being 100% sure because the relay pins are tiny.Ohhhh one more thing, while reading about relays I found out I also need something called a flyback diode, today I started hunting for one at home and found a few, but where do I wire it? across the coil pins? which way?edit: I have no idea how images work, I've clicked insert in post but none is showing up, instead they're at the bottom of the post. The one with the multimeter is mine, and the other two are from the "guide" I'm using.By the way, I know you can buy soft starters but I don't have the money right now.

author: Vovk_Z
author_rank: Super Contributor
timestamp: March 28, 2023, 06:45:18 pm
content: An average incandescent lamp changes it's resistanse ten times or more when it heats up. So, the circuit have to work.Relay wan't work until lamp doesn't emit light. When lamp heats up and starts to emit light - the voltage across a lamp rises, so relay may turn on.BTW, the same is applicable for NTC-thermistor. It can change its resistance by ten-twenty times when it is heated by a near-rated current.

author: wasedadoc
author_rank: Super Contributor
timestamp: March 28, 2023, 06:52:39 pm
content: The "guy who wrote all of that" is not an idiot.The thermistor is bypassed when the relay operates.

author: homebrew
author_rank: Frequent Contributor
timestamp: March 28, 2023, 06:56:26 pm
content: The idea of the given circuit is the following:1) The NTC has a relatively high (in comparison to the lamp) resistance at room temperature (10R in this case). The lamp has approx. 3R (and only if already hot, otherwise even less). Therefore, initially the lamp will only drop 4V or less and the NTC 8V (or the rest).2) The NTC heats up and its resistance gets lower - hence the lamp gets brighter and a larger voltage will be dropped over the lamp. As the lamp is parallel to the coil, the coil will 'see' the same voltage. Above a certain threshold, the relay will start to engage. The closing contacts will bridge the NTC and hence all the power is now delivered to the lamp. That state will remain unchanged until the whole circuit is powered down.However, while the circuit is very simple, I don't like it. First, everything needs to be correctly tuned. The turn-on-voltage for the relay, the power of the lamp and of course a correctly sized NTC. Then, the failure modes: What if the relay stops working? Then, power will constantly be dropped by the NTC so it will get (too) hot and stay hot. What if there is a short in the lamp? The relay will never turn on and the NTC will be burned to death by thermal runaway - potentially a fire hazard.Thus, the safety and functionality of the circuit highly depends on the specific characteristics of the selected components. I definitively wouldn't recommend it. It may work but it also may burn down your house ...A long as everything is working as intended (i.e. the lamp is not blow), there is no strict need for a flyback diode as the remaining energy in the coil will be dissipated by the lamp when the circuit is powered off.

author: Eraldo
author_rank: Regular Contributor
timestamp: March 28, 2023, 07:28:21 pm
content: Quote from: kat66 on March 28, 2023, 06:03:40 pmThe coil inside the relay is basically an inductor. In simple terms when the power flowing through the inductor gets suddenly cut, there is generated a spike of voltage/current flowing in the opposite direction which can damage the components connected to it. For that reason it's necessary for a diode to not let the inductor run rampant. Dave made a video about it and it's very useful:https://youtu.be/hReCPMIcLHgSo you just put a normal dione in this configuration (and don't put it the wrong way or change the supply poles or else you short it)

author: wasedadoc
author_rank: Super Contributor
timestamp: March 28, 2023, 07:39:35 pm
content: A diode is not necessary in this circuit.

author: Benta
author_rank: Super Contributor
timestamp: March 28, 2023, 08:02:17 pm
content: Good luck finding acheapthermistor that will take ~10 A, ~100 W.

author: Eraldo
author_rank: Regular Contributor
timestamp: March 28, 2023, 08:07:33 pm
content: Quote from: wasedadoc on March 28, 2023, 07:39:35 pmThat's true since the inductors energy is discharged though the lamp. Sometimes i get too focused on the question i forget the practical implications.But then on the other hand why does that lamp even need a softstart. I do have a 12v 50w lamp (different model of course) which powers fine with 12 volts and draws the correct current as per specification. Also the supply in the image (pc psu) is more than capable of handling any current spikes.Anyways thanks for the catch

author: sparkydog
author_rank: Regular Contributor
timestamp: March 28, 2023, 08:08:47 pm
content: Quote from: kat66 on March 28, 2023, 06:03:40 pmPlease learn to find and read data sheets for the components you are using. There is no reason you should need to "guess" what pin does what. Your relay probably has enough information printed on it to identify the exact part and find its data sheet. (Also, hopefully you knew what part you were buying!) Similarly, how do you know the characteristics of your thermistor if you haven't read its data sheet? There's a lot more relevant information than just its "cold" resistance.As an aside, my first reaction to this (but keeping in mind I know about as much about electronics as the OP) was to scream in terror at the phrase "the voltage on the relay coil begins to increase". That seems like a recipe for slow-closing contacts, arcing, and premature relay death. If it were me, I'd be strongly inclined to stick a MOSFET in there to control the relay. (At which point, a diode is probably also a good idea. Ithinkin this instance you'd be okay with a standard diode rather than a TVS, since the coil and load are fed by the same source, so there's no chance of arcing when the circuit turns off.)That said, homebrew raises several additional concerns that seem quite valid. However, I suspect judicious use of a fuse or two might rectify those.

author: Gyro
author_rank: Super Contributor
timestamp: March 28, 2023, 08:28:52 pm
content: 10R seems a bit high as a soft start for an ordinary 12V 50W halogen lamp, real kid glove treatment. I would have gone for something around 2 - 3R as more than sufficient.

author: kat66
author_rank: Newbie
timestamp: March 28, 2023, 08:42:23 pm
content: Quote from: Vovk_Z on March 28, 2023, 06:45:18 pmQuote from: wasedadoc on March 28, 2023, 06:52:39 pmThanks.Ok so the lamp heats up but I can't get to the part where it bypasses the thermistor, it's constantly on until it starts smoking, I must be doing the wiring wrong for sure.Quote from: sparkydog on March 28, 2023, 08:08:47 pmHi there. The relay I've bought only says TAIKO 12/10 and has a DC power symbol, hence why I had to probe it.For the thermistor it says NTC 10D-15, I found a datasheet for it, max steady current is 5 amps but technically I only need it to be online for a few seconds, which is what I can't achieve.Quote from: Eraldo on March 28, 2023, 08:07:33 pmI need a soft start because it manages to trip the OCP in my power supply and flickers for a few seconds before fully starting. Also I'm using a 5A power supply for a lamp that when hot draws ~3.3, technically I should be able to power a 5A bulb with it, but when I tried, it started flickering but the filament never reached operating temperature = doesn't works. I know the inrush current is high so that's why it flickers, and I hope this circuit will help.Quote from: wasedadoc on March 28, 2023, 07:39:35 pmBecause.... there are no transistors? I'll watch the video nowThanks everyone. I'm still trying to figure it out, will update if something blows.

author: IanB
author_rank: Super Contributor
timestamp: March 28, 2023, 09:00:52 pm
content: Quote from: kat66 on March 28, 2023, 08:42:23 pmThis is where every part of the circuit has to be finely tuned for it to work. It is not going to work with the wrong thermistor or the wrong relay.One test to do is to place the relay coil across the lamp terminals and power on the lamp at 12 V without the thermistor in series. You need the relay coil to energize under these conditions, or the relay is not appropriately chosen. You can usually hear if the relay has energized when it makes a clicking noise. I think in this circuit it needs to be a magnetic relay and not a solid state relay. If the relay is a small plastic component it may not be a magnetic device.

author: sparkydog
author_rank: Regular Contributor
timestamp: March 28, 2023, 09:40:12 pm
content: Quote from: kat66 on March 28, 2023, 08:42:23 pmThat seems suspect. Leaving aside that Taiko does not seem to be a well known brand, what pictures I could find of Taiko relays generally have clearly marked product codes on them. Maybe you could post a picture of the relay? (BTW, have you verified that the relayworks? If you have the equipment, you might also want to try to determine it's minimum turn-on voltage.)If you can get one, something from Omron, Panasonic or TE is probably a better bet.On the subject of relays and "coil protection":(Disclaimer: this is my understanding from various sources. I do not warrant it to be without error, though hopefully someone will correct me if any of this is wrong.)Imagine your relay sitting happily in its closed state. One side of the coil is "high voltage" ("high" meaning e.g. 12V as opposed to 0V), while the other side is "low voltage". (Insert usual disclaimers about what constitutes your reference voltage.)Typically, your circuit has "high" and "low" (or, equivalently, "positive" and "negative") supply "ends" and often some other stuff in addition to the relay coil. The way you turn off the coil also tends to involve creating a path of high resistance somewhere. For example, a switch somewhere in the circuit, when opened, ideally turns into an infinite-valued resistor. (In reality, enough voltage will jump a gap even in vacuum, so the actual value isn't infinite... but suffice to say it's "very high".)What happens when part of your circuit goes from low-resistance to high-resistance is that the energy in the coil wants to dissipate. Now, thecurrentresulting from this is limited... but the voltage, not so much.If your circuit consists of nothing but your power supply, relay coil, and an open switch interrupting the power, the only place for that energy to go might be to jump the air gap across the now-open switch. Since that takes alotof volts (usually in the thousands)... that's exactly what happens. The best way to model what happens is to imagine that the relay coil suddenly turns into a power supply whose voltage rapidly goes from zero to whatever is necessary to get current flowing. Critically, however, the "positive"/"high" side of this impromptu power source is whichever side of the coil was closer to"negative"/"low"when the relay was energized; that is, it isreversevoltage.Now imagine an LED connected in parallel with the relay coil. Normally, you have "high" voltage on the anode and "low" voltage on the cathode. When the relay coil's magnetic field collapses, the LED is going to see "high" on thecathodeand "low" on theanode. If the LED is the path of least resistance, the relay coil can easily exceed the reverse voltage tolerance of the LED, resulting in loss of magic smoke.Alternatively, imagine a MOSFET as the high-resistance component. Again, with no other return path, the relay coil voltage is going to rise until it can punch through the MOSFET's resistance, again likely resulting in loss of magic smoke.Obviously, these results are sub-optimal. I would generally approach this with either a plain (also called "flyback" in this context) diode or a TVS. (An RC "snubber" is also an option, but one whose operation I don't really understand, so you'll have to look elsewhere for an explanation on those.)Connecting a plain diode backwards across the relay coil provides a very low resistance return path for the collapsing coil energy. For most intents and purposes, you can imagine it as completely eliminating the reverse voltage spike. The disadvantage is that, because the current is limited, the voltage conducted across the diode is small (equal to the coil's nominal voltage, I believe), which means it takes longer for the coil energy to dissipate. This results in delay, which can be significant, in how long it takes the relay contacts to open, and can also lead to "bounce-back" at the point where the magnetic force and spring force are approximately balanced. All of this means there is an increased risk of arcing if the relay *contacts* still have voltage across them. Arcing can lead to welding and/or accelerate contact wear.One way to improve things is to add a Zener diode in combination with the flyback diode, oriented in the opposite direction. This "forces" the reverse current to rise to the Zener's breakdown voltage (which needs to be higher than the nominal coil voltage if the Zener is going to have any effect) before it can flow, which can significantly reduce how long it takes for the field to collapse. This approach exploits the fact that many components can handle a certain level of reverse voltage without harm. (And you can add additional diodes to protect more delicate components.)Another solution is a TVS, which is essentially a Z+D in a single package, with the added benefit that they are available in bidirectional models.Whether youneeda diode is only partly dependent on what components are in your circuit. If you don't have anything that would be damaged by the reverse voltage spike, then you don't need one. But youalsodon't need one if your circuit will safely dissipate the collapsing field in some other manner. In your case, the neon lamp, being non-directional (non-polarized), will happily conduct the reverse voltage from the coil at a relatively low resistance. Essentially, it acts like a simple diode, so a separate diode is not needed. Also, since the coil and contacts are fed by the same power supply, the relay never opens while the contacts are exposed to voltage, so you don't need to worry about arcing on opening. (Arcing on *closing* is another matter, which is why it's probably better if the *rise* time on the relay coil is as short as possible.)p.s. The reason I wrote "coil protection" in scare quotes is because you aren't protecting the coil, you're protecting other thingsfromthe coil.p.p.s. In my earlier recommendation to use a MOSFET where I suggested a diode might be needed... I haven't actually drawn up that circuit, but I'm not sure the lamp would be positioned to be able to discharge the coil in that configuration. Youmightstill be okay without a diode, but I'm not certain.

author: Zero999
author_rank: Super Contributor
timestamp: March 28, 2023, 10:16:45 pm
content: Quote from: kat66 on March 28, 2023, 06:03:40 pmJust one question: why?My advice is don't bother. Use an LED lamp. Here's one which is just as bright as your 50W halogen lamp, yet only uses 5W and can be powered from a small plug top switched mode power supply.https://shop4electrical.co.uk/led-lamps/3429-enlite-en-mr165-30-ice-series-warm-white-25000hr-non-dimmable-60-beam-led-mr16-reflector-lamp-5w-480-lumens-12v-l-51mm-x-dia-50mm-5055155497903

author: Benta
author_rank: Super Contributor
timestamp: March 28, 2023, 10:25:04 pm
content: Quote from: Zero999 on March 28, 2023, 10:16:45 pmColour rendering?Apart from that, "soft-starting" an incandescent bulb is not something I'd waste my time on.

author: kat66
author_rank: Newbie
timestamp: March 28, 2023, 10:39:36 pm
content: Quote from: IanB on March 28, 2023, 09:00:52 pmPoof. You're right.The power supply outputs 12.12V without any load but when I wire the bulb to it, the voltage drops to 11.04 and the relay starts clicking, because the coil needs all 12V to work, it'll never fully close.If this was a LED light it'd work but then I wouldn't need a soft starter for itThe real problem is the power supply. Therefore I need a new one, the good news is that I do have one, only bigger, it's an ATX but it can output 30A on the 12V rail so that'd be plenty for a light. I just need a few connectors to make it compatible with my lamp and incompatible with mains sockets, not sure if it's visible in the pic but my bench PSU has a regular wall socket for output ziptied to it.I'm picturing a few connectors I could use already, and wiring them will be easier than trying to insist in using this cheap brick.Quote from: Zero999 on March 28, 2023, 10:16:45 pmThere's no answer other than... I like this one.It's quite unique as it in uses an AR-111 sizehead(PAR) with a socket that takes halogen capsules. I tried a G4 once but it didn't fit, pins were too short and the assembly too big, the PAR has a small ceramic top that keeps the capsule in place.I know, get a whole new AR111 with a LED inside, I've tried but couldn't find a similar replacement, only plastic ones and in high wattages, an equivalent LED to a 50W must be... 5W? maybe less, I have a 2.5W MR16 and it outputs a pretty decent light.

author: Kim Christensen
author_rank: Super Contributor
timestamp: March 28, 2023, 11:30:59 pm
content: QuoteAssuming you've wired this correctly and are using the NO contact andnotthe NC contact on the relay:Sounds like this isn't a relay with a 12Vdc coil, because such relays will click in and hold at a lower voltage than the rated one.The datasheet for the one in the original example shows that it'll click on at a minimum of 9V and could even stay clicked on until the coil voltage dropped all the way to 1.2V:

author: kat66
author_rank: Newbie
timestamp: March 29, 2023, 02:26:52 am
content: Quote from: Kim Christensen on March 28, 2023, 11:30:59 pmHi. I've tried with a variable power supply and the coil energises at about 8V so I don't know why it was failing before. The thermistor practically disintegrating in my hand might have had something to do with thatThe relay works fine and I should use it for another project. For now, I'll get a pair of connectors to attach to the new power supply and call it a day.Maybe one day I'll build a proper soft starter, or even better, a dimmer. The downside of incandescent lighting is the high currents I have to deal with, I'm sure a LED dimmer is much easier to build, 500mA isn't the same as 5A.I'm not advanced enough to deal with tiny surface mount LEDs yet.