I and lots of friends have experienced a problem when carrying our bike lights in backpacks-- their on/off switches are often configured so that they are easily turned on while in the backpack... leaving a dead battery come nightfall when needed.
The solution is this Instructable-- constructing guards around the switches to keep them from getting pressed by ordinary jostling in a bag.
Step 1: Version 1: Wire
Construct a guard out of that universal material, paper clip wire. Usually I use jumbo paperclips, unbent, but recently have found high-tech round paper clips very useful (see the alternate photos). For regular jumbo paperclips, straighten out using regular pliers, vice-grips, or a vice, then bend into shape with needle-nose pliers.
Then attach using that other univeral material, 5-minute epoxy.
Note that you need to bend the wire into a shape that will protect the switch from getting pressed by casual contact with stuff, but so that the switch remains accessible to a finger (possibly gloved in winter). Test out angles of vulnerability to contact.
To work with epoxy as an adhesive+structural material:
1. I find 5-minute clear epoxy works better than 2-ton epoxy, since the 5-minute type is slightly ductile when cured and less brittle.
2. Be sure to roughen the to-be-epoxied surface of the light by scratching it with an awl or file, for best adhesion.
3. Rig up some books or paperweights such that the surface on which the epoxy is going is flat with respect to the ground, so that gravity won't cause it to drip or run before it cures.
4. After mixing with a toothpick on a scrap of cardboard, smear a thin layer on the light.
5. Position the wire ontop of that layer. You might need to rig up some supporting bits of cardboard and/or scotch tape to temporarily hold it in place until cured.
6. Dollop a layer of epoxy on *top* of the wire, creating a nice little bubble with the wire encased within.
Here are images of some guards I built, one for a Cateye basic white LED headlamp, one for a Zefal red blinky LED rear light, and one for a Cateye TL-LD-1000 red blinky LED rear light.
Step 2: Version 2: Plastic
For some devices, a piece of plastic makes a better protector.
For example, this Cateye HL-EL500 high-intensity LED headlamp has a funny sliding switch (which, while a lot less susceptible to accidental manipulation in a backpack, of course, occasionally does get tripped... it happened to me!).
Here, in the first photo, I used a piece of 1mm thick polyethelene from some old thing I was throwing out. I cut it into shape, and glued it on using curing cement (Barco or contact cement).
gabcunha made it!