iliasam / OpenTOFLidar

Open Source TOF Lidar
https://habr.com/ru/post/485574/
MIT License
752 stars 185 forks source link

Some questions about J1 pulse #24

Closed pikasm closed 6 months ago

pikasm commented 7 months ago

Hello, can you tell me why my J1 pulse is like this?

d4639802164b602f166058b4d8621b5
iliasam commented 7 months ago

Sorry, I don't have any idea about this. This pulse has wrong polarity and it is too long. Maybe TIA is broken? It is super sensitive to static electricity (ESD).

pikasm commented 7 months ago

OK, I'll change to a new TIA and try to see if the result is correct.

pikasm commented 7 months ago

I changed the DA3, and the signal became normal, but something interesting happened. I could see the histogram before the change, and after the change, the histogram disappeared, and my correction process was the same. This is my current J1 waveform. 4c40027e43819a1d9d8dc0f74bf2029

pikasm commented 7 months ago
1701230229899

This is my current histogram. My previous histogram signal can reach up to 25 cycles, but now it occasionally appears to be 1-2.

pikasm commented 7 months ago

I have tested my comparator, and I feel that its output of square waves is a little better than before.

pikasm commented 7 months ago

Of course, my laser spot has also changed a little bit. When its edge is clear, it becomes a line. I adjusted it to be a square, like this. 9933b55352b4d1391c948bc80265df7 d06f7f13058ba02236876a4373e50ba

pikasm commented 7 months ago

Maybe I should adjust it to square?

iliasam commented 7 months ago

You don't see histogram because measurements scattering is too big - too many wrong measurements. I can see that Laser and APD voltages are low. You can try to adjust laser lens to make laser beam to make it more square.

pikasm commented 7 months ago

ok. Thank you. I'll try.

pikasm commented 7 months ago

I adjusted the lens, but there was still no result. I went to measure the whole part of the circuit and found that the TDC crystal oscillator did not vibrate correctly (almost no vibration). I tried to solve this problem. I replaced the crystal oscillator four times, but there was still no result. I don't know why. Now there are no waveforms even at J1 and J2 (there were before the replacement), but the laser diode has light. I have no way to solve this problem.I am very sad.

iliasam commented 7 months ago

Adjusting lens do not help with bad signal, I give this recommendation only for future use in scatting mode. What is "State Mask" value in "LidarTestingUtility" now? It can't be laser light light without pulses at J2. So check R19, R20, wires to J2. You can do checks given here: https://github.com/iliasam/OpenTOFLidar/wiki/Electronics-assembling-notes

pikasm commented 7 months ago

I looked at state mask, and its value is 0x0 or 0x2.

pikasm commented 7 months ago

I have a waveform at j1, which is a waveform at 10v, but there is no waveform at j2. f84b80a2e5c23af5c7232c84de80ef1 da9148ce7f40a37cdc0edc26e354340

pikasm commented 7 months ago

Is it possible that my TIA is broken again?

pikasm commented 7 months ago

This is the waveform of my laser and comparator. 9f95cf2cd568250925d6699ad71ef94

iliasam commented 7 months ago

J1 is TIA output, J2 is laser current. You say: "but there is no waveform at j2." How it is possible that you have TIA pulses without laser pulses?

"This is the waveform of my laser and comparator." And now you say that you have laser pulses!

pikasm commented 7 months ago

I'm sorry, I'm in a bad state today. There is no waveform in j1. I'm very sorry.I am the one who confused j1 and j2.

iliasam commented 7 months ago

So looks like that laser is working OK. Maybe TIA is really broken. They die easily, I killed >5 of them in my experiments. I don't think that there is a problem with TDC quartz. In fact I'm not sure quartz it is really used by TDC because TDC calibration is not implemented in my code.

pikasm commented 7 months ago

I replaced tia, and there is no change. Maybe the avalanche diode is broken because of high temperature?

iliasam commented 7 months ago

I have never had such problem. Did you try to measure real APD voltage (C33)? How you controlling that laser light comes to APD? Did you try to test system without optics installed?

pikasm commented 7 months ago

Hello, during the period of disappearance, I re-welded a PCB board. I will recheck the problem with the previous board later. Now the test of this board is like this. I calibrated it. The current error is about 30-50cm. Is this normal?

pikasm commented 7 months ago
2cf363aa7c3a2099a594dda68c4eb54 229f37f90343e7e80ac61e4dfde2564
pikasm commented 7 months ago

Maybe I should change the value of TDCs BIN length?

pikasm commented 7 months ago

I didn't install the motor and the back part, I only installed the lens test.

iliasam commented 7 months ago

You histogram and calibration data are looking good. You can try to change TDC BIN length value: https://github.com/iliasam/OpenTOFLidar/wiki/TDC-BIN-length-calculation Also in non-scanning FW you need to set "Ref distance" value, as described here: https://github.com/iliasam/OpenTOFLidar/wiki/LidarTestingUtility

pikasm commented 7 months ago

OK, I'll try it tomorrow. Thank you!

pikasm commented 7 months ago

I changed the length of bin, and the distance value became much more accurate, but there was still a little error. I wonder if Ref distance plays a role in this. Perhaps it is also possible that my fitting value is too small. I took five points. I will continue to try later. Your work is great!

pikasm commented 6 months ago

I have a question. Is the distance used for fitting the distance from the PCB board or the distance from the MTAPD lens?

iliasam commented 6 months ago

In this project all distances are relative. So you can select zero distance as you want.

pikasm commented 6 months ago

I re-calibrated the Walk Error, and now the error of the measured data is 2-3cm within 15cm, and the error of the measured data is 1cm between 15cm and 2.5m.. Next, I'm going to install the motor and mirror. Do you have any good suggestions? Can you take a picture of the motor connection for me? Thank you very much.

iliasam commented 6 months ago

There is no certain schematic f motor connection. Just connect 3 wires from motor to P15; swap any 2 wires if motor is rotating in a wrong direction. Right direction is counter-clockwise when you look to the Lidar from the top.

pikasm commented 6 months ago

Ok, I will continue when the materials I bought arrive. thank you!

pikasm commented 6 months ago

My material is back. Do I need to download the scanning program from the single chip microcomputer next, which will change my previous fitting value? Do I need to recalibrate the optical instrument?

pikasm commented 6 months ago

Is there anything to debug after I download it?

iliasam commented 6 months ago

Yes, if you need scanning, you can take firmware from here: https://github.com/iliasam/OpenTOFLidar/tree/develop/Firmware/BUILD_FW_HEX/release_2 You will need to have "reference plate" installed. You can set motor PWM manually from PC utility. After that you need to check encoder output with oscilloscope: https://github.com/iliasam/OpenTOFLidar/wiki/Encoder

pikasm commented 6 months ago

The following is my understanding: I don't need to recalibrate the lens and other previous operations. I need to download the rotation program, install the motor test encoder, and install the reference board. Is that right?

iliasam commented 6 months ago

Yes.

pikasm commented 6 months ago

Hello, I installed the motor and downloaded the scanning program today, but my motor doesn't rotate after downloading. After I set the PWM value of the motor, the motor will rotate a little bit. I want to know what the reason is. Can you help me?

pikasm commented 6 months ago

https://github.com/iliasam/OpenTOFLidar/assets/147833145/7d3970b6-12cd-4f92-bca4-5ac3ee46fe8e

https://github.com/iliasam/OpenTOFLidar/assets/147833145/97380bff-b8e4-4986-9b70-8c7956d081fa

iliasam commented 6 months ago

Please create new issue for this.