I have a setup that combines of LLV3HP and RPi3b+ with Rasbian stretch. I’m using a standalone PSU with 2.5A@ 5V. The problem is that everything works fine, but once or twice in a month the sensor stops and returns only 0. Then I have to keep the system off power for about 5 minutes and then it starts again. If I just reboot or keep it off power for 10 seconds it will not start.
Seems like a weird situation. My first guess would be that the LLV3HP’s internal state becomes incoherent and it thus stops responding and needs to be power cycled.
Have you tried modifying your code to detect those instances (i.e.: a “long” string of 0s) and then send a “reset” command to the LLV3HP and see if that helps? Of course, if you changed any settings they would need to be changed again.
See page 8 of the datasheet for details (register 0x00).
Also, is the device in an enclosed space? Maybe it is simply overheating / needs time to cool down? This would also explain why it can’t just be quickly power cycled (and needs minutes before it’ll work again).
In the meantime I have contacted the manufacturer to see if they have any other troubleshooting ideas. I’ll post here again once I have more information.
Here’s what the manufacturer has to say about that:
Concerning I2C issues, here are more details:
When you have these crashes do you power cycle both the RPi and sensor or the sensor only? It seems likely that in such a case the issue would be with the RPi I2C, not the sensors. The manufacturer further proposes the following:
Also, to help with the setup you may want to try the following:
Thank you for taking the time to elaborate on the matter. The truth is I don’t have 1 sensor that act’s that way, i have 9.
First thing I do before setting any filter options is writing 0x00 to 0x00 (can’t find a way to post a picture of the C++ code). The power delivery is via line interactive ups, then a Meanwell 2.5 A 5V PSU set @ 5.1Vout. Due to the fact it’s an industrial region, the power can fluctuate on the 220V mains! Also checked syslog of RPI, no indication of under voltage.
I have tried voltage drop until 3.3V in the lab to get a similar problem, but that is not the case. Love the device, but this issue is causing a lot of trouble. Can it be a voltage peak on 220V mains?