Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronic Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Register Log in

Protection of MCU inputs?

Jadeit

Member level 2
Joined
Feb 10, 2017
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
538
I suggest something like a thermostat and a timer to control the furnace, but also other things like the dispenser.
Something can control a furnace with a consumption of 10kW but also air valves with consumption around 1W.
The device will work with +24V external PS and internally, + 5V (MCU + 3.3V).

Now I'm working on how to design digital inputs and their protection.


I divided the digital inputs into three categories
1. for example, a button inside the device outside the PCB
2. for example, a switch on the oven door or foot switch
3. generally something outside the device itself


So far, I have designed the inputs and their protection for the individual stages as follows


1. Low level protection for 1 ., Only NPN transistor with 10k resistor in base and +5V or +24V over polyfuse and transil on +5V or +24V
2. Medium level of protection, high speed . 74LV14 + protection diode BAT54 and two resistor 10k + 1k
3. High level protection AC Optron + resistor with +5V or +24V or GND wors in NPN or PNP mode for +24v with external resistor.

I welcome your opinion or suggestion on how to solve it differently?

rrrr.png
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
18,761
Helped
4,184
Reputation
8,370
Reaction score
4,120
Trophy points
113
Activity points
123,389
Hi,

an optocoupler is no proteciton device. It is an isolator.

I´m doing industrial design for decades now.
I´m using optocouplers only where I need isolation.

For protection I´m using protection devices or circuits like in your top schematic:
* resitors for limiting current
* diodes for limiting voltage. (ESD)
* usually I add a capacitor to prevent from HF noise. (EMC)

Klaus
 

    thannara123

    points: 2
    Helpful Answer Positive Rating

Jadeit

Member level 2
Joined
Feb 10, 2017
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
538
Thank you for your response.

>an optocoupler is no proteciton device. It is an isolato
Yes you are right . but with insulating barrier that protects what is behind it
That's why it seems good to me to have at least one such input to which you can connect anything and not have to think in advance what it will be
I like the 74LVS1G14 solution, it's nice and robust, but it takes up a lot of space on the PCB . ( I use separate gates 10k R in 1206 1k in 0603, ) on V clamp 1kV ,capacitor and robust zener diode. between GND and Safe GND have SMD ferrite baed)
 

danadakk

Advanced Member level 2
Joined
Mar 26, 2018
Messages
606
Helped
124
Reputation
247
Reaction score
130
Trophy points
43
Activity points
2,943
The NPN with base R, wants to have a R ~ 10x the base value R
to ground added. To absorb leakage when processor output is tri stated
and you want the transistor off. Eg. leakage does not start turning
it on. Also you can get diode arrays from folks like On Semi, TI, to
take care of several inputs.

Regards, Dana.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
18,761
Helped
4,184
Reputation
8,370
Reaction score
4,120
Trophy points
113
Activity points
123,389
Hi,
I like the 74LVS1G14 solution, it's nice and robust, but it takes up a lot of space on the PCB .
indeed the schmitt trigger gives no additional protection. It just forms clean edges.
For most microcontollers this is not essential. (for sure the levels need to be within valid range).
The protection is the resitors and the diodes.

10k, 1k, BAT54s is a simple but effective.
on the other hand one still needs to be careful with part selection and wiring.
* the 10k should not be a small 0603 type.... because on high input voltage (ESD, spike) there is the risk for a spark crossing the resistor.
(the bigger the better - but nobody wants to install a 2kV resistor..)
* BAT54 is a fast schottky diode. But if the wiring is lenghty it does not help (and not protect) much. Thus I generally use short (less than 1mm) and wide traces and a (or multiple) vias to a very solid GND plane... and I install a capacitor to stabilize the VCC - also very close at the BAT54.

Klaus
 

Jadeit

Member level 2
Joined
Feb 10, 2017
Messages
50
Helped
0
Reputation
0
Reaction score
0
Trophy points
6
Activity points
538
on the other hand one still needs to be careful with part selection and wiring.
I use any as this detail wiring and arrangement on the PCB
- I do not use resistors on output 7414
-
indeed the schmitt trigger gives no additional protection
primarily not, on the other hand it has 74LVC1G14 is compliant with the AEC-Q100. ie it has
some ESD diodes at the input and even if it destroys it consumes energy and may protect it in a row ,but yes it is there primarily as a signal shaper, for example witch small C for button debouncing etc



ISOLATION.jpg

ip.png
 
