Page 1 of 1

DS18B20 reinit bug

Posted: Fri Feb 17, 2017 1:31 pm
by DigitXT
If some disturbance stops the communication between the UTCOMP PRO and a DS18B20 sensor, the display shows "- -", so I guess the UTCOMP knows exactly that something gone wrong, but doesn't try to reinitialize the temp sensor(s). In my case it's clearly a short voltage peak that cause to stop the communication (switching on the HID lights). The "- -" is showed only after I change screens. Or for example when an alert screen closes making UTCOMP to refresh the whole current screen. While no refresh is done, the last read temperature value is kept showing, making it hard to detect, that the sensor (for example outer temperature) just stopped working...

Can it be done in the firmware to (re)initialize the DS18B20 sensors after the "anomaly" is detected? Anyway: is it detected by the UTCOMP before the screen refresh? If it is, the UTCOMP should show the "- -" immediately, and show the measured value again only after successful reinitialization, if it is successful, and there is no permanent error. (For the time being my only solution is to switch off the ignition, and after switching it back, sensors are reinitialized, and working fine again.) Yes I know I should eliminate that voltage peak in the first place, but even then, if any other disturbance happens from any unhandled reason, the situation is the same:
DS18B20_DQ.png
DS18B20_DQ.png (97.19 KiB) Viewed 4484 times

Re: DS18B20 reinit bug

Posted: Fri Feb 17, 2017 2:07 pm
by ArT
UTCOMP has built in 2-stage reinit for DS18B20.

1. When it detects communication error than it will display "--" or last successful read temperature. It will try to software reinit ds18b20 sensor after few seconds (2-8 seconds - depends on how many sensors do have you connected) and if it success - it should display next successful readings.

2. When software reinit does not success than it is required hardware reinit (disable power supply for sensor and re-enable it after some time) - it is possible only when ignition switch is disabled so re-enabling ignition switch should return sensor back to work.

It seems that it is required hardware reset in your case (sensor is not responding for software reinit until power is re-enabled). In this case I recommend you to use shielded wires for sensor and it should help.