microcontroller crash problem

Thread Starter

ouafae

Joined Jun 11, 2019
52
an engineer with me told me a resistance of 10 ohm is like a resistance inductance of 10 ohm. is it possible to replace an inductance by a resistance in electronic terms? for me in EMC terms we can't.
 

BobaMosfet

Joined Jul 1, 2009
2,110
an engineer with me told me a resistance of 10 ohm is like a resistance inductance of 10 ohm. is it possible to replace an inductance by a resistance in electronic terms? for me in EMC terms we can't.
That engineer was wrong.

resistance is in ohms, and inductance is in ohms, and they both refer to controlling the flow of current (impeding it), but they do it differently.

Resistor (aka resistance method): Friction slows electrons down, dissipates excess as heat.
Inductor (field method): negative polarized field repels negative electron field, no heat generated.

Resistor is a DC component, and an inductor (or capacitor) for current limiting is an AC component.

Read starting here about resistors, capacitors, and inductors.

https://www.allaboutcircuits.com/textbook/direct-current/
 

cmartinez

Joined Jan 17, 2007
8,220
@ouafae , I've dealt with your exact same problem in the past, and I can tell you that it has mostly to do with noise being produced at the power supply.

Check this post to get a glimpse on how I solved it. Hope it also works for you.
 

Sensacell

Joined Jun 19, 2012
3,432
I think we have a terminology problem:

Inductors are rated in Henrys, not Ohms.
This entire thread seems to ignore this obvious problem?

An inductor will have resistance, it's resistance is relevant, but that alone does not tell the complete story.
What is the part number of this inductor in the circuit?
 

Thread Starter

ouafae

Joined Jun 11, 2019
52
I think we have a terminology problem:

Inductors are rated in Henrys, not Ohms.
This entire thread seems to ignore this obvious problem?

An inductor will have resistance, it's resistance is relevant, but that alone does not tell the complete story.
What is the part number of this inductor in the circuit?
inductance has a resistance that is due to wires and a binding capacity. when the current is continuous the inductance behaves like a resistance. in this circuit I use an inductance to filter the current at high frequency what are called peaks that can be generated by the relay inductance during switching. this was my reasoning.

upload_2019-7-24_8-35-7.png
 

Picbuster

Joined Dec 2, 2013
1,047
First of all, I would like to thank all the members of this forum who share their knowledge without hesitation.

my problem is the crash of a microcontroller.
Indeed, I control relays from a microcontroller but my problem is that after some relay switching my microcontroller crashes and resets.

I use as decoupling circuit a 40 ohm inductance and two parallel capacitors of 47 uF and 100 nF.

the control voltage is 5V.

do you have any suggestions?
This is a common problem with spikes on the net.

If you feed the cpu circuit via a fast switching diode and load a capacitor(eq 100uf) then a new power supply is created. the relay coil is connected direct to the 5v supply. That 5V input line should carry a elco as well.
The coil does 40mA approx @ 5 V calculate c for 5 rc times R=5V/40 *10^3 ( dc resistance coil see spec sheet)
When a voltage drop(spike) occurs the power goes low but the cpu keeps running from the capacitor.
Do not forget to add 100nf to all caps above 10uF ( used in the power circuit).

Advice: try to use Mosfets to control relays.( low impedance low lost less heat)

Picbuster
 

Thread Starter

ouafae

Joined Jun 11, 2019
52
my card works as desired if I don't put behind a charge. the moment I add this charge my uC resets. maybe there's a power return somewhere, right?
 

Thread Starter

ouafae

Joined Jun 11, 2019
52
This is a common problem with spikes on the net.

If you feed the cpu circuit via a fast switching diode and load a capacitor(eq 100uf) then a new power supply is created. the relay coil is connected direct to the 5v supply. That 5V input line should carry a elco as well.
The coil does 40mA approx @ 5 V calculate c for 5 rc times R=5V/40 *10^3 ( dc resistance coil see spec sheet)
When a voltage drop(spike) occurs the power goes low but the cpu keeps running from the capacitor.
Do not forget to add 100nf to all caps above 10uF ( used in the power circuit).

Advice: try to use Mosfets to control relays.( low impedance low lost less heat)


I didn't understand your suggestion.

Picbuster
 

nsaspook

Joined Aug 27, 2009
13,086
That engineer was wrong.

resistance is in ohms, and inductance is in ohms, and they both refer to controlling the flow of current (impeding it), but they do it differently.

