Problems with the components of my pcb

Hello!

I'm doing an access control system, a few months ago I had my system mounted on a protoboard and it worked correctly.

A few days ago I made the pcb for the system, then finished soldering each component, performed several tests and worked well.

Yesterday gave me a problem, it turns out I was doing tests, when the arduino commanded to turn off the electromagnetic lock, it did not turn off, it was on. Then disconnect the terminal that connects the Arduino with the optocoupler, to see if it was the arduino of the problem and the lock remained on.

Then remove the optocoupler to see if it was the problem, and nothing,

The electromagnetic lock was also on.

In short, the Mosfet constantly switched (on), so that it could not be turned off. And as a consequence did not turn off the electromagnetic lock.

I found it strange because the alarm circuit was exactly the same and worked properly.

So I measured the resistance of 330 ohm (of the alarm circuit) that is in the emitter of optocoupler, and average 326 Ohm. Then measured the resistance (330 ohm) of the electromagnetic lock circuit and average 91 ohm

I have a couple of questions:

  1. Do the resistors wear out internally when working at high power, so that they lose their value?

  2. Is the problem that the mosfet is not turned off, it is because of the resistance is bad, and that is why the mosfet and the lock is constantly On?

  3. How do I detect a problem of the components, if my circuit is already soldered in a pcb?

Attached image

Thank you very much

(translate by google)

Hi,

Then measured the resistance (330 ohm) of the electromagnetic lock circuit and average 91 ohm

Not sure what you mean, you measured resistance between were on the circuit, showing POS and NEG probe locations.

Have you measured the MOSFET to check that it has not gone short circuit.

What are the specs on the relay?

Tom.... :)

Check your soldering points.

Happened to me lately and almost drove me crazy.

TomGeorge:
Hi,Not sure what you mean, you measured resistance between were on the circuit, showing POS and NEG probe locations.

Have you measured the MOSFET to check that it has not gone short circuit.

What are the specs on the relay?

Tom.... :slight_smile:

Well, I wanted to say that the circuit worked perfectly. The electromagnetic lock turned on and off when the arduino gave an instruction. And even when soldering the components on the card worked well, I tested it about 4 times, and all good. Until yesterday I started to get into trouble.

The resistance I measured, is that which is in the emitter of the optocoupler and the gate of the Mosfet.

This resistance is 330 ohm, but when measured with the multimeter I was 91 ohm.

Instead, I measured the resistance of another circuit equal to the lock, and the average resistance 326 ohm (whatever is in good condition yet); And the circuit works perfectly.

I also measured with the multimeter if the mosfet worked, measured in diode mode, connect the negative probe in the Source and positive in the drain. And I did not opt for any reading.

Then I put the positive probe in the Gate and the negative in the Source, for a few seconds. Then returned the negative probe in the Source and the positive in the drain. And I did not opt for any reading.

I did the same video (Watch video: How To Test a MOSFET Transistor Using a Multimeter - YouTube)

I did this same procedure with 3 new Mosfets, and I did not opt for reading either.
I assume that I did not opt for any reading because to trigger the Gate of the Mosfet irfz48n you need a voltage higher than 4v and that was not enough with the multimeter.

On the other hand, I probe if the MOSFET of my pcb was making a short circuit and I did not have any readings on all its terminals.

Will it be the soldering points, as @arduinoaleman says? Or is the MOSFET or the 330 ohm resistance of the problem?

(translate by google)

eb99f3324ee598badbfcffdfc5245c0dd1c98ad5.jpg

The CTR of the opto is 10% at the low end.
You want 12v/330ohms ~ 36ma at saturation.
I(led)= 5v-2v/330ohms ~ 10ma therefore at 10% you are far from enough LED current.

.

Hi,

The resistance I measured, is that which is in the emitter of the optocoupler and the gate of the Mosfet.

This resistance is 330 ohm, but when measured with the multimeter I was 91 ohm.

So you put the probes between gate and source/gnd, and measured 91R instead of 330R. I would say you have a shorted gate to source in the MOSFET, or a serious short in the tracks.

My suggestion, rebuild your project and try not to be so compact, think about how you are going to test and repair your project. Give yourself some room.

I did not opt for reading either.

The DMM read what? ? ? ? Tom.... :)

Don't change the opto LED current. 330ohm (~10mA) is enough. The problem is the gate/source resistor (R2). R2=330ohm requires >25mA opto transistor current for a gate drive voltage >8volt. I doubt that the CTR of the opto is 250% (more like 10-20%). Change the source/gate resistor to 10k, and measure source/gate voltage when the Arduino pin is HIGH. It should be >=8volt. Leo..

Wawa: Don't change the opto LED current. 330ohm (~10mA) is enough. The problem is the gate/source resistor (R2). R2=330ohm requires >25mA opto transistor current for a gate drive voltage >8volt. I doubt that the CTR of the opto is 250% (more like 10-20%). Change the source/gate resistor to 10k, and measure source/gate voltage when the Arduino pin is HIGH. It should be >=8volt. Leo..

