Linux robot automatically charging

Since the robot’s rebuild, I finally tackled the automatic charging situation. There are a number of ways to get the device to autocharge. If it always has line of sight to it’s charger, it can spin until it finds it using infra red, then follow the beam – this however doesn’t work without line of sight. It could use a compass, although there are too many magnetic fields, and this requires advance knowledge of positioning. The simplest method would be to always start on charge, and just store movement history, reversing it when it was necessary to charge. Problem here is that even with good wheel alignment, AND accelerometers, even after few movements, simply reversing them is often not good enough to get it even close to it’s original position.

There are a couple more options. There’s the black tape along the floor that the robot could follow – too simple/boring. I think that the best option would have ideally been to use several radio types and some decent AI programming to get the robot closer and closer accurately. It could have used bluetooth/wifi to get a general idea of the direction of it’s charger, an AM transmitter at the basestation and AM receiver on the robot to position it closer, and then finally line of sight with lasers or IR beams to get right to the base station. The issue here comes down to the software development – how to weight signal strength vs objects in the way. Lets say that our signal is 95% but we’re in the wrong room and separated by a wall, we need to figure out that although our signal strength is 95%, we’re actually not in the right place, and we were closer when our signal strength was 70% and we were at the door. Perhaps with some super intelligent coding, this was an option but I didn’t have the time or the patience.

There are probably a few more options that I didn’t think of, although I decided on a reasonable but quite simple solution. I don’t think that the prerequisites are unreasonable:

  1. The robot starts on it’s charging point
  2. The following prerequisites are inherited from the automatic moving in general:
    1. The robot is not manually moved or pushed about. It needs to know where it is.
    2. If the robot finds objects it wasn’t expecting, it’s in trouble.
    3. The territory is mapped and functions are provided to navigate it in advance.

Using the automove covered in the previous 2 posts, the robot can move automatically throughout a mapped terrain. It can use any of it’s other sensors and logic to decide which routine (path) to take at the end of any given routine. The only difference here, is that a specific charge function has been written. The last function in the routine below ends the robot about 12 inches from the charging station. The charge function brings it back and closer in smaller increments, lining up using it’s right and back sensors. It then turns it’s charging terminals on, and makes smaller still movements and adjustments until it detects charge.

Tagged with: , , ,
Posted in Projects, Robot, Technology

Leave a Reply