Street Sweeper

August 2010


After a long break I’m back with a new project. This autonomous street sweeper was inspired by the type we have driving around here in Ireland. It started as a simple project to build a 3-wheeler trike using a turntable, and like most LEGO it morphed into something else entirely.

I’m very proud of the compact build on this model. The Power Function motors mounted at the rear add a degree of realism as the “water tanks” used by the sweeper.

The Street Sweeper is rear-wheel drive and rear-wheel steering. The rear wheels are driven through a differential so that they can rotate in place. The large PF motor drives the wheels, and the smaller PF motor turns the turntable.

The NXT needs to know when the rear wheels are pointing in a straight-ahead direction. I tried a number of designs using a touch sensor to detect when the wheels are straight, but ultimately settled on using a light-sensor from the NXT kit. A small white 1x2 plate mounted to the turntable will reflect light back to the sensor when the wheels are aligned to drive straight. It’s not terribly precise, but it works well.

I mounted the “sweepers” on the front of the vehicle in a modular unit. It’s also possible to attach a lawnmower to the front. It’s a tight squeeze to get all of the wiring in place; I tend to use the flexible cables from where possible. I find the standard LEGO NXT cables too stiff over short distances.

The Mindsensors NXTSumoEyes are used for obstacle avoidance at the front. The rear wheels are turned in the correct direction and the sweeper reverses for a random amount of time, sounding a warning of course!

See also my page showing the final version of this I brought to LEGO World Zwolle!


Source Code

I wrote the example program for this robot in NXC. It’s pretty simple - just a regular obstacle avoidance algorithm. The fun bit is centering the steering on startup.

Download the NXC source sweeper.nxc.

Building Instructions

The full building instructions are available in Street_Sweeper_lpub.pdf (with thanks to Kevin Clague who helped to edit these instructions). This is a very large file at 13MB! However I have also placed the building instructions as images in this gallery for easier viewing online.



Last updated 30 September, 2010

All content © 2008 2009 2010 Mark Crosbie

LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this site. This site, its owner and contents are in no way affiliated with or endorsed by the LEGO Group. For more please read the LEGO Fair Play policy.