Last edited:

Javert

Junior Member level 1
Joined
Sep 14, 2019
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
158
Nice solution with SN74LVC1G14 and BAT54S and 10k 1206 resistor.
Do you think it is appropriate to use it the other way around, ie as a durable digital output?

SO.png
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
18,761
Helped
4,184
Reputation
8,370
Reaction score
4,120
Trophy points
113
Activity points
123,389
Hi,

I don´t see the benefit in using this LVC1G14.
* there is no need for a schmitt trigger
* the drive current will not be increased, rather reduced, because the 10k limits it to a tiny value

I see no drawback if you omit the LVC14 at all and just connect the BAT54S and the 10k

--> 10k value is questionable
--> use of LVC14 is questionable

Klaus
 

Javert

Junior Member level 1
Joined
Sep 14, 2019
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
158
--> 10k value is questionable
In my opinion, the output should be so durable that if the user connects the supply voltage to the output, he survives until it comes to
For exmple if we have 24V as PS and use 1k ohm resistor 1206 current through it at 24V will thermally destroy it , 10k 10k survives, yes 10k resistance also limits current out . a reasonable compromise needs to be found

--> use of LVC14 is questionable
Yes it is.
+ Is powered form Vdd_Smith which is separated by at least a coil from the VDD
+ it's another separation barrier, if it is destroyed there is hope that the MCU will survive, I think
+ can serve as a level shiter to TTL +5 for a 3.3V MCU
- extra components
- Yes schmit is useless, on a rough rig, if it is on the input side reduces the number of types of components in the circuit

I'm not insisting on it, just wondering how to reasonably and effectively protect digital output in an industrial environment if they lead outside the facility?
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
18,761
Helped
4,184
Reputation
8,370
Reaction score
4,120
Trophy points
113
Activity points
123,389
Hi,

In my opinion, the output should be so durable that if the user connects the supply voltage to the output, he survives until it comes to
For exmple if we have 24V as PS and use 1k ohm resistor 1206 current through it at 24V will thermally destroy it , 10k 10k survives, yes 10k resistance also limits current out . a reasonable compromise needs to be found
My opinion is different.
1) you can´t protect for any case. If you protect against 24V the next may protect against 230V AC.
2) an output is meant to drive a load. It should be low ohmic. A 10k series resitance will not be suitable to drive a SPI line, nor even the base of a bjt .. to drive a relay.

it's another separation barrier, if it is destroyed there is hope that the MCU will survive, I think
If the LVC14 is destroyed ... something seriously went wrong.

+ can serve as a level shiter to TTL +5 for a 3.3V MCU
On which side is the 3.3V MCU? The input side? so where comes the 5V?
Do you use it as supply for the LVC14? --> it´s beyond recommended operating conditions (3.6V max)

I´m doing industrial deisgn for decades now. The circuits work extremely reliable.
5V ouputs are protected against 0V/5V short circuit, but not against much higher voltage. Not 24V.

24V ouputs are protected against 24V /0V short circuit. Not against much higher voltage.

No standard and no industrial USB device is protected against 24V. No 5V industrial relay may be driven with 24V.

Don´t feel responsible for any user mistakes. This is not what "industrial" or "rugged" means.

Klaus
 

carpenter

Full Member level 5
Joined
Jul 25, 2012
Messages
304
Helped
21
Reputation
42
Reaction score
21
Trophy points
1,298
Activity points
3,889
5V ouputs are protected against 0V/5V short circuit, but not against much higher voltage. Not 24V.
Yesterday I destroyed a not quite cheap 3MP security camera.
The one who designed it made a 5V 2A power supply.
On + 5V external voltage, connected 6pcs DC/DC 1.5MHz 1,5A inverter in SOT23-5 and max input voltage +6,5 (7V absolute MAX). Well, I accidentally picked up a 7.5V adapter

I can't help but if the power supply is + 5V from the adapter the input should be resistant to + 14V (16 absolute max), because the adapter marked + 5V may be unloaded, if I use unstabilized to give more, and as a solid manufacturer I should count on user inattention and the most common are + 12V adapters.


I worked for a company producing and selling 19 "racks.
There was no problem with them anywhere in the world, only in the USA did they constantly complain about cracking plastic pads and curtains . For a year, it was discussed why it was being destroyed in the USA and not elsewhere .
Then a colleague went to the USA and traveled for a month with technicians who installed it
Cconclusion .

