short / open circuit of a sensor

hi, How can we find out the short circuit / open circuit of a sensor or something else which are connected to the microcontroller's port pin? Is there any algorithm available to check the fault of the line which will be implement into the software? Thanks

with regards Tamilmaran s

Reply to
Tamilmaran S
Loading thread data ...

Maybe, depends on a lot of details you did not give. OK, to give you a start: Is this uC pin an input or an output? Is it digital or analog? Please feel free to give more details than asked for.

--
Stef    (remove caps, dashes and .invalid from e-mail address to reply by mail)
Reply to
Stef

We in the controls business often set a sensors active range for .5 to

4.5 volts. So if we read 4.5 we know the sensor is bad.

Cuts down on the resolution I know, but when cost of believing a bad sensor is high, as in flight controls we make that tradeoff.

Tamilmaran S wrote:

Reply to
rjames.clarke

Stef, it is the analog input to the microcontroller. It may be a temperature sensor, in that the analog signal is converted into digital signal by using in build ADC for further processing.

Reply to
Tamilmaran S

hi, Is there any relation with 'open circuit voltage' and 'short circuit current' for justifying the fault condition? Can you give some circuit diagram explanation for your comments?

Reply to
Tamilmaran S

The classic way of detecting open-circuit sensors is with a pull-up - i.e. the sensor normally provides a voltage in a certain range, and an input signal above this range means it's open-circuit.

BTW, it's a little unusual to connect a sensor directly to a microcontroller port pin. Something like a thermocouple provides a voltage in the microvolt/millivolt region, and would need an input amplifier (and cold-junction compensation). In any case, connecting a remote signal directly to a microcontroller is a bad idea from the point of view of robustness - consider what would happen if there were a noise spike exceeding the rails on the input line etc etc.

Steve

formatting link

Reply to
Steve at fivetrees

We think in terms of coverage of possible failures.

We do not get 100% coverage of all failures.

But if we set the range for .5 to 4.5 and we get a voltage outside that range we have a good idea the sensor is not to be trusted.

Further coverage is usually accomplished by using multiple sensors and comparing the output of the sensors, for example if you have 3 sensors and 2 of the sensors are reading 1.1 voltage and the third is reading

2.5 then we suspect one of the three is bad.

By using a pull up resistor to the sensor we can detect a sensor open circuit or short circuit.

+5 | | R1 | --------------------ADC | | Sensor | | Gnd

Note R1 has to be sized with the sensor drive capabilities in mind.

Tamilmaran S wrote:

Reply to
rjames.clarke

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.