iliasam / OpenTOFLidar

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

Questions on encoder and disc #18

Closed buzzzzm closed 11 months ago

buzzzzm commented 1 year ago

hi,iliasam, I have tried to follow the Electronics-assembling notes and test my advice in no-scanning mode. I found my encoder can’t detect the disc with 65 silts, so I replaced it with a 20 silts disc. image image

When I use the hex file you give, the “testing utility” showed “0x8”-wrong number of encoder events. 1

So, I changed the parameter “ENCODER_HOLES_CNT” to 20. But the data is not displayed when I run the “testing utility” again. why??? 2 image

Can I change the disc to a 20-slits one?
Or what model of the encoder can detect a 65 silts disc? I want to know the product model. The one I bought doesn’t work well.

iliasam commented 1 year ago

First question - is your Lidar working well in non-scanning mode? Possibly FW should work with encoder disc with 20 slits, if you rebuild the firmware. Have you checked that your encoder is working well with an oscilloscope? I can't give you model of my encoder sensor, because I take it from old printer. Maybe RPI-352 sensor will work well.

buzzzzm commented 1 year ago

First, I tested in no-scanning mode, is it working well? The pictures are calibration page and no optics test results. image image image image image

I checked the encoder with an oscilloscope.

29807c692123410447651bf6cae8821

I will buy the RPI-353 sensor and test with 65 silts disc.

iliasam commented 1 year ago

Your results in non-scanning mode are looking OK. Oscilloscope picture from the encoder is looking well, too. I can't say now what is the problem. You can check MCU pin 10 with oscilloscope to ensure that encoder pulses are getting to the MCU. Also I can see that "BIN length" is NaN at your first photos. This is not correct.

iliasam commented 1 year ago

scanning_fw_20_holes.zip You can try this FW - I build it for encoder with 20 holes. Also I had increased ENCODER_TIMEOUT_MS value to 25 ms.

buzzzzm commented 1 year ago

I downloaded the hex file you just sent, but the testing utility doesn't work. And the BLDC motor rotates at a faster and unstable speed. 未命名1688643266 And I downloaded the hex file "scanning_fw_pcb_v4" again, the state mask is 0x8. The motor starts fast and then slows down, eventually stabilizing its rotation. image

222

iliasam commented 1 year ago

You can try to use "scanning_fw_20_holes" FW and set speed of the motor manually at the "Motor Settings" page - see "Motor Manual PWM" -> "Set" button. Do "Motor Speed" value is measured OK in this mode?

iliasam commented 11 months ago

Do you have any progress with your problem?