It's easy to forget to turn off your bike's safety lights and consequently drain the battery. Blogger Miceuz was fed up with killing his battery, so he modified the light so that it turns off automatically.
The automatic shut-off switch just uses a spring and a small circuit. When the bike is moving, the spring bounces and keeps the light on. When the bike stops moving for about a minute, the spring stops bouncing, and the light turns off. It's a low-tech solution, but it works well. Check out Miceuz's post for the full how-to guide.