Passive Brake Light

this instructable shows how to connect an accelerometer to an arduino to sample motion and trigger a light. in this case I am connecting an LED brake light through a relay. my goal was to create a device that I can attach to the back of my trailer and have brake light simulation based on acceleration/deceleration. I realize that this device could also be attached to a bicycle as a self contained brake light. it doesn't work as well as a brake light connected to the brake lever but it does ok.

a kit of parts can be ordered from Jameco: Passive Brake kit

Teacher Notes

Teachers! Did you use this instructable in your classroom?
Add a Teacher Note to share how you incorporated it into your lesson.

Step 1: Layout and Wiring

here is the basic layout of the assembly. it uses an arduino uno and a 3-axis accelerometer (even though I only sample one axis). the digital signal generated from the arduino will be used to trigger the relay or could just be used to trigger an LED.

Step 2: Reusable Accelerometer

I like to use headers for the accelerometer. it is easier to reuse the components. if you are making a device to use, you may want to solder the wires directly.

Step 3: Orientation of Axis

this assembly will sample the forces on the z axis. from the diagram on the accelerometer, the z axis goes through the board. when the accelerometer is mounted in a brake light housing, the board should be oriented to stay as vertical as possible. the button connected to the digital 13 pin of the arduino will allow you to calibrate the brake light after it is mounted. by default the program uses a trigger range between -30 and 30. if the axis is off center even slightly, this default range may not work well. after mounting the assembly, push the button and the light will flash indicating that it has stored the appropriate trigger range. you can test the calibration range by tilting the assembly so the accelerometer board is horizontal and then back to vertical.

Step 4: Source Code

the source code comes mostly from the wiki for the accelerometer board:

I have documented the parts that I added for triggering the relay and the calibration switch

Step 5: Packaging

I have tried this with two types of LED brake lights. the square light has enough room for the entire assembly using an arduino pro mini. the oblong LED brake light has room to attach the components to the back but may need more packaging to keep it reliable.

Microcontroller Contest

Participated in the
Microcontroller Contest

Glovebox Gadget Challenge

Participated in the
Glovebox Gadget Challenge

Be the First to Share


    • Made with Math Contest

      Made with Math Contest
    • Multi-Discipline Contest

      Multi-Discipline Contest
    • Robotics Contest

      Robotics Contest

    5 Discussions


    2 years ago

    BTW you don`t have to use an existing brake light. You can make your own from LED strips or LED`s "chained" together in some way.


    3 years ago

    can you tell me how if i want to use Y-axis and without using a relay??

    waiting for your answer, thanks a lot @kristeller62

    1 reply

    Reply 2 years ago

    Hi SimonW34,

    Seeing that after 10 months you have not received any reply from the author or anyone else and that I just came upon it here is a reply.

    To use any specific axis like the "Y-axis" (as you asked) you will have to mount the accelerometer so that the Y-axis is parallel to the surface (road or earth) and points in the direction of movement.

    Check the image that I added.

    In this case you will mount the accelerometer "flat" (i.e. parallel to the earth) and move in the direction of "Y". Now the question is what happens when you want to use "X". You will simply "rotate" the accelerometer so that it points where "Y" is now pointing to. This means that it will still have to be mounted "flat". However if you want to use as little as possible space when using it the measure "Z" then you may just rotate it in the other plane than it is now with "Z" being in the position of "Y". Capice?


    5 years ago

    Smart idea! :)