New adventures: model #7

I’ve started a new, more ambitious robotics project. This robot is targeted for outdoor use in semi-controlled settings, but with much larger range. I’ve been conceptualizing this for about six months now.

The goal is to build a platform that:

  • can be used outside on pavement
  • provides a wide array of sensors to navigate complex environments
  • has enough computation power to play with OpenCV
  • can be internet connected for rapid development (aka BeagleBone, wifi, and Python)

Using this platform I would like to play with:

  • Outdoor navigation and obstacle avoidance
  • OpenCV
  • GPS and pre-planning algorithms
  • “mission control” software
  • infrastructure management

In the near term it will be built upon:

  • Arduino Mega
  • BeagleBone
  • RoboClaw for motor control
  • Pololu 37D motors with encoders
  • LS20031 GPS
  • CH robotics UM6 IMU
  • Adafruit TTL Camera
  • HC-SR04 Ultrasound sensors
  • IOGear GWU627 for wifi

In the longer term:

  • XBee Pro for long-range “missions”
  • Solar panel charging
  • “measurementation” sensor packages

DSC01761

DSC01760

Off grid drip irrigation

There are not many resources on the Internet describing off grid drip irrigation. The major difference is using a dc water pump to pump and pressurize the drip line. Most of the dc water pumps are meant for rv’s. Flowjet and Shurflo are the biggest pump manufacturer’s.

For my rural property, we want to plant some fruit trees. Our well pump and infrastructure are solar powered, so drip irrigation seems a logical choice to conserve resources. This weekend I tested this.

I used a Shurflo Revolution (series 4008 3.0 gpm) pump from Amazon (about $90) and twenty 2gpm pressure compensating emitters. The test setup was 50 feet of 0.5″ trunk tubing directly coupled to the Shurflo pump. Each emitter is on five feet of 0.25″ tubing. I first volume tested ten emitters, then twenty emitters. The volume test was run for two minutes. I found that in both cases the system overwatered by 20%. The amount did not change by more than 5% when going from ten to twenty emitters. I am guessing that the 55psi output from the Revolution pump probably exceeds the spec of the emitter. In the real world, additional friction from longer 0.5″ trunk line will reduce the pressure, at least at the end of thee drip line.

WordPress broken

A few months ago I upgraded my Ubuntu distribution (my site runs on a virtualized server–located in my garage). I never checked WordPress: it broke.

Read data from an xbee using sockets on ConnectPort

After browsing the examples on the Digi cd that comes packaged with the ConnectPort, I decided to start rolling some code examples that actually combine some fundemental concepts. The code here, finds an xbee by it’s label or NI, then reads data from it.

import zigbee
from socket import *

################################################################################
def getZigbeeAddressByLabel( strLabel ):
    '''
    given the label of a zigbee/xbee device, find it's address. The label is
    often set using X-CTU and setting the "Node Identifier" or NI attribute.
    
    '''
    
    zigbeeNodeList = zigbee.getnodelist()
    
    for oNode in zigbeeNodeList:
        if strLabel == oNode.label:
            return (True, oNode.addr_extended)
        
    return (False, None)
    


################################################################################
def readDataFromZigbee( strAddr, iLengthToRead ):
        
    # The Format of the tuple is:
    #  (address_string, endpoint, profile_id, cluster_id)
    #
    # The values for the endpoint, profile_id, and
    # cluster_id given below are the values used to write
    # to the serial port on an Ember-based XBee module.
    DESTINATION=(strAddr, 0xe8, 0xc105, 0x11)
    
    # Create the socket, datagram mode, proprietary transport:
    sd = socket(AF_ZIGBEE, SOCK_DGRAM, ZBS_PROT_TRANSPORT)
    
    # Bind to endpoint 0xe8 (232):
    sd.bind(("", 0xe8, 0, 0))
    
    # Block until a some amount of data is read
    (strData, src_addr) = sd.recvfrom( iLengthToRead )
    
    sd.close()
    
    return strData


################################################################################
if "__main__" == __name__:
    (ok, strAddr) = getZigbeeAddressByLabel( "_GH1" )
    
    data = readDataFromZigbee( strAddr, 16 )
    
    print data

ConnectPort X2 is driving me crazy

Purchased a ConnextPort X2 (model X2-Z11-EC-A) from SparkFun. It took me about four hours to get my collection of Series 2 xbee’s to be discovered. The magic formula is that the S2 xbee’s need to be flashed with XB24-ZB “Zigbee” firmware. The older firmware starts with ZNET and is not compatible with the ConnectPort. I spent a lot of this time battling X-CTU. You have to manually change the Modem type (from XB24-B to XB24-ZB) to see the newer firmware. If you browse Digi’s ftp site, you can get newer (like circa 2010) firmware updates.

One of the problems that continually tripped me up, was needing to reset the firmware parameters to defaults. I run many of my xbee’s at a baud rate higher than 9600. When the firmware update completes with factory defaults, the baud rate is changed back to 9600 and X-CTU can’t the config via AT commands (this would be different if you are using API mode). To get around this, you have to power-cycle or reset the xbee. I really like SparkFun’s xbee to USB dongle, but it does not have a reset button…you have to pull the xbee out of the 2mm headers and reseat it…an electrically dubious action.

OSCON 2011

I will be at OSCON 2011 here in Portland for the whole week. I got into OSCON Data and will be at several of the tutorials Monday and Tuesday.

Mounted sensors

Added an ambient light sensor to the 2WD robot and six (6!) Sharp fixed distance IR sensors to the 4WD robot.

Beagle Board first steps

Got a partially booting BeagleBoard. Spent an hour battling the serial port. The IDC10 adaptor I purchased was not a pass-thru. It is very nice to get serial output without a working kernel. Managed to get an angstrom kernel working with no rootfs.

The downside to this board, is that it does not have built-in ethernet. You need to buy the add-on board of a USB dongle.

Edit 2014: Gave this board to Robert Wamble. In the age of Raspberry PI’s, this board is an antique.

 

beagleboard