-3
\$\begingroup\$

Yesterday I had an argue with an electrical engineer. I am a beginner software engineer. He say that a logical circuit( processors, microcontrollers) should never be trusted in risky applications. What is your opinion? Can microcontrollers be trusted or not?

Update: Let's take an inverter circuit commanded by an atmega( schematic, source). He said that somehow the uC might produce an error which may lead the circuit in an unknown state that can be dangerous.

\$\endgroup\$
3
  • 1
    \$\begingroup\$ Someone who calls himself an electrical engineer and states things like that doesn't know much about what is going on in the real world. Proper design and testing will almost eliminate that risk and in many cases extra hardware can be added to prevent certain conditions. Microcontrollers are used in many applications including risky ones like in cars, hospital equipment, and industry. \$\endgroup\$ May 28, 2016 at 11:04
  • \$\begingroup\$ What they all said - BUT it is generally easier to make circuits in hardware alone than with software software if operation in very very very risky/harsh conditions is required. Hardware only solutions can still fail due to extreme noise and timing issues. An internet contact of mine designs electronics for use with very high voltage and current contactors. People working in close proximity wear what amounts to "armour" that keeps them alive in the event of a contactor opening. People would literally die without them. Obtaining certification of software solutions for use in such .... \$\endgroup\$
    – Russell McMahon
    May 28, 2016 at 13:48
  • \$\begingroup\$ ... environments is possible but extremely costly and demanding. \$\endgroup\$
    – Russell McMahon
    May 28, 2016 at 13:49

2 Answers 2

3
\$\begingroup\$

Yesterday I had an argue with an electrical engineer. I am a beginner software engineer.

As an Electrical Engineer: Um... well... you came to electronics.SE, so prepare to hear the opinion of the EE?

He say that a logical circuit( processors, microcontrollers) should never be trusted in risky applications. What is your opinion? Can microcontrollers be trusted or not?

Either he's 90 years old, not really an electrical engineer, or you're not 100% saying what he did.

So, giving this the context of your question's title (which you don't mention anymore in your question), he probably said something along the lines:

Many high-voltage applications are controlled in normal operation with digital electronics, as that is easy, cheap and reliable to get right on the first try. However, especially for high voltage operations, where there is constant risk of fire, death and other damages, you cannot afford to leave out the analog, and extremely unlikely to fail, safeguards. This goes as far as that in very high power applications, the safeguards are so expensive and hard to implement, you can as well control the whole thing with fixed, analog circuitry.

I mean, look at you, you're a beginner software engineer. Software has bugs. If these bugs mean your website crashes, oh well. If these bugs mean a big power transformator explodes, you will want to make sure that some hardwired safeguard is in there.

Other than that, your schematic:

Schematic

Are you being sarcastic? 25V is not high voltage. It's called extra-low voltage. The problem here might be the high current you might be switching with the MOSFETs. And exactly that is the problem here:

Not only is your software potentially non-perfect, there are many undefined states that might happen if the switching induced high interference. These states might include one where both mosfets in a series are "on", thus shortening supply voltage to ground, burning the MOSFETs.

So, an analog circuit (or even some fixed digital single gate, XOR) making sure that these pairs of transistors can never be switched on simultaneously.

How would you program and test the software for that microcontroller? Formal verification that your program won't do such a thing isn't really enough in the harsh realities of hardware.

So act like you're a software engineer. Know that software is not without risks, and acknowledge your EE friend's experience in preventing death. I recommend offering him a fine pint of beer as acknowledgement.

\$\endgroup\$
0
\$\begingroup\$

I think you should have read the FAQ section of EE.SE, Your question ask for opinion and is a little too vague and can have multiple answers.. Anyways I shall try to answer it.

Your question is a little difficult to understand but judging by the title and tags you seem to want to use a Microcontroller or a Processor in High Voltage circuits. If that is the case then your friend is definitely correct. Since Logic level circuits are designed to use and work with low voltages and most microcontrollers can't tolerate more than their described amount. But you could build additional circuits which take preventive measure such as using an opto-coupler or using transistors as switch to control things using a microcontroller but you always have to be careful. Sometimes it also results in unnecessary noise being produced in the circuit. Which is what makes the microcontroller unreliable.

\$\endgroup\$

Not the answer you're looking for? Browse other questions tagged or ask your own question.