Good evening all, I believe I've tried everything I can think of to tackle a problem with a Lidar setup I have been working with and would like some general guidance / steering to get closer to the solution please:
Components: YDLidarX4, Elegoo Mega2560, screw shield, XCSource LLC (bi-directional) TE291 and a simple voltage divider
I've purchased an X4 to add to an ongoing robot lawnmower project and have set this up as a simple sideline rig to make sure it works before I add it into the main project (good job because it doesn't).
I've been able to prove that the lidar behaves correctly (physical and data) with the kit-provided test pc board and USB connection it came with. I've now set it up on my Arduino rig as per the default example .ino "ConnectYDLidar.ino"and as per the datasheet and it partially and intermittently works (I get 1/4 of the 360 angle range and plausible distances). However the primary problem is that the remaining 3/4 of the data is not available due to a 'scanned failed' feedback from the .cpp file. I have dug around in the cpp code and probed it to output the point where its unhappy and I believe its due to a corrupt serial data checksum and so refusing to output the data to the serial monitor (makes sense).
This is where I need guidance please ... I have set up the RX to TX communications between the 5v Mega and the 3.3v UART of the X4 via a LLC after reading the advice in the forums here. Has anyone else suffered from a checksum transmission error at 128000 baudrate over an LLC? to investigate further I'm not sure whether to move to simple voltage dividers next instead of the LLC or whether to chance connecting directly (awaiting feedback from YDLidar as their documents indicate 3.5V max on serial but also show a direct connection to an arduino in another document). Equally does anyone have any advice on protecting RX and TX lines from noise / shielding etc? All my connections are less than 10cm. Thanks all for listening and would be grateful of a general steer. I can of course provide code / diagram if necessary. Thanks. Gareth