Hi,
I’m using your TFmini Lidar UART sensor with Arduino UNO.
It is working very well and I think this is a very interesting product but, sometimes, it seems to have some problem.
I’m using it with Arudino UNO (trying different libraries) and a 5V-3V3 Logic Level Converter and sometime I get strange measurement of the distance (-3cm) which remains stuck forever.
Serial communication continues working and retrieving data from the sensor but this data seem not to have any sense and are not updated anymore.
In a case like that I’ve seen that unplugging the sensor from the power supply and plugging it again, measurements will be available again and reliable.
However the problem is still there and, from time to time, the error will appear again, especially when I move the sensor aiming object far away from it.
I’ve also noticed that when I’m experiencing that error, the red light coming from the sensor lens is off!
Then, when plugging it again, the red light returns on and measurements will restart to be available and reliable.
Why? It seem to me some kind of power saving mode? can it be?
Is there some instruction from the product manual I can send to the sensor in order for it to wake-up again?
How can I solve this problem?
I’ve made many attempts:
-
I’ve tried with different detection object, but the majority of tests I’ve made, I’ve made with a little white cardboard box;
-
This is a [link to the video I’ve just recorded;
-
to change the breadbord;
-
the jumpers wires;
-
I’ve also tried connecting the sensor directly to the Arduino bypassing the breadboard and cables completely;
-
I’ve also tried changing the Arduino, replacing it first with another UNO and then with the MEGA (moving from SoftwareSerial to Serial1 communication port);
-
I’ve also tried with a TFmini which has an I2C interface instead of UART;
-
I’ve tried different libraries;
Problem still remain.
Can It be a problem related to the current consumption (I’ve read that we can have a maximum of 800mA
peak current consumption from the sensor while I know that an USB powerd Arduino can provide a maximum of 500mA only).
So I’ve tried using a 9V DC power supply attached to my Arduino UNO but the issue is still there.
Below a short description of my circuit :
-
Arduino GND attached to: Logic Level Converter GND and TFmini Lidar GND;
-
Arduino 5V attached to: Logic Level Converter HI input, TFmini Lidar VCC;
-
Arduino 3V3 attached to: Logic Level Converter LO input;
-
Arduino pin 10 (RX) attached to: Logic Level Convert CH1 input;
-
Logic Level Converter CH1 output connected to: TFmini Lidar TX;
-
Arduino pin 11 (TX) attached to: Logic Level Convert CH2 input;
-
Logic Level Converter CH2 output connected to: TFmini Lidar RX](https://youtu.be/nVkZQPBdaAc)
tfmini_lidar_class.zip (4.58 KB)