In this chapter we will be covering the most substantial topic of all, techniques to dock your robot to it's battery charger. We will start our discussion showing the ideal situation, where everything works perfectly and the robot drives right to the beacon and docks. Next, we will delve into some additional charging concepts, with some ideas for you to ponder on recharging your own robot. And finally, what happens when things go very wrong, pitfalls to look out for in your docking designs to avoid. Keep an eye on that power gauge I put on the back of the PicBot, you'll see it change!Normal Docking Operation
During the robots task, which could be anything from floor cleaning to simply roaming the robots battery will drop below a preset threshold. The robot then enters the "Hunger State" in its program and begins to look for the proximity of the charger beacon. For home robots which simply roam in an unstructured environment, the robots behavior will not change unless the docking beacon is detected. Then the robots behavior will shift to the process of localizing the beacon and heading for the charger.
Alternately, in a more structured or mapped environment the robot can then look up its current position, and plan a path towards the distant charger. This of coarse is much more efficient and will allow the robot to work longer on the existing battery charge before heading over to the charger.
Proximity Detect State
The next phase in the ideal docking sequence is proximity detection of the charger beacon. Here the robots prox sensor is struck by the narrow IR beacon beam and the robot immediately stops in its tracks. It must next locate the direction of the beacon to drive towards it.
Precision Alignment State
Next, the robot must aim itself exactly at the direction of the beacon. The reason we do this as a separate step is because that while the prox detector is a wide angle omni-sensor that can allows us to rapidly determine we are somewhere near the charging base, the precision alignment detector is very narrow angle, and allows us to accurately point in the direction of the charger beacon, drive to it and dock with it very accurately. To try to combine both sensors into one increases the complexity of the sensor array, and increases its cost. By separating the two tasks, we can use a minimal number of expensive sensors, and concentrate on optimizing each task separately.
Drive To State
Next, the robot sees the beacon on the charger dead ahead. We start moving forward towards the beacon but as we travel, must gently vary the speed of each motor if needed to keep the beacon centered. The result is a swaying "S" shaped path on its way to the charger.
Slow Approach State
When we are within a short distance from the base, we really need to slow down. This does two things. First, it allows the robot to more accurately drive to the beacon source because it is not overshooting its driving corrections. Second, if we fail to dock the first try, the robot may slam into the charger either damaging itself or the charger base. Often I have read in the case of a certain commercial floor cleaning robot, the robot slams into its base and pushes it across the room as it tries desperately to dock! So slow down.
Robot Docked State
The robot has now successfully docked with its charger and it is time to shut all non essential systems down. Using a relay or other solid state switch, turn off all non essential devices and processors on the robot. Leave only the main processor working to monitor the charging process. By doing this, the robot will charge much faster and will give the electronics a rest.
Other Docking/Charging Ideas
Docking Escape State
Once our robots internal processor has determined that the charging process is completed by either a time out or reaching a threshold in the batteries voltage, it is time to leave and continue on with its task it was performing before it docked. The robot must back off the charger, rotate away from it, and move on. There are some amusing problems that can occur at this time, and well cover them later.
In this section, we will cover some additional docking and charging ideas for your robot. While not all will be applicable to your situation, there will be certain conditions where there are only a limited number of ways to recharge your machine. Remember in the next chapter we will be going into extreme details on putting some of these techniques to practice, so be patient, and absorb some of the theoretical aspects of docking listed here for a broad background in the whole concept of successfully building a self charging robot.
Idea #1: Solar Docking Bay
The robot follows its beacon to its charger, which here consists of a small car port style overhang. The underside of the overhang is a flood lamp, which turns on when the robot is under it. The top of the robot is a solar cell, and is very close to the lamp for maximum power transfer. What's good here is there are no charging contacts, and the accuracy of the docking can be way off and this will still work!
Idea #2: Outdoor Solar Charging
Putting the same robot outside, it has constant access to recharging. When the robot enters the hunger state, it simply stops and turns itself off to bask in the sun. A constantly moving robot will not recharge by such a small solar panel unless it stops moving, but it will extend its on time operation considerably by adding to the batteries existing power.
Idea #3: Charging Hut
Why not make a dog house style hut for your pet robot? In this case, the sides of the robot have copper plates on it and it rolls into the hutch and connects to the power by long contact fingers on its sides. Accuracy does not have to be perfect, and the hutch can be easily moved to other locations. It is a bit on the large side however, but can be used at night to protect the robot from being stepped on in the dark. (Ok, I did this once.)
Idea #4: Generator Wheel
Inspired by a bicycle generator, the robot can just drive up to the motor, turn it on and recharge by its internal generator with wheel. For a rapid charge battery such as is used in RC cars and planes, this works great, putting a huge amount of power quickly into the batteries, which are more like super caps.
Idea #5: Water Paddle Wheel
Just so you don't think I forgot water bots, a small paddle wheel under the robot can be used in a current to charge the batteries as well. We don't want our "boat bot" to run out of charge in the middle of the lake do we?
Idea #6: Wind Power
Either outdoor or indoors we can recharge our bot with wind power. Inside, a box fan of the vortex type can be used to push a blade on the robot. Using simple vane sensors we can guide the robot in as well to the wind source.
Idea #7 : Roomba Style Dock
A bit complex to explain, but basically this method forces the robot to drive up a small ramp, then its wheels drop lowering the robot onto its contacts with gravity force. This permits a spring loaded contact to work well, but the tolerance here is pretty tight.
When Good Robots Go BAD
Idea #8: Outdoor Wind Power
For an outdoor security robot, what better way to keep charged than with the power of the wind? Smaller than a huge solar panel, this allows the robot to carry a minimal load and be more self sufficient.
Here we will discuss some of the problems and pitfalls of designing a self recharging robot. All are preventable with careful design, and a match of the docking technique to the expected environment - be it the household or factory floor. Don't say I didn't tell you so...
Pitfall #1: The Night Life
Your asleep, and its the middle of the night. Suddenly you hear this beeping, whirring and motors coming to life! Yes, the robot has finished charging its batteries, and its 3am.
So what can we do? Easy. Put a photocell on the robot and have it check it when its finished charging. If its dark, then have it wait an hour before checking again. This will keep it on the charger until morning light.
Pitfall #2: No charging power
If the robot does not see any charging voltage on the base, it must take action. Typically, the robot experimenter forgets this is possible and the robot will keep on trying to dock over and over without end. Plan for this! Make sure your robot has a contingency plan to enact if it does not find voltage on the charger base. Whether its a power outage, bad contacts, or someone unplugged the charger, it WILL happen.
Pitfall #3: Just out of of Range
The robots Proximity detector finds the beacon all right. But its just out of range for the precise detector. The robot will then get stuck in a loop - rocking back and forth or circling forever not finding the beacon.
Make sure the precise detector has either greater range than the prox detector, or it is not possible for the robot to encounter the ends of the beams range by putting the beam across a hallway which the robot traverses.
Pitfall #4: Docked with Reflection
It is easy to forget that a bright IR beacon not only goes straight ahead in a narrow beam, but can be reflected by the sides of the tube it is in to give side lobes. This can reflect off nearby objects and cause the robot to try to dock with the specular glint off of a nearby shiny surface.
Keep any reflective surface away from the charger base, and be certain your robot can deal with those cases in which it encounters a false signal.
Pitfall #5: The Circle Dance
Affecting primarily Roomba style docking scenarios, the robot can graze the beam and miss the beacons other guiding beams all together.
Make certain your robot can deal with loosing a docking beams signal. You don't want it to get stuck in an endless loop circling for the lost beam.
Pitfall #6: The fast Approach
If you don't slow down when in the last few feet of the charger, you may strike it hard enough on an unsuccessful dock to damage your robot.
Use a sonar or IR prox sensor to watch the distance between the robot and charger base. Slow down to half speed when within a foot or so.
Pitfall #7: Obstacle in Beam
You must keep all objects near the charger beacon at least half a dozen feet away to keep the robot from clipping the edge of the beam and missing it. Where the beam is strong - keep it that way over the entire length.