Automatic Shadow Detection Bike Tail Light





Introduction: Automatic Shadow Detection Bike Tail Light

This project is for a bike tail light that automatically turns on when it gets dark. This can save a lot of battery power during the day where there are lots of shadows like tunnels, buildings, or trees where you want to be visible without having to get off your bike and turn the tail light on. It has a super capacitor that allows the light to stay on when passing briefly in to the light, like under branches of trees or by fences, which would otherwise make the tail light blink randomly. Turn the switch on and let the light detector do the work for you while you ride. The light only draws about 3mA so it should last a long time.

NEW Brighter Version 2.0 of this project is available now!

Please click below to support our crowd funding campaign to make this kit available for purchase online!


QTY Description

1 OPT101P Texas Instruments Photo Diode IC

1 EEC-S0HD104 Panasonic Super Capacitor (I got the idea to use this super capacitor from

1 74HC86 NXP XOR Gate,6...

1 SBH331AS-ND 3 X AA Battery Holder with On/Off switch

1 330QBK-ND 330 Ohm Resistor

1 30BQ015PBFCT-ND Vishay Schottky Diode (I like these diodes because they have very small voltage drop.)

4 5mm RED STRAW HAT LEDs (they seem to be very bright and very affordable)

1 2" X 2" Thru Hole PCB (I had to hacksaw a piece of PCB to get the right size.)

1 2" X 2" Piece of Double Back Tape

1 Small Bicycle Seat Post Bag with Seat Post Strap

3 AA Batteries

Step 1: Build the Circuit

Solder the components to the PCB according to the diagram with the LEDs at the top, the Photo Diode IC below the LEDs, and the +/- leads at the bottom. Solder the Battery Holder leads to the circuit then put the Double Back Tape on the battery holder above the switch. Stick the PCB to the tape with the Photo Diode IC facing out and insert the AA batteries. Test the circuit by turning the switch on and putting the device in a dark space or covering the Photo Diode IC. When you put the device in the light, it should power down.

For brighter lights, you can use a lower resistor value. I've tested with a 5 Ohm resistor and it works well, but the super capacitor dies out much faster when turned off.

Also, you can encapsulate the circuit in epoxy for a water resistant coating, but I don't know what effect it will have on the sensitivity of the light sensor.

Step 2: Attach the Light to the Bike

Cut an opening in the small bike bag to match the profile of the LEDs and the Photo Diode and cut a hole for the switch. Insert the device in to the bag and close the bag. I found that wire cutters do a good job at cutting through this material. Attach the bag to the bike seat post and your done!

This circuit can also be added to the Solar/Dynamo USB charger tail lights for automatic lighting instead of daytime running lights:



    • Science of Cooking

      Science of Cooking
    • Pro Tips Challenge

      Pro Tips Challenge
    • Pocket-Sized Contest

      Pocket-Sized Contest

    We have a be nice policy.
    Please be positive and constructive.




    This project could be enhanced by combining it with a shake sensor. Only then you don't have to think to switch the circuit on and off.

    The shake sensors I've used were too sensitive and turned on even if the bike was not moving but there was a vibration nearby. I would suggest a shake sensor that filters out unwanted vibrations.