Welcome to Bob & Eileen's web site. Bob generally blogs here while Eileen blogs over at her site. You can see our photos from here or click the little camera in the upper right corner.


March 2017
« Sep    

August 28, 2011

It Moves!

Filed under: Electronics,Machining,Robots — Bob @ 3:31 pm

My outdoor robot project has reached the stage where it can move under its own power, without tethering or remote control.

It doesn’t yet have any sensors, so its sort of blind, so I purposefully set it to go slowly around in a circle for 20 seconds or so. Didn’t want to have to chase it!

The next step is to mount some ultrasonic sensors and add some navigation code, and let it wander. Probably need to enable that remote kill switch I was experimenting with…

May 2, 2011

Outdoor Robot Project Update

Filed under: Electronics,Machining,Robots,Uncategorized — Bob @ 7:08 pm

Can’t believe how much time has passed since I’ve posted anything. I really should try to make up for that oversight.

My robot project continues to evolve, the mechanical parts are coming together rather nicely. The picture here shows the most current status, with the chassis, motors, suspension, battery holder and deck are in place. The electronics will be mounted to the deck as soon as I get the boards back from production by BatchPCB.

The boards will be the interface between a Gumstix Overo and the motor controller and sensor boards. I’m using CAN as the communication mechanism. My other post sort of explained how that all works.

My hope is to have the robot up and running around by late June, in time for the Vancouver Mini Maker Faire. The Vancouver Robotics Club will be doing demos all weekend.

August 12, 2010

Overo + Controller Area Network (Revisited)

Filed under: Electronics,Robots,Software — Bob @ 7:37 pm

A while back I posted about my work to enable support for the Microchip MCP2515 CAN controller with my Gumstix Overo. At the time I was confident of success because I was successfully receiving messages from my AVR setup. It was only recently that I discovered that in fact although reception was ok, transmission was not actually working.

Debugging the mcp251x Linux driver was an interesting exercise. Google wasn’t much help, as it seemed the few others attempting this same feat were either successful or completely unsuccessful. My situation suggested I didn’t have any electrical problems nor did I have any compatibility issues. Though resolving my problem I learned a whole lot of stuff I didn’t expect to, but it was really fun and rather educational. Maybe by sharing my diagnostics process others can learn something too.

Since I had a working receiver I was working under the impression there was some sort of issue with the way I configured the mcp251x driver. I tried upgrading to the latest version of the kernel (2.6.34) but no joy. I also looked at the latest development version of the mcp251x driver from the SocketCAN project. No new insight there at all.

From building a simple driver for the AVR chip I had a good working knowledge about how the MCP2515 works, so I figured it was really something to do with how the driver was written. It obviously wouldn’t be a generalized problem, but I had no idea what could be wrong. I started by adding a whole bunch of printk() debugging statements to better trace how the driver was called from userspace. Something odd was happening where the driver was repeatedly polling the MCP2515 chip for status. I traced what it was doing in the code and also followed the SPI conversation using my Saleae Logic logic analyzer. Nifty device by the way, highly recommend it. Turns out it didn’t really help solve the problem, but it did manage to help eliminate various false leads.

The SPI conversation and responses were perfectly normal. More printk() statements later and I was rather stumped. Then it occurred to me (at a time I wasn’t actually in front of my project) that there really should not be any polling. The driver configured itself with an interrupt line to know exactly when an event was pending. The polling I could observe over the SPI bus suggested this mechanism was not working (the status returned by the chip was correctly suggesting there was no pending events most of the time).

Turns out the default Overo build from OpenEmbedded sets up the GPIO pin for the interrupt line with a pull-down resistor. The interrupt line should normally be high then pulled low to signal a pending event. As far as I could tell, the pin was never actually being pulled high enough to be sensed by the Overo processor. I expect that the voltage level converters I’m using are to blame, failing to overcome the resistance of the pull-down resistor. This meant the Overo was seeing the GPIO pin as a low logic level all the time, leading to a constant interrupt. When this happens, the interrupt handler will fire and poll for the reason for the interrupt. Inspection of the code suggests this could starve the transmit code path from ever getting enough time to send messages. Indeed this would explain the situation I was observing. I adjusted the pin configuration in the u-boot recipe (now in my user.collection) to use a pull-up resistor instead, and now everything is fine. Because of the way that the mcp251x driver is written this should be ok.

