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
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)
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.
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?
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.
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.
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.