I did a test with the optocoupler apart and it works perfectly. So the problem is between the resistance of 330 ohm (mosfet gate) and mosfet.

Do you suggest that you change the resistance of 330 ohm by a resistance of 10k?

If you change the resistance of 330 ohm to one of 10k, do you think it is also necessary to make the change of resistance in the other circuit that works perfectly and is similar to the circuit (of the lock)?

Regards

(translate by google)

CTR (current transfer ratio) is the ratio of opto LED vs. opto transistor current. That varies from opto to opto. The one you listed (4N28) is a low ratio one (10%). The other one might just be a bit better (10-20%). The solution is to use better opto couplers with a higher CTR (e.g.4N25), or to load the secondary side less (10k resistor). Swapping R2 for a 10k resistor is the easiest way out. Leo..

R2 is too small a value - try 4k7, not 330 - the opto coupler output current is small, typically a fraction of the input current, so you are not saturating the opto coupler output at all. That alone could easily lead to the MOSFET cooking and failing.

Alternatively if your free-wheel diode was defective, or not properly soldered, the MOSFET could fail instantly when you first turn off the relay.

Welcome to the world of electronics! Never Twice the Same Colour (NTSC).

MarkT: R2 is too small a value - try 4k7, not 330 - the opto coupler output current is small, typically a fraction of the input current, so you are not saturating the opto coupler output at all. That alone could easily lead to the MOSFET cooking and failing.

Alternatively if your free-wheel diode was defective, or not properly soldered, the MOSFET could fail instantly when you first turn off the relay.

Hello!

I made the change.

Change the resistance of 330 ohm by a resistance of 10k, then remove the mosfet because apparently the mosfet was shorted and that is why the lock was constantly switched on.

Then I put another mosfet irfz48n and worked very well. The electromagnetic lock turns off and on. I did it several times.

But then the same thing happened again, apparently the short-circuited mosfet. Because the lock remained lit and did not turn off when the arduino was on the low.

I do not know what to do. If I buy another Mosfet it will work a couple of times and then it will be damaged.

(translate by google.)

Hi, Can you post some pictures of your project so we can see your component layout please?

Is diode D1 fitted the correct way round? What is your 12V power supply?

Please fit a 5 Amp fuse in series with the 12V positive lead to protect your circuit.

What is your native language?

Thanks.. Tom.. :)

I wanted to know if I made the mistake of putting the positive connection of the 1n4007 diode after the Mosfet and not before.

In short the diode had to be in parallel with the lock.

Attached image of pcb track

I think it badly connects that diode. Because it was working well and suddenly the LCD showed some strange characters, as if it were in Chinese. Luckily it did not damage

In the images I made some modifications like for example:

Erase some clues to avoid confusion. I attach the original image

Terminal blocks A1 … A5 that are connected to the optocoupler, go to the arduino.

TomGeorge: Hi, Can you post some pictures of your project so we can see your component layout please?

Is diode D1 fitted the correct way round? What is your 12V power supply?

Please fit a 5 Amp fuse in series with the 12V positive lead to protect your circuit.

What is your native language?

Thanks.. Tom.. :)

Hi, post the images of the track in the previous comment. I think I put the mosfet after the lock. And not the diode.

My native language is Spanish, I publish in English because in Spanish the community is very small. And almost no one is going to answer me.

Regards!

Is the error is to place the positive (+) pin of the diode after the drain? As shown in figure 2.

And the correct menera is sticking the positive pin before the drain. (After the electromagnetic locking) as shown in figure cap 1

If you look closely, place the positive diode after the drain. I think that the reverse currents of the electromagnetic lock affect the Mosfet because the diode is not in parallel with the electromagnetic lock.
(View image cap 3)

If you look in figure cap 1, the negative of the lock must be connected to the positive of the diode and the mosfet drain.

But in my PCB track, it is connected the negative of the lock is connected directly to the drain of the Mosfet, and the drain of the mosfet is connected to the positive of the diode.

Is that my mistake?

Cap2:

cap2.JPG

Cap1:

Cap3:

regards

(translate by google)

cap2.JPG

The precise positioning of the diode connection doesn't matter, I'm pretty sure. I would have more decoupling on the 12V supply personally.

What is the voltage rating of your MOSFET and the current taken by the electromagnet?

As soon as you introduce a significant amount of wire going to the inductive load the location of the snubbing diode becomes quite important, this from experience.

Adding more decoupling sounds like a good idea.

.

My alarm circuit works fine (view image cap1 & original).

But my lock gives me trouble because my Mosfet is short-circuited.

After a certain time, because I change the Mosfet for a new one I work well about 5 times that I try it. Then when I tried to re-test if it worked well it was destroyed.

Do you think the position of the diode affects a lot and have to be bridged, the positive diode before the MOSFET drain?

(view image)

I say that is my mistake the connection of the diode, since I did before the pcb mount the circuit in protoboard for a period of 3 months, and I did exactly the same as the image (see image) and I worked very well, I was never destroyed by the Mosfet.

8939b11b5e1c127c8818b9dbef2e24f7bb5d140d.jpg