Resistor (aka resistance method): Friction slows electrons down, dissipates excess as heat.
Inductor (field method): negative polarized field repels negative electron field, no heat generated.
That's why we use a special type of inductor for EMC/EMI. We need one that is dissipative using the field method. Ferrite bead/core chokes are designed to provide this function. Loss in the form of resistance in the ferrite itself to the changing magnetic field. This dissipates the noise energy in the form of heat.

https://www.analog.com/en/analog-dialogue/articles/ferrite-beads-demystified.html
 

Analog Ground

Joined Apr 24, 2019
460
IC1 looks like a power-on reset and power monitor device. Have you looked at it's output to see if it is switching in response to something on the 5V power? What device is it? If it is switching maybe you can go back from there?
 

Thread Starter

ouafae

Joined Jun 11, 2019
52
IC1 looks like a power-on reset and power monitor device. Have you looked at it's output to see if it is switching in response to something on the 5V power? What device is it? If it is switching maybe you can go back from there?
I don't have to check this component or even think about doing it. it is +CWAA
 

Analog Ground

Joined Apr 24, 2019
460
[QUOTE = "Analog Ground, post: 1416309, membre: 621225"] + CWAA? [/ QUOTE]
Microprocessor Reset Circuits
Let me explain. Discussion has been aimed at the 5V power to the microcontroller. When I look at the circuit, I wonder if IC1 is involved. The idea is:

Glitch or spike on the 5V power -> IC1 reacts with a glitch, spike or even a full reset pulse on the output -> uP crashes or resets because of signal on RESET input

In other words, maybe the problem is not the quality of the 5V to the uP power pins but something on the RESET pin. Just an idea since nothing else seems to be working.
 

Thread Starter

ouafae

Joined Jun 11, 2019
52
[QUOTE = "Analog Ground, post: 1416345, membre: 621225"] Laissez-moi vous expliquer. La discussion visait l'alimentation 5V du microcontrôleur. Quand je regarde le circuit, je me demande si IC1 est impliqué. L'idée est:

Pépin ou pic sur l'alimentation 5V -> IC1 réagit avec un pépin, pique ou même une impulsion de réinitialisation complète sur la sortie -> uP plante ou se réinitialise à cause du signal sur l'entrée RESET

En d’autres termes, le problème ne réside peut-être pas dans la qualité des broches d’alimentation 5V sur les 5V mais sur la broche RESET. Juste une idée puisque rien d’autre ne semble fonctionner. [/ QUOTE]
That's a good idea, thank you. I didn't think about that. I'll base myself on your idea and keep you informed.
 

BobaMosfet

Joined Jul 1, 2009
2,110
I think we have a terminology problem:

Inductors are rated in Henrys, not Ohms.
This entire thread seems to ignore this obvious problem?

An inductor will have resistance, it's resistance is relevant, but that alone does not tell the complete story.
What is the part number of this inductor in the circuit?
Inductors are rated in Henrys, but reactance is still in Ohms. A Henry is probably beyond what the OP would be able to use, yet, because a Henry is described as the rate of change of current equal to one ampere per second, resulting in the Electromotive Force (EMF) of 1 Volt, which means we also have to get into Webers :p
 

BobaMosfet

Joined Jul 1, 2009
2,110
inductance has a resistance that is due to wires and a binding capacity. when the current is continuous the inductance behaves like a resistance. in this circuit I use an inductance to filter the current at high frequency what are called peaks that can be generated by the relay inductance during switching. this was my reasoning.

View attachment 182356
No, you are wrong.

An inductor is a short circuit in a DC environment. All conductors are inductors. Coiling a conductor simply adds length and hence more inductive reactance. Once the inductor's field is charged under a continuous current, the inductor becomes 'invisible'. Only when power is removed from the circuit will the inductor then act as a power-supply and dump it's full charge as a spike into your load because you have no resistor to slow that current flow down.

An inductor only acts as an impedance (NOT a resistance!) in an AC environment when the field is being expanded and collapsed, because it is the field that is opposing incoming current. This is how filters work. By sizing the inductor appropriately with the right frequency waveform, you can filter in or out a signal by impeding the flow of current.

Before you can properly filter out a spike, you need to understand whether or not you are filter for current, for voltage, or for both.

Unless you monitor your power with a scope and an ammeter, you're not going to know what's actually going on. The MOST LIKELY reason you're having the problem is because you're actually drawing too much current somewhere, at some point, and your voltage to your MCU is collapsing, so it resets.

Again- unless you can actually monitor what's going on, you're going to have a hard time with your limited skillset.
 
Last edited:
Top