I also discovered my previously published user.collection tarball was not matching my actual configuration. For reasons that are (again) likely due to the voltage level converters I lowered the maximum SPI rate to 500kHz. I’m using a CAN bus speed of 125kHz with a very low message frequency, so this doesn’t seem to be a problem. I was also annoyed by several of the useless messages printed to the console from the SPI driver and the mcp251x driver, so I commented them out with my own patch. Both issues are now fixed in the tarball. Download, roll into your own user.collection directory, and enjoy.

April 15, 2010

Overo + Controller Area Network

Filed under: Electronics,Robots,Software — Bob @ 7:20 pm

I’ve had a long interest in using Controller Area Network (CAN) to communicate between different components such as sensors or GPS modules or motor controllers. I wasn’t sure if I could do this with the Gumstix Overo board, but I got excited when I found out that Linux kernel version 2.6.33 would be including a driver for the Microchip MCP2515 CAN chip.

This required creating a custom image for the Overo, which meant setting up a build with OpenEmbedded. The Gumstix guys made it sound pretty easy in their instructions, so I set off to make it happen. I started with a virtual machine with Ubuntu 9.10 and set up bitbake and OpenEmbedded as suggested.

I’ve uploaded a tarball of my user.collection directory with overrides for the Overo machine configuration (you could probably ignore that) and for the Linux 2.6.33 recipe to include my configuration and patches to the Overo’s board initialization code for the MCP2515 chip on SPI bus 1 chip select 0.

My working environment for the org.openembedded.dev component uses change d535da0dfe20e965adb49d3acf720e7f9feb58c6. I’m sure by the time you try this there will be newer versions, but I can’t say whether my patches will work or not.

As for the hardware, the Overo uses 1.8v internally but the MCP2515 uses 5v. I used a few SparkFun logic level converter boards to translate voltages. Despite what you might read on their website, DO NOT USE the RX channels as this will send 2.5v into the 1.8v-capable pins on the Overo! Only use the TX channels (they are bidirectional and work at the correct voltage). I needed to translate five pins (SCLK, MISO, MISO, CS, and an interrupt pin) so I used three of the SparkFun boards.

I was able to use the candump program from the socket-can test tools suite to verify correct operation. Awesome!

August 1, 2009


Filed under: Electronics,Games,Robots,Work — Bob @ 10:57 am

From the exceptionally low frequency of updates to this site this year you’d think that I have nothing interesting to post about. Not true. Things have been exceptionally busy at work, and I’ve also managed to find some interesting things in my pursuit of building robots.

I took a trip for work to the Sophos HQ in Abingdon, United Kingdom a couple of weeks ago. Its just outside of Oxford, and its a great place. It was really nice to meet people I’ve been talking to (over the phone) for quite a few months now, and the week I spent there was incredibly productive. This was the culmination of a lot of work since spring, and it seems like its only getting more busy now through the summer.

For my robotics hobby I picked up a Hammer board from Tin Can Tools. This is a development board built around a Samsung processor with an ARM 920T core. I have this crazy idea of making a Line Maze robot that runs Linux for the Seattle Robotics Society Robothon event this October. Seriously!

The other major “toy” is my new iPhone 3GS. I’d been waiting for the new model to come out, and I even took time off from work to go stand in line on the morning it was released. I really like it, definitely another solid Apple product. I’ve slowly been re-incorporating Apple products into my household: a 15″ MacBook Pro, a Time Capsule, and now an iPhone. It is just so much better than my previous phone (Motorola Razr) and its also much better than any other device I looked at including the Blackberry product line and the phones running Google Android. I’ve got the iPhone SDK installed and have started writing my first applications. Learning Objective-C is nifty although it makes my brain hurt a little after so many years of writing C++ and Perl/Python/etc.

The day I bought my iPhone I left it with Eileen and I went out to play golf with a friend. By the time I got back she had fallen in love with it too, and demanded we go out and buy her one. So now we are a two-iPhone household.

Golf. Yes, golf. I’ve been playing pitch-n-putt (par 3) golf with people from work this summer and having a great time. I’m not that good but still its a great way to be outside and includes a small amount of physical activity. I don’t think I’ll graduate to playing a full-size course but these short courses are a lot of fun. We’ve lived around the corner from a course for a number of years but never been there. Now I will often get home from work, pick up the clubs and walk five minutes down the street to play nine holes. Lots of fun!

Next Page »
Powered by: WordPress