The IR obstacle detection modules on the AlphaBot were not working and the IR remote was also not working, so that was my project for the weekend.
One of the object detection modules wasn't functioning and the other one would function intermittently. This is a simple circuit, so not much to check - ir diode, photo detector, pot, and comparator.
Turns out it was a silly assembly error on my part. I neglected to use a nut as a spacer between the sensor board and the main board because the mounting screw I had used was too short. There is a copper plane under the soldermask on the main board and without the spacer the through hole pins on the sensor poked through the mask and were intermittently shorting out. I decided to use a short standoff instead of a spacer on the screw and that was an easy fix.
I still had another couple of issues with the sensor. I noticed in testing that the sensor would turn on whenever there was bright sunlight because the photo detector is not shielded. The quick fix for this was to print a shroud shown below.
The final issue with the sensor is the range. From what I've found on similar circuits - the range should be 2-30cm. I can only get up to 15cm consistently with the pot adjustment. That's not enough range to stop the robot if it is moving at full speed. I'll need to look at this more. I know that as an upgrade I'd like to use the 53L0X LIDAR sensors that would provide 1-2m max range. Below is a demo of the sensor operation.
The next problem was that the IR remote was not working with example program provided. The remote unit is shown below. It is using the NEC encoding protocol.
The receiver is mounted at the left rear.
A quick check indicated that the signal was being cleanly received - here is the output of the receiver.
The library being used for decoding the remote signals is the IRremote library. It is now at Version 3.1.0. The example program that I'm using was written at least 4 years ago and the library has gone through many upgrades since then - some major ones. I walked the Versions backward and it is working using Version 1.0.0 !! I don't think I want to spend time figuring this out - I'm just going to use the old library until I have problems.
I decided to try running using the remote and also verifying the obstacle detection.
The video is pretty laughable, but it appears that the remote and obstacle sensors are working. I need to work on my wheel speed matching issue next. There is supposed to be feedback from an optical sensor, but I'm getting poor repeatability. Maybe I'm expecting too much running open loop (i.e. without position feedback). Seems like it should do a lot better.
I probably won't use the IR control - I'll switch to using some form of RF (WiFi, BLE, LoRa).