The American beast used electric screwdrivers and because there was no sign with the max tightening torque on it ....
The manufacturer should reckon with the fact that the customer is a beast, even an American beast.
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
18,761
Helped
4,184
Reputation
8,370
Reaction score
4,120
Trophy points
113
Activity points
123,389
Hi,

you talk about power supply.
I differ between
* signal inputs
* signal outputs
* power outputs (to drive load)
* power supply inputs
....

And I differ if the signals are available by users. .. and whether the user uses "my power supply" shipped with the device, or any random power supply.

It´s not the manufacturer´s fault if someone chooses an inappropriate power supply.

I can't help but if the power supply is + 5V from the adapter the input should be resistant to + 14V (16 absolute max), because the adapter marked + 5V may be unloaded, if I use unstabilized to give more, and as a solid manufacturer I should count on user inattention and the most common are + 12V adapters.
This is more than 5 times the nominal voltage.
Do you think that every 5V HDD, or SDD or any 5V USB powered device can handle 14V?
And honestly I see no need for it.

If I design an industrial device with 24V nominal power supply.
* I rate (datsheet, plate) it for 24V */-10%.
* but I design it maybe for 24V +/-20%.
For sure if the customer wants it to withstand 40V I will design it this way. No problem with this.
Don´t get me wrong, I´m not the designer to "create" early fails, or calculated obsolescence. I even hate this. I desgin extremely reliable circuits running in the industry for decades now 24/7. On some plants a malfunction for just 10 seconds will destroy a production batch for 40.000 €.
The circuits need to be installed - as given in the datasheet - then they reliably will work for a very yery long time. This is what my industrial customers expect.

No 230V AC device (washing machine, oven) is expected to work on 400V. To tyre needs to widthstand 50% higher speed or higher air pressure.

I think a datasheet, a device plate, a standard .. needs to be sufficient. And I expect the user to read and care for the informations.

You ..
are free to design the parts you sell for a 3 times higher applied voltage, or for wrong polarity or short circuit in any direction against any voltage.
But mind: it´s additional effort you have to pay for .. and for the mistakes of others. It's additional time to design, additional and increased part cost, stock cost, assembling cost, and under normal operating conditions increased fail rate.

Klaus

Your (American) torque example:
So - reading what you wrote above - your conclusion is:
* Still not provide the technicians with the "max torque" information, but use extremely strong screws?
There are standard torque limits for standard screws. (I know we Germans like "Standards" maybe more than elsewhere in the world)
 
Last edited:

Javert

Junior Member level 1
Joined
Sep 14, 2019
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
158
I do not make USB or ethernet with such resistance.
Why?
USB and ethernet connector, recognizes even an inattentive technicican and it is quite difficult to accidentally let 24V into them

if I have the terminal wher is +24V and also digital outputs, it can happen that the technician connects it differently than he wanted and therefore the resistance should be such that if I connect what I connect so it survives.

I have on terminal block +24V , used for actuators such as valves may be external relays etc., for switchung use any as darlingtor array ULN2003L.

I'm still considering adding universal digital outputs
state 0/1 speed under 1ms level, I don't know it's up to me
options
- optron
- Open collector
- next ULN2003
- any as one gate IC with R and BAT54C on output
- something else


I'm happy to get advice
 

carpenter

Full Member level 5
Joined
Jul 25, 2012
Messages
304
Helped
21
Reputation
42
Reaction score
21
Trophy points
1,298
Activity points
3,889
o you think that every 5V HDD, or SDD or any 5V USB powered device can handle 14V?
The HDD has a relatively specific connector for power supply and it is almost impossible to have a connector that can be plugged into it and has different power levels.
The camera has the most common 3.4mm x 1.3mm Inline connector and there is nothing easier than plugging in a 5V unstabilized adaper and it can already destroy the camera.
There is a much higher and easier rate of how to destroy a thing.


Your (American) torque example:
Of course, there was a note about the tightening torque somewhere in the manual, but the manuals don't read and I wouldn't read them either, and I probably even wrote it.
If it has an M6 screw and I see that there is a plastic washer between the nut and the screw, then I just don't bother it so that the micro washer flows out, it's a screw and not a vice for crushing the washers.
I don't think the manuals were read anywhere, but everywhere except the USA, the emotional technicians knew
Solution.
It's easy to export to the US with a red arrow and a max torque warning. In Canada, they do without arrows:)

