Tuesday, October 11, 2011

DIY Telepresence Robot - Part 9

Upgraded Power Management

So after several months of operation I encountered a number of problems with the design.  I would frequently (twice a day) lose control of the original robot and have to reboot the system because of connection problems in the USB/Serial interface between the laptop and iRobot Create.  Additionally I had semi-frequent problems (twice a week) maintaining proper control of the PowerPod.  It would occasionally go crazy, escape my control, and orient itself at odd angles.  Those problems were annoying but relatively manageable for a while.  However, when the battery charger in my original iRobot Create broke and I had to replace the iRobot, I began to have even worse issues.  In addition to the original control loss problems, the iRobot Create would frequently "brown-out" while docking which would drop power to the laptop and leave it dead in the water.  I would have to get a coworker to help me power up the system each time.  These problems almost always occurred during the docking maneuver which itself draws a large amount of power, so without much evidence to go on I hypothesized that it was a power management issue.

I originally wired the laptop to theoretically draw up to 3A of power from the Create, but honestly I never really did any boundary testing to determine whether the hardware could handle this type of draw.  Maybe the Create power pins cannot actually supply the 3A (maybe only 1 pin can draw fully at a time) or there is an undocumented total power limit that the battery can supply to the hardware.  When this power ceiling is exceeded the Create crashes and power cycles.  Another possibility is that the power state transition between not-charging and charging is sometimes not very smooth and causes a momentary drop in power.  Either way it seemed like the best thing to do would be to minimize power draw as much as possible.  I only had circumstantial evidence, but with nothing else to go on I went ahead and made changes in both hardware and software to reduce and smooth power usage.

First, I wanted to take all of my USB components off the laptop motherboard power supply.  The video camera and PowerPod in particular both draw a fair amount of power and it might be difficult for this low power netbook to power them adequately while also running itself.  Spreading out the power draw across multiple circuits might help minimize stress on the system.  I bought a cheap off-brand powered 4-port USB 2.0 hub.  The hub accepts a 5V power supply so I bought an extra voltage converter to step from the battery voltage down to 5V and a simple breakout connector to hook it up with.

SWADJ3 Voltage Converter

I wired power pin 11 and ground pin 16 to the SWADJ3 input.  Next I adjusted the SWADJ3 until it output 5V DC.  Then I cut the AC/DC converter off the USB hub power cable and rewired the power cable to the SWADJ output so that the USB hub could now be powered directly from the iRobot Create battery.

Installed SWADJ3

Now I was able to unplug the three USB cables that were plugged into the laptop and replace them with a single USB connector to the hub.  The three previous USB connected components: iRobot Create, PowerPod, and webcam were all plugged into the hub and receive power directly from the Create instead of the laptop.

4-Port USB Hub
Cleaned USB Cables
In addition I modified the software to allow for manual toggling of both the Skype video feed and the netbook screen.  This reduces the battery draw by about 300mA - 400mA and gives the Create itself more power to draw from.  This low power mode is especially helpful during auto-docking when the Create needs a lot of power.  Since the iRobot Create plays a little song upon successful docking, it is not strictly necessary to visually monitor the docking maneuver.  I can simply watch the TPRobot docking and voltage indicators and listen to the Skype audio feed to determine when the robot has docked.

I have been operating with these changes for the past three weeks and the results have been very positive.  First off - I seem to have eliminated the PowerPod problems.  Moving it to a dedicated power source really seems to have solved that issue.  Not once have I experienced a loss of control over the PowerPod and I find myself using the neck even more now that I have confidence that it will work properly.  In addition the changes seem to have resolved the problem that would cause the battery to slowly drain over the weekend. For two weekends straight the robot has stayed alive for the entire duration without my intervention.  This was totally unexpected and a nice surprise for me.

But most importantly, I have GREATLY reduced both the USB/Serial interface connection problem and the docking power loss problem.  Whereas before, I would experience these problems 2-3 a day now I only see them 2-3 times a week.  These were the key problems that plagued me daily and rendered the robot nearly unusable.  Unfortunately I have not completely eliminated those issues, so the robot is still not stable enough to be used in a completely autonomous manner, but the inconveniences now are infrequent enough that they don't really bother me much anymore.  Having to ask a coworker to reboot my machine once a week is not a significant burden, so I am currently satisfied with the design and will probably not try to improve it anymore in these regards.  If I were to attempt to improve its stability even more, I would probably try and reinsert the battery into the laptop.  That would at least prevent the laptop from ever crashing due to brown-out.  The cost however would be to significantly increase the weight and stress on the PowerPod and since I have new components planned for the head, I don't want to disturb that part of the design.

Here is the updated TPRobot software that I am using.  It has the toggle controls for video and screen under the View menu.  Currently I am turning off both video and screen during docking in order to minimize battery draw.  In addition there is an alpha version of a shared whiteboard included that I have been developing so that I can easily make sketches on the robot screen.  It is functional now but not finished, and I will cover it in more detail in a future post.

TPRobot_0.8.2.zip