Monday, August 29, 2011

DIY Telepresence Robot - Part 8

Users Guide

This guide gives an overview of the control software, the robot behavior, Skype integration, and guidelines to keep the robot up and running.  If handled correctly the robot is capable of autonomous operation for weeks at a time, but to keep the robot healthy it must be carefully monitored and used on a near daily basis.  Left unattended over a weekend and the robot will likely die (refer to the Problems section for details) 

Robot Controller

The TPRobot program is actually two applications in one.  One instance runs on the Asus netbook and functions as the Create and PowerPod controller and listens for commands from the control computer, and another instance runs on the control computer and sends commands over the Internet to the first instance.  These two aspects of the application or depicted visually as a tab control.  The first tab is called "Local Connect" and embodies the robot interface.  It has settings to interface the Create, the PowerPod, and to create a command listener.

  • iRobot Serial Port - The COM port number for interfacing with the iRobot Create
  • Tracker Pod - Enables attachment and control of the Eagletron PowerPod.
  • Allow Network Control - Enables a network command listener.  Connections and commands are sent through the Skype network.
  • Password - Skype authenticates which accounts are able to connect and issued commands to TPRobot and all Skype traffic is encrypted.  However, for additional security this password is also used to authenticate the connecting peer.
  • Attach - Attempts to connect to the Create and PowerPod.  Once connected the robot will be in "drive" mode and the battery will not be charging - even when it is sitting on the charger.
  • Detach - Disconnects from the Create and PowerPod and puts the Create into charging mode.  You must detach the robot to charge the battery.

      Remote Controller

      The second tab - called the "Skype Connect" tab is used to configure the remote controller.  All communication between the two applications is sent via the Skype network.  Skype is primarily thought of as a VOIP app, but it is also a generic communication platform that can be leveraged to send messages between external applications.  The Skype application serves as a proxy, setting up the connection and handling the data transmission.  The bandwidth is not terribly high but for an application like this it is more than adequate.  The benefit is that Skype handles all the messy details of connectivity, firewall traversal, encryption, and message reconstruction for you.

      • Skype ID - The Skype ID of the account being used on the netbook.  Separate accounts and ID's should be used for the netbook and control computer.
      • Password - This should match the password configured on the netbook.
      • Connect - Creates an authenticated Skype connection to the robot controller.  Upon successful connection the screen will be turned on and the robot will be automatically "attached" and drive mode initiated. 
      • Disconnect - Closes the connection to the robot controller.  The robot interface is "detached" and the charge mode is initiated.  To reduce the power draw on the battery while in charge mode the robot screen is also turned off.

        Driving Controls

        The driving controls are all keyboard based using a layout familiar to gamers.  
        • Move Forward     - W
        • Move Backward  -  S
        • Turn Left              -  A
        • Turn Right            -  D
        • Up-Shift               - Space
        • Look Up              - Up Arrow OR NumPad 5
        • Look Down         -  Down Arrow OR NumPad 8
        • Look Left            -  Left Arrow OR NumPad 4
        • Look Right           - Right Arrow OR NumPad 6
        • Look Straight       - NumPad 7
        The left hand moves the robot around using the WASD key set.  Holding down the movement keys will accelerate the robot in the desired direction and letting go will decelerate.  There are four "gears" to increase robot speed.  Tap the space bar while holding down the move keys to up-shift to the next gear and increase maximum speed.  There is no explicit down-shift key.  When the robot decelerates to a full stop, the gear automatically returns to one.

        IMPORTANT:  The TPRobot window must maintain keyboard focus for the controls to operate properly.  If you click on a different window while driving, the robot may continue moving even after you release the keys.  Click back on the TPRobot window to regain control again.

        The right hand controls the PowerPod.  Each tap of the arrow keys or number pad will rotate the head a few degrees.  In practice, head movement is not used very often.  I usually just drive with the left and keep my hand on the mouse - only stopping to adjust the head if I bump into something or to talk to a person that is standing.  Even then I typically only use the look up and look down controls because looking right and left is functionally the same as turning right and left.

        The bottom half of the UI displays the robot speed and sensor status.
        • Speed -  The text displays the independent speed of each wheel, while the progress indicator shows the total forward or backward speed of the robot.  The digit to the right of the progress indicator shows the current gear.
        • Dock - Turns orange when the robot is within proximity (about 8 feet) and facing towards the charging base.  Turns green when the robot has successfully docked and has electrical contact with the charging base.
        • Auto Dock - The button becomes enabled when the charger base proximity light is on.  Clicking it initiates the auto-dock function - during which time all drive controls are disabled and the robot will automatically enter a search pattern and attempt to dock with the charge base and start the charging cycle.  The auto dock feature is very imprecise and will often take 2 or 3 attempts before correctly docking.  It is best to line up the robot manually before selecting Auto Dock.
        • Bump - Turns red when the robot hits an obstacle and the front bumper is activated.  The robot will immediately stop all forward momentum when a bump is detected.  There are no bump sensors for the rear or sides of the robot.
        • Error - Turns red if a software exception occurs on the robot controller.
        • Battery - Displays battery capacity and usage data.  The text indicates the actual voltage and current draw detected on the battery.  The progress indicator gives an "estimate" of the amount of battery capacity left.  The progress indicator is not always accurate - especially when the robot is sitting on the charger.  After a few minutes of usage the progress indicator becomes more accurately calibrated.

        To customize the robot functionality, the robot controller can execute batch file scripts.  Any batch files found in the \run\scripts folder will be made available under the "File->Run Scripts" menu.  Scripts located on the robot controller can be executed by the control computer.  Just about anything can be performed by the scripts, but the two useful examples provided in the release are RestartComputer.bat and RefreshWireless.bat the purpose of which should be obvious.

          The robot has some major flaws.  I have explored them a bit and - so far have not come up with permanent solutions.  However, I have discovered ways to work around these problems and have come to terms with them.  Once you learn to manage these issues the robot can be operated with very little outside help for weeks at at time.  Still it is a good idea to have someone at the office that is well acquainted with the robot and its flaws to help you out when necessary.

          Updated Solutions 10/11/2011-> Part 9: Upgraded Power Management

          1. Charging
          The biggest problems with the robot have to do with the battery draining.  On a full charge the robot can operate for over an hour making short drives and video conferencing.  That is ample time to talk to people and then get back to the charger.  The problems start at the charger.  When the iRobot Create docks with the charger it enters into its charge cycle and the battery light will start slowly blinking red.  During this time the netbook is still on and drawing power, but the battery is still able to charge up.  Once the battery becomes fully charged the Create will then show a solid green light and enter into a trickle charge state that is designed to keep the battery full.  A flaw in the Create firmware prevents it from taking into account the current draw of the netbook however, and it never notices that the netbook is slowly draining the battery.  It fails to reenter the charge state and it continues to show a green light for several hours while it drains away until - poof !  The battery and the netbook die.

          There is no way to put the netbook into a low power "sleep" state because it must be ready at all times to accept control requests.  The Asus motherboard does not support "wake on wireless LAN", so it cannot be put to sleep.  The only way around the problem is to continually send a "reboot" command to the Create so that it will recheck the battery and restart the charge cycle.  (Luckily there is an undocumented command 7 that handles this).  So the TPRobot application must connect to the robot once every hour to send a reboot command and keep the battery charged.  Great! - but that will only keep it alive for about 2 days straight.  Even with this "hack" in place the Create somehow slowly loses track of the correct battery charge level, and the only way to recalibrate it is to take it off the charger and drive it around for a few seconds.  After recalibration it can then be placed back on the charger and the process can start all over again.  So at a minimum you MUST connect to the robot every one or two days and drive it around for a few moments - even on the weekends.  Following this procedure I have been able to keep the robot operating continuously for a month.  So that's not so bad -- except in conjunction with the next flaw.

          2. Serial-USB Disconnect
          This problem is more difficult to diagnose.  Sometimes when the Create is getting back on the charger it momentarily drops its hardware connection to the netbook.  This happens fairly frequently - maybe one out of every five times that it docks.  As a result the TPRobot application loses all contact with the Create and is not able to reconnect to it without throwing an error.  (Unauthorized Access Exception).  Without the ability to communicate with the Create, the TPRobot is unable to send the reboot commands and so - again the robot battery will drain within a few hours.  There are two ways to fix this.  First - if a person physically unplugs and replugs the Create USB cable into the netbook, then the TPRobot application will be able to reestablish a connection.  However if a person is not available then the only other way to fix it remotely is to reboot the netbook.  So the second procedure the operator must follow is to notice whenever the TPRobot loses contact with the Create and send a Windows reboot command.  This capability has been built into the software to simplify this task.

          3. Docking power loss.
          Similar to the above problem and a relatively new but serious problem.  I only experienced it after 3 months of operation after replacing my Create robot with a new one.  Sometimes during docking (presumably on the transition between non-charging and charging) the Create will drop all power to the netbook and the netbook will instantly turn off.  I have yet to understand this problem but it does not bode well for the overall design.  It may have been a mistake to remove the battery from the netbook - at least with the battery, these brown outs would not be catastrophic.

          4. PowerPod Craziness
          Another difficult problem.  Once every week or two I will lose complete control of the PowerPod when attempting to rotate it.  I don't know if it's a transient power issue or software bugs in the drivers, but whatever happens is catastrophic.  The PowerPod will just suddenly rotate to maximum on both axis (look up at ceiling) and the motors will stay engaged trying to rotate even further.  Attempting to rotate it back has inconsistent results.  Often it will just move all to way in another direction.  The only way to fix it seems to be to "detach" the TPRobot interface, unplug the USB cable on the back of the PowerPod, and physically force it back into home position.  Then reconnect the USB and try to gain control again.  This may have to be done one or more times before the hardware and drivers finally synchronize.  I don't really have not investigated this problem very much so I cannot really say whether it is a fault with the hardware integration, the Eagletron driver software, or the TPRobot software.

           Next-> Part 9: Upgraded Power Management

              Thursday, August 25, 2011

              DIY Telepresence Robot - Part 7

              Software Install

              Designing and creating the hardware was a relatively straight forward task.  I had a few false starts and design changes, but since I used high level parts the construction came together rather quickly.  The software however is a much longer and on-going project - not because it is particularly difficult but simply because that is the nature of software development.  Software takes a long time to mature properly, and between work and home-life I only have a few hours a week to work on side projects like this.  I considered selling the software since it represents a good chunk of investigation, time, and expertise on my part.  However with selling a product comes the moral obligation of quality assurance and ongoing support - neither of which I am willing to commit to.  Plus - I have taken my fair share of open-source and sample code from the Net over the years, and I figure it's about time that I pay back that debt, so I am releasing all of the source code and binaries for free under the "whatever the hell you want to do with it" license.

              Before installing the control software you have to set up the OS and support software.  Here is a guide for configuring the netbook (as best as I can remember).  If something is missing contact me and I can update this procedure.

              1. Set Auto-login
              Configure your login account so that it will automatically log in on startup because you will probably need to remotely reboot the computer fairly often.  (Be aware of any company security policies that this may affect)

              2. Disable automatic power management
              You don't want your computer going to sleep on you, so go into your power options and set the computer to never dim the screen, never turn off the screen, and never sleep when plugged in.  It's a good idea to reduce the brightness of your screen a bit to draw less power and increase your battery life.  Disable any screen savers.

              3. Disable unnecessary applications.
              To conserve power you don't want a bunch of background apps burning CPU cycles.  I can't be specific here but go through your Services, installed applications, and startup apps and remove as much clutter as you can.  For example - virus scanners, auto-updating software, file indexers, quick start services, tray tools, etc.. are all useless since this machine is dedicated to a single app.

              4. Install some type of VNC or Remote Desktop software.
              At some point you will absolutely need to log in to your desktop and diagnose or configure your environment.  Having remote desktop software is a life saver instead of asking a coworker to come and handle it.

              5. Install the web cam.
              Just install the basic drivers and avoid any extra applications that come with it.

              6. Install Skype.
              One crucial feature that was removed in recent versions of Skype (5+) is the "auto-answer with full-screen video" feature.  This is really important since you want your robot to automatically answer your video call when you Skype it and display your face in full screen without any human intervention.  For this reason you should install a legacy version of Skype that still has this all-important feature.  I am using Skype and that works well for me and is compatible with a Skype 5 peer call.

              Setup a new Skype account for the robot and configure Skype to auto-launch and auto-login at startup.  Also configure Skype to use the LifeCam video and microphone and set it to auto-answer with full screen video.  Another issue is that Skype attempts to automatically adjust the microphone level when it detects silence.  When having a conversation with someone this is fine, but while driving around in silence it tends to amplify all the robot motor noises and bumps to an annoying level.  It is a good idea to configure Skype with a fixed mic level to minimize this noise.

              7. Install Eagletron PowerPod Service.
              The software interface to the PowerPod is in the form of an ActiveX control that communicates indirectly with the hardware via a Service application.  The "Eagletron TrackerPod Service" should be installed to startup automatically.  You can install it indirectly through their tester utility, or you can get it directly here.

              8.  Install the TPRobot application on the netbook.
              This application serves both as the direct robot interface and also the remote control app.  It was based originally on Johnny Lee's C# robot driver and still has the same basic GUI design and a few snippets of code left from that project, however the bulk of the code has been completely rewritten (still in C#).  The TPRobot application should be added to the Startup folder so that it automatically launches on startup.  The source and binaries are here.  There is no installer so just unzip the contents to a location of your choice.

              9.  Register the Skype interface
              From the command line type "regsvr32 Skype4COM.dll"

              10. Run the application.
              Execute \run\TPRobot.exe

              11. Install TPRobot on the control computer.
              Repeat steps 6 and 8-10 on a your control computer at home.  You should create a personal Skype account instead of reusing the robot account.

              The next post will be devoted to how to use the software and the robot.
              Disclaimer:  While this code has settled down significantly over the last couple of months to a relatively stable and usable level - this is still very much prototype/alpha level code and there is much room for improvement.  Most of the problems now are just annoyances, but there are still a couple of major problems that you must be constantly aware of.  I will detail all of this in the next post.

              Next-> Part 8: Software Usage

              Monday, August 22, 2011

              robot troubles

              Finally had my first major break-down of the telepresence robot after 3 months of operation.  A week and a half ago I tried to connect on Monday morning and found that the computer was down.  Not an entirely unusual occurrence - I have had occasional battery drains over the weekend if I fail to monitor the robot.  However the usual attempts at battery recharge failed.  Assuming the battery had somehow gone bad, I purchased a new battery, charged it up, got the robot working again one night and then the next morning - same thing - battery drained.  After a number of unsuccessful attempts to charge the batteries I have given up and decided that the on-board charger has broken.  I don't have the patience to deal with the back-and-forth with tech support to try and get this thing resolved.  I am really spoiled and I miss my virtual presence at the office, so I went ahead and ordered a new Create and hopefully that will fix the problem.  I hope this is not a frequent occurrence.

              DIY Telepresence Robot - Part 6

              Final Assembly

              Once all the parts have been created, we just need to put everything together to finish the robot.  When we built the body frame in part 4 we did not permanently attach the vertical shaft to the H-foot in order to allow for cables.  It is now time to run those cables.  Carefully drill and smooth an oval shaped hole in the back of the support shaft about 8 inches from the top.  It is best to drill several adjacent holes using small drill bits, and then use increasingly larger bits until the holes merge into a single oval.  The oval should be large enough to comfortably pass a Type-A USB connector through.  This will be the where the cables exit the shaft on their way to the netbook.

              Push the USB end of the Create USB to Robot Cable through the hole in the bottom of the H-foot and snake the cable up through the bottom of the shaft and out through the oval hole.  Now feed the newly created netbook power cord (up or down) through the vertical shaft and H-foot as well.  With both cables in place now we can connect the body frame.  Tap the vertical shaft all the way onto the H-foot being careful not to damage or bend any part of the frame.  It may be helpful to sand down the H-foot connector a little to ease this process.

              Before attaching the body frame, turn the iRobot Create over and use the supplied wheel clamps to fasten the wheels in the retracted position.  Now turn it back over and  use the 1 1/4" long 6-32 mounting screws to attach the finished body frame to the iRobot Create.

              Plug the DB-25 connector and the round Mini-DIN serial cable into the Create.  Neatly secure all the extra cabling and the AnyVolt3 in the Create cargo bay area using some electrical tape and/or twist ties.  The picture below shows what my cargo bay looks like.  (The gray coiled cable is just some extra unattached wire that I included for future use.  I also added some DC plug connectors to the AnyVolt3 to make it easier to disconnect the electrical system.)

              Cargo Bay

              Screw the Eagletron and notebook platform onto the bolt at the top of the shaft.  Then press the netbook onto the platform and make sure it is centered and securely fastened with the velcro.  Insert the power plug and the iRobot serial to USB cable to the netbook.  Attach a USB cable from the back of the Eagletron to the netbook.

              Place the webcam on the top of the open netbook screen and fasten it with tape or velcro.  Plug the webcam's USB cable into the netbook.  The USB cables will bow out to the sides of the robot and may occasionally brush against walls and doors.  USB right angle adapters can be used to reduce the width of these cables.  Once everything is attached, use some wire management clips and ingenuity to secure the extra cabling.  The picture below shows what I managed to come up with, but I really didn't try that hard and I am sure others could vastly improve the appearance of their robot.

              Rear cables

              The last thing that needs to be done is to create of a docking station.  You should clear a small 4x4 area of all obstructions and floor clutter.  Secure the iRobot home base charger on the floor with some tape so the robot will not push it out of position.  Plug the charger base in and make sure the power cords are well out of the approach pathway.  To assist docking I fastened a cheap mirror behind the charge base so that I can better see the robot in relation to the wall and charger on approach.

              Docking Station

              The robot is complete.  Now we just need to install and configure the software.

              Next--> Part 7: Software Install

              Saturday, August 13, 2011

              DIY Telepresence Robot - Part 5

              The Electrical System

              Powering the netbook is one of the more interesting design problems.  Johnny Lee came up with a novel solution.  He modified the charger base to output 110V AC instead of DC.  Then he piled both AC/DC converter bricks onto the iRobot and charged it and the netbook using AC power supplied by the charger.  The advantage to this approach is simplicity.  By keeping both electrical systems intact and separate, he avoided the design problems associated with unifying them.  But keeping both power systems on the robot adds weight to the unit - creating docking problems.  More importantly, the conversion of the charger base to AC and the exposure of high-voltage contacts creates a potential fire hazard which renders the design inappropriate for a place of business.

              Initially I tried to keep the dual electrical system but address its problems by designing a custom plug and socket mechanism.  The socket would capture and engage the plug during auto-docking to charge the netbook, but the iRobot docking motion proved to be too erratic for a physical solution.  No plug mechanism had enough positional tolerance.  So instead I abandoned dual electrical systems and decided to unify the systems and power the netbook directly from the iRobot battery.

              Luckily the iRobot Create already has an electrical pathway to its battery through its serial interface so no physical modifications have to be made to the iRobot.  The only remaining problem then is to convert the battery feed to the proper voltage and current for the netbook.  The power requirements for the Asus 1015PE are 19 Volts and 2.1 Watts as listed on the AC/DC converter brick.  To meet this non-standard voltage, I found a nifty little product called the AnyVolt3.  It can take any input voltage from 5 to 30V and step it up or down to any output voltage between 3 and 24Vwith reasonable efficiency.  The output voltage is adjusted by a little potentiometer dial on the unit.  Our iRobot battery supplies a voltage ranging from about 12V to 16V depending on its charge level, so we just need to boost the power by 3 or 4V for the Asus netbook.  If you choose a different netbook, then the AnyVolt3 should easily be able to accommodate its different voltage requirement.


              The Asus claims to draw up to 2.1 Amps of power.  I hooked up a multimeter to test this but never saw that much current draw from the netbook during normal usage even with all the robot components connected and operating.  I assume that a 2.1A draw could occur during charging, but that's not possible without a battery attached.  So the netbook does a pretty good job of power management and the normal power draw sits somewhere around 0.5A with occasional spikes only going as high as 1.2A under load conditions.  Looking at the iRobot Create serial interface we see that pins 10, 11, and 12 each supply the battery voltage at 1.5 Amps a piece, so in theory I could get all the power I needed from a single pin.  However the AnyVolt3 draws more current than it outputs when up-converting voltage.  In other words, if the netbook is drawing 1.2A, then the AnyVolt3 will be drawing MORE than 1.2A in order to generate 19V.  To be on the safe side I used two pins in parallel to provide up to 3A to satisfy the full currency requirement.

              Hooking all this up is incredibly simple.  Plug a male DB-25 serial connector into the iRobot.  Now cut two short lengths (about 10") of power wire and connect one of them to pin 10 and the other one to pin 12.  If you use a serial breakout board connector then you can simply screw the wires in and avoid soldering.  The other ends of both power wires will overlap and screw in to the positive input terminal of the AnyVolt3.  Now cut a short length of ground wire and string it between pin 14 (GND) of the serial connector and the negative input terminal of the AnyVolt3.

              Next configure the AnyVolt3 output voltage.  Power on the iRobot and use a voltage meter to test the output terminal of the AnyVolt3.  Turn the AnyVolt's potentiometer until you detect a 19V output voltage.  To finish the wiring first cut the DC end of the netbook power cord just above the AC/DC converter brick.  Attach the cut ends of the wire to the positive and negative output terminals of the AnyVolt3.  Finally plug the power plug into the netbook.

              Electrical Wiring

              In summary, the iRobot serial interface should be connected by three wires (2 positive, 1 ground) to the AnyVolt3 input and the netbook should be connected to the AnyVolt3 output through its power cord.  You should now be able to boot up and test the netbook without a battery using only the power supplied by the iRobot.  The electrical system is now complete.  Fully charged, the robot and netbook can operate between 1 and 1 1/2 hours assuming that it only travels short distances and mainly sits still during conversations.  That is long enough for most daily activities including short visits to multiple coworker offices and even medium length formal meetings in a conference room.

              There is one major problem with this design.  When the iRobot gets back on the charger, it enters a charging cycle where it draws a large amount of current to charge the battery with.  In order to remain responsive the netbook must stay powered and awake at all times - even on the charger, so the netbook is drawing a bit of current during the charge cycle as well.  We can minimize the impact by doing things in software like turning off the screen, but we cannot eliminate it, so we are left with a minimum draw of about 250mA just to keep the netbook alive.  You would expect that the iRobot charger would compensate for the netbook draw and be able to keep the battery fully charged, but there is a flaw in the iRobot design.

              Once the iRobot detects that it has fully charged the battery, it enters into a trickle-charge mode that is designed to keep the battery at full charge.  Unfortunately during this mode the iRobot never bothers to test whether the battery is staying charged or has a draw on it.  It just assumes that the trickle is enough, but our netbook draw far exceeds the trickle charge, and so the battery will eventually drain even if the robot is sitting on the charger and the green "full charge" light is on.  Once the battery drains, it is difficult to get the robot "unconfused" about its charge state and operating properly.  I have implemented some software tricks to "mostly" overcome this problem but I have not been able to fully solve it, and so battery health is a constant and nagging issue with this robot.  I will go into some more detail about this when I cover the software in a future post.

              With the electrical system complete we have manufactured all of the robot parts, so we just need to put all the pieces together the complete the robot assembly.  The next post will cover the final assembly.

              Next--> Part 6: Final Assembly

              Friday, August 5, 2011

              DIY Telepresence Robot - Part 4

              Building the Body

              Construction of the body frame is an easy task because of the simplicity of working with the EZ Tube construction system.  The body design has to be as light as possible but strong enough to withstand the weight and stress of the head.  I considered using Styrofoam, PVC pipe, and even wood, but these materials were all heavier and bulkier than I expected and not nearly as sturdy as aluminum.  It would have been necessary for me to build a "box" like structure to gain the required rigidity.  Aluminum allowed me to simplify the body down to just a single strut and the EZ Tube part dimensions, shapes, and ease of assembly coincided exactly with what I needed.

              The body is formed by creating a support strut and mounting base from the EZ tube parts.  First cut a 30" length of tube using a hack-saw or table saw.  This will be the vertical shaft and its length will position the robot head at just the correct height to talk comfortably with someone seated at a desk.  Now cut two short 3 7/16" lengths of aluminum tube and use them to attach the three composite T connectors so that they form an H shaped foot with one of the connector ends pointing vertically from the center.

              The H foot should be wide enough so that when placed on top of the Create, the ends sit directly over the four 6-32 screw holes on the top of the Create.  iRobot conveniently designed the Create so that a five pound load centered between these four screws will counter the weight at the front of the unit and balance the Create robot almost perfectly.  Thus the mounting screws in the H foot should be positioned so that the vertical shaft  is perfectly centered between them.  Create a paper template of the screw holes and use it to mark, position, and drill the holes in the H foot.  Using progressively larger bits, drill a large hole straight up through the middle of the foot into the vertical connector large enough to shove a Type-A USB connector through.  We will use this hole to hide some of our cables within the aluminum shaft.

              Next cut off the tips of the H foot (excluding the vertical one) since they don't add any stability, are not used as connectors, and are simply dead weight.  Then remove the cargo bay tailgate to eliminate more dead weight.  Gently connect the 30" shaft to the H foot.  DO NOT FULLY HAMMER THE SHAFT ONTO THE FOOT YET.  We only want a temporary connection for positioning.  Use 1 1/4" long 6-32 screws and thin washers on top and bottom to attach the H foot to the Create.  Be careful not to over-tighten or allow the foot to angle.  Use a level tool to ensure that the shaft is perfectly vertical.  If not level then use additional washers under the foot to level it.  The mounted foot should look this.

              The next thing we will do is to create an attachment between the vertical aluminum shaft and the Eagletron PowerPod.  Luckily the PowerPod has a standard camera tripod mounting screw hole on the bottom of it, so all we need to do is create a sturdy screw mount for it.  To do this we take the EZ tube adjustable foot end-piece and remove the foot.  That leaves an end piece with a perfect little hole in it.  All we have to do now is take a 1 1/4" x 1/4"-20 bolt and push it upwards through the hole.  Now use a flange nut with the flat end facing upwards to lock the bolt into place.

              Screw the PowerPod onto the bolt until it is fairly tight.  Turn the bolt in the socket and continue tightening until both the PowerPod and the bolt feel tight and locked into place and are facing straight forward.  Now apply some super glue to lock the bolt in position.  Finally, tap the end-piece into the aluminum shaft.  You may need to use a knife to shave off some of the plastic to accomplish this.  The finished end piece and bolt should look like this.

              We are now done with the structural elements of the robot.  In the next post we will implement the electrical system so we can power the laptop from the Create battery.

              Tuesday, August 2, 2011

              DIY Telepresence Robot - Part 3

              Building the Head

              Robot Head

              Construction of the robot "head" is the the most delicate part of the project.  It involves the creation of a custom bracket to mount the laptop on the Eagletron PowerPod.  The PowerPod forms the neck of the robot.  It is a small motorized platform that can rotate both horizontally (pan) and vertically (tilt).  The mounting platform itself measures about 2"x2" across and comes with a removable camera mounting bolt that can be used to attach a variety of video cameras.  To avoid making modifications to the netbook shell, the mounting bolt will be removed and the netbook bottom will be attached to a flat platform surface using velcro.  (Adhesive tape can also be used but velcro allows the netbook to be easily removed and reattached)  At 2"x2" the PowerPod is too small to form a sturdy connection with the laptop using only velcro, so a larger mounting surface will be created using a thin sheet of aluminum.

              Another reason to create the custom mount is to reduce weight.  The PowerPod is designed to support video cameras up to 3 lbs.  Our netbook is lighter than 3lbs, however its weight distribution is very different than a video camera.  A video camera holds all of its mass in an evenly distributed box with the center of gravity just an inch or two above the bottom.  Our laptop has an L shape when open, and its center of gravity sits high and towards the rear, so to avoid stressing the PowerPod motors we should ensure that the weight is well below 3lbs.

              The easiest thing we can do to shed weight is to remove the battery from the netbook.  It's heavy and since we will be powering the netbook from the iRobot battery, it's also redundant. The Asus battery forms the lower rear surface of the netbook, so removing it leaves a large cavity on the bottom of the netbook instead of a smooth surface.  This cavity sits right below the center of gravity of the open netbook.  We will need to mount the laptop as close as possible to the center of gravity right under the battery cavity.

              To provide support under the battery cavity we create an aluminum curve.  The flat bottom part of the curve will support the base of the laptop and provide a large surface for velcro adhesion.  The top part of the bracket will gently curve into the battery compartment to support the center of gravity.  To create the curve bend a 6.5" x 12" x 0.04" aluminum sheet around a 3/4" wooden dowel rod.  Then use a hack-saw to cut the two ends of the sheet to the proper length and a mallet and pliers to refine the shape.  (a vise and a table saw would have been helpful but I had neither.)  Finally file down the sharp edges to avoid scratching the laptop.

              Curved Aluminum Sheet

              Now the aluminum curve must be attached to the PowerPod.  Remove the 4 screws that hold the mounting clamps to the PowerPod mounting plate.  Measure and drill out four holes in the aluminum sheet that match the holes of the mounting plate.  The holes must be oriented so that the mounting plate will be centered laterally and sit as far back as possible on the curve.  The hole alignment has to be near perfect.  Create and use a paper template to ensure that the holes are spaced precisely and be careful not to let the drill drift.  Use a drill press if possible.  Attach the aluminum curve to the PowerPod with the four screws.

              Use some electrical tape to pad and soften the top of the curve surface where it contacts the battery compartment to avoid scratching.  Finally stick a couple of wide velcro strips to the aluminum surface and to the bottom of the laptop.  The finished product should look like this.

              Finished Platform

              The netbook should be able to sit on the bracket in an open position without toppling it and the velcro adhesion should be strong enough to easily withstand tilting and shaking of the unit.

              That completes the neck and head of the robot.  In my next post we will construct the tower "body" and attach the neck to the body of the robot.

              Next -> Part 4: Building the Body