I am from the Sudetenland, my grandmother was German and I have half a family in the "Reich" :)
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
18,761
Helped
4,184
Reputation
8,370
Reaction score
4,120
Trophy points
113
Activity points
123,389
Hi,
I have on terminal block +24V , used for actuators such as valves may be external relays etc., for switchung use any as darlingtor array ULN2003L.
first of all I need to say that all I write here is "how I see the things". No need for other to do it the same way.

You say ULN2003.
I don´t like them.
Maybe it drives a 24V 5W solenoid (or incandescent lamps, or heaters..). Correctly installed. Now the solenoid burns... this happens, maybe after years. It may become open circuit or short circuit.
The ULNxx doesn´t have current limitation inside nor overtemperature limitation. Thus it´s hard to protect it with external circuitry. A series resistor is no option.
Thus I´d rather use some more "intelligent" smart switch. They include overcurrent protection, overvoltage protection, overtemperature protection .. and maybe they come in a rather small package with a serial interface.

Mistakes during installation are less problematic, because there is no expensive production batch... and the mistakes (wrong polarity) will cause an immediate fail. Rather easy to find.
I focus more on long term reliability. I usually avoid high temperature or heat spots. And use ESD protection.
Heat and ESD may cause late fail. Maybe ofter weeks, months, or years. They often are rather difficult to find, sometimes sporadic so customer will have reduced production yield.
Maybe caused by an installtion mistake they need to buy a new device for 1000€. Gone stupid.
But safe their production yield.

Again: May way to see things.

Klaus
 

Javert

Junior Member level 1
Joined
Sep 14, 2019
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
158
You say ULN2003.
I don´t like them.
We were looking for a replacement and find for example L9823 , this have SPI, overcurrent and overtemperture protection, but
- is multiplied by more expensive
- SPI id onli max 3MHz, for us, it means killing one SPI , that's 4 (5) wires, which is usually not the difference against 8
- it does not have a sync input and so the outputs are not synchronous, yes it usually doesn't matter but ...
- RdSOn 1 Ohn , it warmed up similarly to 2003

If you know of a better replacement, I'll be happy to learn ( for reasonable money, nothing from Max )
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
18,761
Helped
4,184
Reputation
8,370
Reaction score
4,120
Trophy points
113
Activity points
123,389
Hi,

do you know 74HC595? and some similar shift registers with high power: STPIC6D595, TPIC6A595,
or BD8LA700, BD8LB600 or similar.
or serially controlled LED drivers with adjustable sink current...
There are many options..depending on your needs

What do you mean with "killing one SPI"?
You may have several SPI_salves one SPI. Currently we have 8 devices with different speed and different polarity..

- RdSOn 1 Ohn , it warmed up similarly to 2003 ..
I see it is about 1.4V @ 500mA which means 2.8 Ohms.

Klaus
 

Javert

Junior Member level 1
Joined
Sep 14, 2019
Messages
16
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
158
What do you mean with "killing one SPI"?
Why a separate SPI?
The project I'm working on has a SPI TFT display that kills one SPI, even if it's running at full speed, it's just on the edge
If I use an SPI IC for the outputs, I won't want to use a 100-pin MCU case at the same time
ST, but other than obsolete STM32F1 does not produce any STM32, with integrated MAC in less than 100 pin case and I need Ethernetsolution, use SPI MAC / PHY, even 80MHz SPI does not cover 100Mb ethernet. Another dead SPI.

If you look at L9823
"On the falling edge of the CS signal, drain status information is transferred from the power outputs and loaded into the device's shift register."
If the output settings are to be at least a bit time-predictable, it is probably not possible to wait until other things are on the SPI.

I quite like the L9823, it can recognize the disconnected load and short circuit and inform the MCU about it
but I really don't care why not using pin 21 they brought out a signal that would transfer the data stored in the shift register to the latch register

- RdSOn 1 Ohn , it warmed up similarly to 2003 ..
I see it is about 1.4V @ 500mA which means 2.8 Ohms.
Inside the L9823, in addition to RdsON, there are two other resistors for current measurement.

We didn't measure it exactly, but emotionally there was no difference in detecting the temperature of the finger
 

KlausST

Super Moderator
Staff member
Joined
Apr 17, 2014
Messages
18,761
Helped
4,184
Reputation
8,370
Reaction score
4,120
Trophy points
113
Activity points
123,389
Hi,

TFT, STM32, MAC, pin count.....
You're getting off topic.

Consider to start your own thread to discuss these things.

Klaus
 

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Top