Pi-powered Ping Pong Pursuit

Will Jessop is a systems administrator for 37signals and he runs the North West Ruby User Group in Manchester. I bumped in to him recently and discovered he was working on a personal project with a Raspberry Pi. The aim of the project is to solve the problem of ping pong balls on the floor at the 37signals office in Chicago. The solution is a web-enabled robot with mounted camera allowing people to collect balls in to a basket.

The original version of the robot used the Custard Pi breakout, and then I suggested he looked at the MotorPiTX motor controller developed by Jason Barnett. He ordered one and joined Manchester Hackspace and began working on building or otherwise sourcing all the parts needed for the robot.

An early mains powered version using the MotorPiTX

Finding the new motor board much neater sitting on the original chassis, Will proceeded to design and 3D print motor mounts, caterpillar track mounts, a new base, a ball basket, and then added a mounted picamera with fish-eye lens.

3D printed parts

The underside, showing the pi

With a neat little camera robot, Will looked at options for battery powering it so it could roam free. Looking at power requirements and testing its usage while running the motors and streaming video over wireless, Will opted for a 5000mAh 7.4V lithium battery. He also added a lifter arm to the chassis, controlled independently of the robot itself.

Pi camera board with fish-eye lens

Basket case

All the software on the Pi is written in Go, which Will sees as a great language for the Raspberry Pi as it creates small, efficient, statically compiled binaries that easily fit within the resource limits of the Pi. This runs alongside Will’s gamepad library (in C, available as a Ruby gem) on a laptop. Will also wrote a power control script to aid clean Pi shutdown via the MotorPiTX.

With the robot roaming free on its new battery, controlled by an xbox controller, the camera feed streaming over wifi, and the lifter arm functional, it was ready to present at the 16th Manchester Raspberry Jam! On a tour of the Manchester Hackspace during the Jam, Eben, Liz and Pete got to see it in action. Eben got hold of the controller and took it round picking up ping pong balls by watching the video stream on the laptop.

Playing at Madlab

Eben, Pete Will, Liz and Andrew at Manchester Hackspace

Eben – moustache and all – examines the robot

Eben gets a go

Will then took the robot to Miami to show it off at RubyConf, where many Rubyists got to have a play with it.

In action at RubyConf

Robot picking up ping pong balls:

Robot’s eye view:

Check out the series of posts on Will’s blog. Thanks to Manchester Hackspace and Jason Barnett for helping to facilitate the project. The robot’s not been installed in the 37signals office yet, but when web access to it is available, we’ll be sure to post the link so you can all have a go!

Will also wrote a Go library for the Pimoroni Piglowgithub.com/wjessop/go-piglow. Go and take a look, have a play, and let us know what you think!

19 Comments