Here goes a bit of story how I get there, for those who bored of text jump straight to the juicy pictures.
I acquired a broken Neato Botvacrobot vacuum on eBay recently. Seller has said that vacuum asks to turn power switch on, which is hidden in the dust bin compartment. But switching it on does not help and robot won't start cleaning. Otherwise it looks in good condition. Ok, easy fix I thought.
When I received my new robot I turned that hidden switch on and it helped, robot recognized that switch is in on position. I have not started vacuum cleaning that time but gone to clean robot itself first including filter. Next time I turn it on and it asks for that switch again, ok bad contacts perhaps. I flicked that switch couple dozen times and robot started to recognize it every time, fixed :) I do not know why that switch is there, is it some kind of battery kill/safety feature for transportation?
Well, nothing left just to try cleaning procedure. I started it by pushing button with home icon, robot moved away from it's charging bay and started vacuum motor, Lidar spinnig and then brush motors. But it was doing nothing but stopping itself and respin all motors. Then it threw 4000 error to me. I tried several time and everything I've got is a bunch of 4k errors, 400x, 40xx errors. That errors means something wrong with Lidar unit. It can be motor which can not handle specific 5RPM or it can not "see" because of dirt on lens and so on.
That "hat" over Lidar unit is easily removable. So I removed it and cleaned lens and it does not help at all. Lidar was spinning fine though. Ok, not easy fix anymore :)
Now to debugging. There is an USB port on the robot inside dust bin compartment alongside that mystery switch. It is like RS232 USB bridge, just a serial port you can talk to. No drivers needed (if you are on Linux for example). I used "GetLifeStatLog" command which is described in official Neato Programmer's Manual. But is does not work. Botvac is new series of vacuum robots made by Neato Robotics and they removed some useful commands from it. This "GetLifeStatLog" could help me with Lidar debugging, but oh well we'll find another way.
To make a long story short, I was getting the same output from Lidar unit as this guy at robotreviews.com.
TestMode On SetLDSRotation On GetLDSScan AngleInDegrees,DistInMM,Intensity,ErrorCodeHEX 0,0,0,8055 1,0,0,8055 2,0,0,8055 3,0,0,8055 4,0,0,8055 ... all the way to 359.RPM was from 4.98 to 5.12 which is totally fine and correct. Basically this output means that Lidar can not "see" a thing. Either it is blocked lens, broken CMOS sensor, dead Laser diode or dead Laser Driver circuit, all sort of things. But at least Lidar unit can talk and respond to main system.
Lens is clean, I can not "test" anything here. But I can test laser. Lidar laser diode is an IR laser diode. But it is not just regular IR diode which you have in your tv remotes. Regular remotes has 930-950nm wavelength IR diodes and you can "see" them just by looking through your phone's camera for example, try it. But Lidar unit has 785nm wavelength IR which you can not see good enough through that camera. I want clearly see if laser works or not.
Let's make IR sensitive camerafrom a regular webcam. Regular cameras has IR filter in front of it's sensor, we need to remove it to make it more sensitive to lower wavelength. I used a laptop webcam module for this purpose, it's cheap HD, it's USB and it's easy to remove IR filter from. Also I can change focus range, more on that later. Sorry for the pictures quality, my normal camera was busy on another installation. This is how it looks.
You need to unscrew lens from the camera. There is a microphone in the middle and camera to the right. Lens is adjusted for infinity focus and glued in place. Just scrape glue off and unscrew lens. Then flip it upside down.
QFN32 soldering inspection on home made pcb.
So when I've taken pictures of lidar working I could not see laser beam at all. Laser was not working at all. All I could see is IR optical data connection between rotating lidar head and base unit (light in the middle of rotating head). I will use black and white pictures due to quality.
Seems something wrong with IR laser driver or laser diode itself. I disassembled Lidar unit and reversed laser driver to schematics. It maybe a bit wrong, but mostly correct.
It's a bit hard to identify sot-23 transistors and mosfets. So the laser diode driver has 3 controls and 2 feedbacks. There is power on signal to turn power on to the laser diode and driver unit. This signal is constantly on when lidar start spinning. There is also constant PWM signal it also constant when lidar head spinning. And there is some kind of modulation, there are 2 types of pulses modulation. Botvac change this modulation each time lidar start spinning, so next time you get second modulation type. Also this can be laser diode constant current control or it is shared with constant PWM signal.
I disconnected laser diode and tested it with power supply.
It was kind of working. That means driver circuit is dead. I tested Q2 and Q1 and they were dead I replaced them with similar parts. I also shunt Q3, there are jumper pads on the driver pcb. And a result was not that great. Laser diode was working but it was not producing much light than it should.
You can see it's barely visible at all. Then I made a small pcb with 2 color leds and attached it to driver pcb on the spinning lidar head to check control signals. That's how I know there are PWM and modulation.
You can see PWM and modulation here.
All signals seems OK, but laser diode is dim. I think it was damaged when transistors were blown. The only fix is to replace lidar unit now, but I could not find Botvac unit available for sale nor laser diodes available. There is difference between Botvac and XV series lidar heads. XV uses sliding mechanical contacts for data connection between lidar spinning head and the base. But Botvac uses optical data connection.
Let's finally repair it in the second part: Neato Botvac Lidar Repair Part 2: Lidar PCB Replacement